Coverage Report

Created: 2026-06-05 17:15

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include "common/status.h"
21
#include "exec/common/util.hpp"
22
#include "exec/exchange/local_exchange_sink_operator.h"
23
#include "exec/exchange/local_exchange_source_operator.h"
24
#include "exec/operator/aggregation_sink_operator.h"
25
#include "exec/operator/aggregation_source_operator.h"
26
#include "exec/operator/analytic_sink_operator.h"
27
#include "exec/operator/analytic_source_operator.h"
28
#include "exec/operator/assert_num_rows_operator.h"
29
#include "exec/operator/blackhole_sink_operator.h"
30
#include "exec/operator/bucketed_aggregation_sink_operator.h"
31
#include "exec/operator/bucketed_aggregation_source_operator.h"
32
#include "exec/operator/cache_sink_operator.h"
33
#include "exec/operator/cache_source_operator.h"
34
#include "exec/operator/datagen_operator.h"
35
#include "exec/operator/dict_sink_operator.h"
36
#include "exec/operator/distinct_streaming_aggregation_operator.h"
37
#include "exec/operator/empty_set_operator.h"
38
#include "exec/operator/exchange_sink_operator.h"
39
#include "exec/operator/exchange_source_operator.h"
40
#include "exec/operator/file_scan_operator.h"
41
#include "exec/operator/group_commit_block_sink_operator.h"
42
#include "exec/operator/group_commit_scan_operator.h"
43
#include "exec/operator/hashjoin_build_sink.h"
44
#include "exec/operator/hashjoin_probe_operator.h"
45
#include "exec/operator/hive_table_sink_operator.h"
46
#include "exec/operator/iceberg_delete_sink_operator.h"
47
#include "exec/operator/iceberg_merge_sink_operator.h"
48
#include "exec/operator/iceberg_table_sink_operator.h"
49
#include "exec/operator/jdbc_scan_operator.h"
50
#include "exec/operator/jdbc_table_sink_operator.h"
51
#include "exec/operator/local_merge_sort_source_operator.h"
52
#include "exec/operator/materialization_opertor.h"
53
#include "exec/operator/maxcompute_table_sink_operator.h"
54
#include "exec/operator/memory_scratch_sink_operator.h"
55
#include "exec/operator/meta_scan_operator.h"
56
#include "exec/operator/mock_operator.h"
57
#include "exec/operator/mock_scan_operator.h"
58
#include "exec/operator/multi_cast_data_stream_sink.h"
59
#include "exec/operator/multi_cast_data_stream_source.h"
60
#include "exec/operator/nested_loop_join_build_operator.h"
61
#include "exec/operator/nested_loop_join_probe_operator.h"
62
#include "exec/operator/olap_scan_operator.h"
63
#include "exec/operator/olap_table_sink_operator.h"
64
#include "exec/operator/olap_table_sink_v2_operator.h"
65
#include "exec/operator/partition_sort_sink_operator.h"
66
#include "exec/operator/partition_sort_source_operator.h"
67
#include "exec/operator/partitioned_aggregation_sink_operator.h"
68
#include "exec/operator/partitioned_aggregation_source_operator.h"
69
#include "exec/operator/partitioned_hash_join_probe_operator.h"
70
#include "exec/operator/partitioned_hash_join_sink_operator.h"
71
#include "exec/operator/rec_cte_anchor_sink_operator.h"
72
#include "exec/operator/rec_cte_scan_operator.h"
73
#include "exec/operator/rec_cte_sink_operator.h"
74
#include "exec/operator/rec_cte_source_operator.h"
75
#include "exec/operator/repeat_operator.h"
76
#include "exec/operator/result_file_sink_operator.h"
77
#include "exec/operator/result_sink_operator.h"
78
#include "exec/operator/schema_scan_operator.h"
79
#include "exec/operator/select_operator.h"
80
#include "exec/operator/set_probe_sink_operator.h"
81
#include "exec/operator/set_sink_operator.h"
82
#include "exec/operator/set_source_operator.h"
83
#include "exec/operator/sort_sink_operator.h"
84
#include "exec/operator/sort_source_operator.h"
85
#include "exec/operator/spill_iceberg_table_sink_operator.h"
86
#include "exec/operator/spill_sort_sink_operator.h"
87
#include "exec/operator/spill_sort_source_operator.h"
88
#include "exec/operator/streaming_aggregation_operator.h"
89
#include "exec/operator/table_function_operator.h"
90
#include "exec/operator/tvf_table_sink_operator.h"
91
#include "exec/operator/union_sink_operator.h"
92
#include "exec/operator/union_source_operator.h"
93
#include "exec/pipeline/dependency.h"
94
#include "exec/pipeline/pipeline.h"
95
#include "exprs/vexpr.h"
96
#include "exprs/vexpr_context.h"
97
#include "runtime/runtime_profile.h"
98
#include "runtime/runtime_profile_counter_names.h"
99
#include "util/debug_util.h"
100
#include "util/string_util.h"
101
102
namespace doris {
103
class RowDescriptor;
104
class RuntimeState;
105
} // namespace doris
106
107
namespace doris {
108
109
0
Status OperatorBase::close(RuntimeState* state) {
110
0
    if (_is_closed) {
111
0
        return Status::OK();
112
0
    }
113
0
    _is_closed = true;
114
0
    return Status::OK();
115
0
}
116
117
template <typename SharedStateArg>
118
2.20M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.20M
    if (_parent->nereids_id() == -1) {
120
1.17M
        return fmt::format("(id={})", _parent->node_id());
121
1.17M
    } else {
122
1.02M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.02M
    }
124
2.20M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
65.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
65.5k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
65.5k
    } else {
122
65.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
65.5k
    }
124
65.5k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1
    if (_parent->nereids_id() == -1) {
120
1
        return fmt::format("(id={})", _parent->node_id());
121
1
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
263k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
263k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
263k
    } else {
122
263k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
263k
    }
124
263k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
24
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
24
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
24
    } else {
122
24
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
24
    }
124
24
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
10.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10.6k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
10.6k
    } else {
122
10.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
10.6k
    }
124
10.6k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
7.39k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
7.39k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
7.38k
    } else {
122
7.38k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
7.38k
    }
124
7.39k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
152k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
152k
    if (_parent->nereids_id() == -1) {
120
29
        return fmt::format("(id={})", _parent->node_id());
121
152k
    } else {
122
152k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
152k
    }
124
152k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
368
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
368
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
368
    } else {
122
368
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
368
    }
124
368
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
209
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
209
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
209
    } else {
122
209
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
209
    }
124
209
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
845k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
845k
    if (_parent->nereids_id() == -1) {
120
379k
        return fmt::format("(id={})", _parent->node_id());
121
466k
    } else {
122
466k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
466k
    }
124
845k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
55.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
55.2k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
55.2k
    } else {
122
55.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
55.2k
    }
124
55.2k
}
_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
10.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10.0k
    if (_parent->nereids_id() == -1) {
120
10.0k
        return fmt::format("(id={})", _parent->node_id());
121
18.4E
    } else {
122
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
18.4E
    }
124
10.0k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
632
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
632
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
530
    } else {
122
530
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
530
    }
124
632
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.84k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.84k
    if (_parent->nereids_id() == -1) {
120
13
        return fmt::format("(id={})", _parent->node_id());
121
4.83k
    } else {
122
4.83k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.83k
    }
124
4.84k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
786k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
786k
    if (_parent->nereids_id() == -1) {
120
786k
        return fmt::format("(id={})", _parent->node_id());
121
786k
    } else {
122
636
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
636
    }
124
786k
}
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.39M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.39M
    if (_parent->nereids_id() == -1) {
129
833k
        return fmt::format("(id={})", _parent->node_id());
130
833k
    } else {
131
556k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
556k
    }
133
1.39M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
113k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
113k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
113k
    } else {
131
113k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
113k
    }
133
113k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
2
    if (_parent->nereids_id() == -1) {
129
1
        return fmt::format("(id={})", _parent->node_id());
130
1
    } else {
131
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1
    }
133
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
264k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
264k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
264k
    } else {
131
264k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
264k
    }
133
264k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
30
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
30
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
30
    } else {
131
30
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
30
    }
133
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
10.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
10.6k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
10.6k
    } else {
131
10.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
10.6k
    }
133
10.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
7.54k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
7.54k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
7.53k
    } else {
131
7.53k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
7.53k
    }
133
7.54k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
152k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
152k
    if (_parent->nereids_id() == -1) {
129
29
        return fmt::format("(id={})", _parent->node_id());
130
152k
    } else {
131
152k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
152k
    }
133
152k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
295
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
295
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
295
    } else {
131
295
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
295
    }
133
295
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
219
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
219
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
219
    } else {
131
219
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
219
    }
133
219
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
89
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
89
    if (_parent->nereids_id() == -1) {
129
89
        return fmt::format("(id={})", _parent->node_id());
130
89
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
89
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.26k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.26k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
6.26k
    } else {
131
6.26k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.26k
    }
133
6.26k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
634
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
634
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
532
    } else {
131
532
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
532
    }
133
634
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
11.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
11.8k
    if (_parent->nereids_id() == -1) {
129
11.8k
        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.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
323k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
324k
    if (_parent->nereids_id() == -1) {
129
324k
        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
323k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
498k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
498k
    if (_parent->nereids_id() == -1) {
129
497k
        return fmt::format("(id={})", _parent->node_id());
130
497k
    } else {
131
348
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
348
    }
133
498k
}
_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.5k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
29.5k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
29.5k
    _terminated = true;
141
29.5k
    return Status::OK();
142
29.5k
}
_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.11k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.11k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.11k
    _terminated = true;
141
1.11k
    return Status::OK();
142
1.11k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
10
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
10
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
10
    _terminated = true;
141
10
    return Status::OK();
142
10
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
3
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
3
    _terminated = true;
141
3
    return Status::OK();
142
3
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2.76k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2.76k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2.76k
    _terminated = true;
141
2.76k
    return Status::OK();
142
2.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
827
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
827
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
827
    _terminated = true;
141
827
    return Status::OK();
142
827
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
10
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
10
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
10
    _terminated = true;
141
10
    return Status::OK();
142
10
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
476
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
476
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
476
    _terminated = true;
141
476
    return Status::OK();
142
476
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4
    _terminated = true;
141
4
    return Status::OK();
142
4
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
192
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
192
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
192
    _terminated = true;
141
192
    return Status::OK();
142
192
}
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
793k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
793k
    return _child && _child->is_serial_operator() && !is_source()
146
793k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
793k
                   : DataDistribution(ExchangeType::NOOP);
148
793k
}
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
100k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
156
100k
    if (!_child) {
157
34.1k
        return false;
158
34.1k
    }
159
66.7k
    if (_child->is_serial_operator()) {
160
51.7k
        return true;
161
51.7k
    }
162
15.0k
    const auto child_distribution = _child->required_data_distribution(state);
163
15.0k
    return child_distribution.need_local_exchange() &&
164
15.0k
           !is_hash_shuffle(child_distribution.distribution_type);
165
66.7k
}
166
167
81.5k
const RowDescriptor& OperatorBase::row_desc() const {
168
81.5k
    return _child->row_desc();
169
81.5k
}
170
171
template <typename SharedStateArg>
172
20.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.4k
    fmt::memory_buffer debug_string_buffer;
174
20.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.4k
    return fmt::to_string(debug_string_buffer);
176
20.4k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
70
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
70
    fmt::memory_buffer debug_string_buffer;
174
70
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
70
    return fmt::to_string(debug_string_buffer);
176
70
}
_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
26
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
26
    fmt::memory_buffer debug_string_buffer;
174
26
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
26
    return fmt::to_string(debug_string_buffer);
176
26
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_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_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
42
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
42
    fmt::memory_buffer debug_string_buffer;
174
42
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
42
    return fmt::to_string(debug_string_buffer);
176
42
}
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
297
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
297
    fmt::memory_buffer debug_string_buffer;
174
297
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
297
    return fmt::to_string(debug_string_buffer);
176
297
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
template <typename SharedStateArg>
179
20.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
20.3k
    fmt::memory_buffer debug_string_buffer;
181
20.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
20.3k
    return fmt::to_string(debug_string_buffer);
183
20.3k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
14
    fmt::memory_buffer debug_string_buffer;
181
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
14
    return fmt::to_string(debug_string_buffer);
183
14
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
26
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
26
    fmt::memory_buffer debug_string_buffer;
181
26
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
26
    return fmt::to_string(debug_string_buffer);
183
26
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
42
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
42
    fmt::memory_buffer debug_string_buffer;
181
42
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
42
    return fmt::to_string(debug_string_buffer);
183
42
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
313
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
313
    fmt::memory_buffer debug_string_buffer;
181
313
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
313
    return fmt::to_string(debug_string_buffer);
183
313
}
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
28
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
28
    fmt::memory_buffer debug_string_buffer;
181
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
28
    return fmt::to_string(debug_string_buffer);
183
28
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
19.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
19.9k
    fmt::memory_buffer debug_string_buffer;
181
19.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
19.9k
    return fmt::to_string(debug_string_buffer);
183
19.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
184
185
20.6k
std::string OperatorXBase::debug_string(int indentation_level) const {
186
20.6k
    fmt::memory_buffer debug_string_buffer;
187
20.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
188
20.6k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
189
20.6k
                   _is_serial_operator);
190
20.6k
    return fmt::to_string(debug_string_buffer);
191
20.6k
}
192
193
20.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
194
20.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
195
20.4k
}
196
197
703k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
198
703k
    std::string node_name = print_plan_node_type(tnode.node_type);
199
703k
    _nereids_id = tnode.nereids_id;
200
703k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
201
3.82k
        if (!tnode.__isset.output_tuple_id) {
202
0
            return Status::InternalError("no final output tuple id");
203
0
        }
204
3.82k
        if (tnode.intermediate_output_tuple_id_list.size() !=
205
3.82k
            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.82k
    }
213
703k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
214
703k
    _op_name = substr + "_OPERATOR";
215
216
703k
    if (tnode.__isset.vconjunct) {
217
0
        return Status::InternalError("vconjunct is not supported yet");
218
703k
    } else if (tnode.__isset.conjuncts) {
219
451k
        for (const auto& conjunct : tnode.conjuncts) {
220
451k
            VExprContextSPtr context;
221
451k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
222
451k
            _conjuncts.emplace_back(context);
223
451k
        }
224
147k
    }
225
226
    // create the projections expr
227
703k
    if (tnode.__isset.projections) {
228
318k
        DCHECK(tnode.__isset.output_tuple_id);
229
318k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
230
318k
    }
231
703k
    if (!tnode.intermediate_projections_list.empty()) {
232
3.82k
        DCHECK(tnode.__isset.projections) << "no final projections";
233
3.82k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
234
8.06k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
235
8.06k
            VExprContextSPtrs projections;
236
8.06k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
237
8.06k
            _intermediate_projections.push_back(projections);
238
8.06k
        }
239
3.82k
    }
240
703k
    return Status::OK();
241
703k
}
242
243
736k
Status OperatorXBase::prepare(RuntimeState* state) {
244
736k
    for (auto& conjunct : _conjuncts) {
245
450k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
246
450k
    }
247
736k
    if (state->enable_adjust_conjunct_order_by_cost()) {
248
684k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
249
606k
            return a->execute_cost() < b->execute_cost();
250
606k
        });
251
684k
    };
252
253
744k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
254
8.06k
        RETURN_IF_ERROR(
255
8.06k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
256
8.06k
    }
257
736k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
258
259
736k
    if (has_output_row_desc()) {
260
318k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
261
318k
    }
262
263
736k
    for (auto& conjunct : _conjuncts) {
264
451k
        RETURN_IF_ERROR(conjunct->open(state));
265
451k
    }
266
736k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
267
736k
    for (auto& projections : _intermediate_projections) {
268
8.06k
        RETURN_IF_ERROR(VExpr::open(projections, state));
269
8.06k
    }
270
736k
    if (_child && !is_source()) {
271
134k
        RETURN_IF_ERROR(_child->prepare(state));
272
134k
    }
273
274
736k
    if (VExpr::contains_blockable_function(_conjuncts) ||
275
736k
        VExpr::contains_blockable_function(_projections)) {
276
0
        _blockable = true;
277
0
    }
278
279
736k
    return Status::OK();
280
736k
}
281
282
6.74k
Status OperatorXBase::terminate(RuntimeState* state) {
283
6.74k
    if (_child && !is_source()) {
284
1.17k
        RETURN_IF_ERROR(_child->terminate(state));
285
1.17k
    }
286
6.74k
    auto result = state->get_local_state_result(operator_id());
287
6.74k
    if (!result) {
288
0
        return result.error();
289
0
    }
290
6.74k
    return result.value()->terminate(state);
291
6.74k
}
292
293
6.09M
Status OperatorXBase::close(RuntimeState* state) {
294
6.09M
    if (_child && !is_source()) {
295
1.06M
        RETURN_IF_ERROR(_child->close(state));
296
1.06M
    }
297
6.09M
    auto result = state->get_local_state_result(operator_id());
298
6.09M
    if (!result) {
299
0
        return result.error();
300
0
    }
301
6.09M
    return result.value()->close(state);
302
6.09M
}
303
304
269k
void PipelineXLocalStateBase::clear_origin_block() {
305
269k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
306
269k
}
307
308
613k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
309
613k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
310
311
613k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
312
613k
    return Status::OK();
313
613k
}
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
269k
                                     Block* output_block) const {
322
269k
    auto* local_state = state->get_local_state(operator_id());
323
269k
    SCOPED_TIMER(local_state->exec_time_counter());
324
269k
    SCOPED_TIMER(local_state->_projection_timer);
325
269k
    const size_t rows = origin_block->rows();
326
269k
    if (rows == 0) {
327
134k
        return Status::OK();
328
134k
    }
329
135k
    Block input_block = *origin_block;
330
331
135k
    size_t bytes_usage = 0;
332
135k
    ColumnsWithTypeAndName new_columns;
333
135k
    for (const auto& projections : local_state->_intermediate_projections) {
334
1.09k
        if (projections.empty()) {
335
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
336
0
                                         node_id());
337
0
        }
338
1.09k
        new_columns.resize(projections.size());
339
8.03k
        for (int i = 0; i < projections.size(); i++) {
340
6.94k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
341
6.94k
            if (new_columns[i].column->size() != rows) {
342
0
                return Status::InternalError(
343
0
                        "intermediate projection result column size {} not equal input rows {}, "
344
0
                        "expr: {}",
345
0
                        new_columns[i].column->size(), rows,
346
0
                        projections[i]->root()->debug_string());
347
0
            }
348
6.94k
        }
349
1.09k
        Block tmp_block {new_columns};
350
1.09k
        bytes_usage += tmp_block.allocated_bytes();
351
1.09k
        input_block.swap(tmp_block);
352
1.09k
    }
353
354
135k
    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
658k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
361
658k
        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
658k
        } else {
371
658k
            if (_keep_origin || !from->is_exclusive()) {
372
645k
                to->insert_range_from(*from, 0, rows);
373
645k
                bytes_usage += from->allocated_bytes();
374
645k
            } else {
375
12.3k
                to = from->assert_mutable();
376
12.3k
            }
377
658k
        }
378
658k
    };
379
380
135k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
381
135k
            output_block, *_output_row_descriptor);
382
135k
    auto& mutable_block = scoped_mutable_block.mutable_block();
383
135k
    auto& mutable_columns = mutable_block.mutable_columns();
384
135k
    if (rows != 0) {
385
135k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
386
793k
        for (int i = 0; i < mutable_columns.size(); ++i) {
387
658k
            ColumnPtr column_ptr;
388
658k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
389
658k
            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
658k
            column_ptr = column_ptr->convert_to_full_column_if_const();
396
658k
            bytes_usage += column_ptr->allocated_bytes();
397
658k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
398
658k
        }
399
135k
        DCHECK(mutable_block.rows() == rows);
400
135k
    }
401
135k
    local_state->_estimate_memory_usage += bytes_usage;
402
403
135k
    return Status::OK();
404
135k
}
405
406
4.88M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
407
4.88M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
408
4.88M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
409
4.88M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
410
4.88M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
411
4.88M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
412
4.88M
            if (_debug_point_count++ % 2 == 0) {
413
4.88M
                return Status::OK();
414
4.88M
            }
415
4.88M
        }
416
4.88M
    });
417
418
4.88M
    Status status;
419
4.88M
    auto* local_state = state->get_local_state(operator_id());
420
4.88M
    Defer defer([&]() {
421
4.88M
        if (status.ok()) {
422
4.88M
            local_state->update_output_block_counters(*block);
423
4.88M
        }
424
4.88M
    });
425
4.88M
    if (_output_row_descriptor) {
426
269k
        local_state->clear_origin_block();
427
269k
        status = get_block(state, &local_state->_origin_block, eos);
428
269k
        if (UNLIKELY(!status.ok())) {
429
20
            return status;
430
20
        }
431
269k
        status = do_projections(state, &local_state->_origin_block, block);
432
269k
        return status;
433
269k
    }
434
4.61M
    status = get_block(state, block, eos);
435
4.61M
    RETURN_IF_ERROR(block->check_type_and_column());
436
4.61M
    return status;
437
4.61M
}
438
439
3.18M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
440
3.18M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
441
7.07k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
442
7.07k
        *eos = true;
443
7.07k
    }
444
445
3.18M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
446
3.18M
        auto op_name = to_lower(_parent->_op_name);
447
3.18M
        auto arg_op_name = dp->param<std::string>("op_name");
448
3.18M
        arg_op_name = to_lower(arg_op_name);
449
450
3.18M
        if (op_name == arg_op_name) {
451
3.18M
            *eos = true;
452
3.18M
        }
453
3.18M
    });
454
455
3.18M
    if (auto rows = block->rows()) {
456
881k
        _num_rows_returned += rows;
457
881k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
458
881k
    }
459
3.18M
}
460
461
29.5k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
462
29.5k
    auto result = state->get_sink_local_state_result();
463
29.5k
    if (!result) {
464
0
        return result.error();
465
0
    }
466
29.5k
    return result.value()->terminate(state);
467
29.5k
}
468
469
20.5k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
470
20.5k
    fmt::memory_buffer debug_string_buffer;
471
472
20.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
473
20.5k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
474
20.5k
    return fmt::to_string(debug_string_buffer);
475
20.5k
}
476
477
20.3k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
478
20.3k
    return state->get_sink_local_state()->debug_string(indentation_level);
479
20.3k
}
480
481
456k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
482
456k
    std::string op_name = "UNKNOWN_SINK";
483
456k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
484
485
456k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
486
456k
        op_name = it->second;
487
456k
    }
488
456k
    _name = op_name + "_OPERATOR";
489
456k
    return Status::OK();
490
456k
}
491
492
192k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
493
192k
    std::string op_name = print_plan_node_type(tnode.node_type);
494
192k
    _nereids_id = tnode.nereids_id;
495
192k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
496
192k
    _name = substr + "_SINK_OPERATOR";
497
192k
    return Status::OK();
498
192k
}
499
500
template <typename LocalStateType>
501
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
502
2.08M
                                                            LocalSinkStateInfo& info) {
503
2.08M
    auto local_state = LocalStateType::create_unique(this, state);
504
2.08M
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.08M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.08M
    return Status::OK();
507
2.08M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
113k
                                                            LocalSinkStateInfo& info) {
503
113k
    auto local_state = LocalStateType::create_unique(this, state);
504
113k
    RETURN_IF_ERROR(local_state->init(state, info));
505
113k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
113k
    return Status::OK();
507
113k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
432k
                                                            LocalSinkStateInfo& info) {
503
432k
    auto local_state = LocalStateType::create_unique(this, state);
504
432k
    RETURN_IF_ERROR(local_state->init(state, info));
505
432k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
432k
    return Status::OK();
507
432k
}
_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
521
                                                            LocalSinkStateInfo& info) {
503
521
    auto local_state = LocalStateType::create_unique(this, state);
504
521
    RETURN_IF_ERROR(local_state->init(state, info));
505
521
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
521
    return Status::OK();
507
521
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
46.4k
                                                            LocalSinkStateInfo& info) {
503
46.4k
    auto local_state = LocalStateType::create_unique(this, state);
504
46.4k
    RETURN_IF_ERROR(local_state->init(state, info));
505
46.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
46.4k
    return Status::OK();
507
46.4k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
9.04k
                                                            LocalSinkStateInfo& info) {
503
9.04k
    auto local_state = LocalStateType::create_unique(this, state);
504
9.04k
    RETURN_IF_ERROR(local_state->init(state, info));
505
9.04k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
9.04k
    return Status::OK();
507
9.04k
}
_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
7.56k
                                                            LocalSinkStateInfo& info) {
503
7.56k
    auto local_state = LocalStateType::create_unique(this, state);
504
7.56k
    RETURN_IF_ERROR(local_state->init(state, info));
505
7.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
7.56k
    return Status::OK();
507
7.56k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
86
                                                            LocalSinkStateInfo& info) {
503
86
    auto local_state = LocalStateType::create_unique(this, state);
504
86
    RETURN_IF_ERROR(local_state->init(state, info));
505
86
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
86
    return Status::OK();
507
86
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
265k
                                                            LocalSinkStateInfo& info) {
503
265k
    auto local_state = LocalStateType::create_unique(this, state);
504
265k
    RETURN_IF_ERROR(local_state->init(state, info));
505
265k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
265k
    return Status::OK();
507
265k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
30
                                                            LocalSinkStateInfo& info) {
503
30
    auto local_state = LocalStateType::create_unique(this, state);
504
30
    RETURN_IF_ERROR(local_state->init(state, info));
505
30
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
30
    return Status::OK();
507
30
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
324k
                                                            LocalSinkStateInfo& info) {
503
324k
    auto local_state = LocalStateType::create_unique(this, state);
504
324k
    RETURN_IF_ERROR(local_state->init(state, info));
505
324k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
324k
    return Status::OK();
507
324k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
152k
                                                            LocalSinkStateInfo& info) {
503
152k
    auto local_state = LocalStateType::create_unique(this, state);
504
152k
    RETURN_IF_ERROR(local_state->init(state, info));
505
152k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
152k
    return Status::OK();
507
152k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
295
                                                            LocalSinkStateInfo& info) {
503
295
    auto local_state = LocalStateType::create_unique(this, state);
504
295
    RETURN_IF_ERROR(local_state->init(state, info));
505
295
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
295
    return Status::OK();
507
295
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
219
                                                            LocalSinkStateInfo& info) {
503
219
    auto local_state = LocalStateType::create_unique(this, state);
504
219
    RETURN_IF_ERROR(local_state->init(state, info));
505
219
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
219
    return Status::OK();
507
219
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
688k
                                                            LocalSinkStateInfo& info) {
503
688k
    auto local_state = LocalStateType::create_unique(this, state);
504
688k
    RETURN_IF_ERROR(local_state->init(state, info));
505
688k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
688k
    return Status::OK();
507
688k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
10.6k
                                                            LocalSinkStateInfo& info) {
503
10.6k
    auto local_state = LocalStateType::create_unique(this, state);
504
10.6k
    RETURN_IF_ERROR(local_state->init(state, info));
505
10.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
10.6k
    return Status::OK();
507
10.6k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
6.25k
                                                            LocalSinkStateInfo& info) {
503
6.25k
    auto local_state = LocalStateType::create_unique(this, state);
504
6.25k
    RETURN_IF_ERROR(local_state->init(state, info));
505
6.25k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
6.25k
    return Status::OK();
507
6.25k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
3.55k
                                                            LocalSinkStateInfo& info) {
503
3.55k
    auto local_state = LocalStateType::create_unique(this, state);
504
3.55k
    RETURN_IF_ERROR(local_state->init(state, info));
505
3.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
3.55k
    return Status::OK();
507
3.55k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
530
                                                            LocalSinkStateInfo& info) {
503
530
    auto local_state = LocalStateType::create_unique(this, state);
504
530
    RETURN_IF_ERROR(local_state->init(state, info));
505
530
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
530
    return Status::OK();
507
530
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
4.52k
                                                            LocalSinkStateInfo& info) {
503
4.52k
    auto local_state = LocalStateType::create_unique(this, state);
504
4.52k
    RETURN_IF_ERROR(local_state->init(state, info));
505
4.52k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
4.52k
    return Status::OK();
507
4.52k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.42k
                                                            LocalSinkStateInfo& info) {
503
2.42k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.42k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.42k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.42k
    return Status::OK();
507
2.42k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.39k
                                                            LocalSinkStateInfo& info) {
503
2.39k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.39k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.39k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.39k
    return Status::OK();
507
2.39k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.40k
                                                            LocalSinkStateInfo& info) {
503
2.40k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.40k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.40k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.40k
    return Status::OK();
507
2.40k
}
_ZN5doris17DataSinkOperatorXINS_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
166
                                                            LocalSinkStateInfo& info) {
503
166
    auto local_state = LocalStateType::create_unique(this, state);
504
166
    RETURN_IF_ERROR(local_state->init(state, info));
505
166
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
166
    return Status::OK();
507
166
}
_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
105
                                                            LocalSinkStateInfo& info) {
503
105
    auto local_state = LocalStateType::create_unique(this, state);
504
105
    RETURN_IF_ERROR(local_state->init(state, info));
505
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
105
    return Status::OK();
507
105
}
_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.72M
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.72M
    } else {
518
1.72M
        auto ss = LocalStateType::SharedStateType::create_shared();
519
1.72M
        ss->id = operator_id();
520
1.72M
        for (auto& dest : dests_id()) {
521
1.72M
            ss->related_op_ids.insert(dest);
522
1.72M
        }
523
1.72M
        return ss;
524
1.72M
    }
525
1.72M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
95.7k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
95.7k
    } else {
518
95.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
95.7k
        ss->id = operator_id();
520
95.7k
        for (auto& dest : dests_id()) {
521
95.7k
            ss->related_op_ids.insert(dest);
522
95.7k
        }
523
95.7k
        return ss;
524
95.7k
    }
525
95.7k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
433k
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
433k
    } else {
518
433k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
433k
        ss->id = operator_id();
520
433k
        for (auto& dest : dests_id()) {
521
432k
            ss->related_op_ids.insert(dest);
522
432k
        }
523
433k
        return ss;
524
433k
    }
525
433k
}
_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
521
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
521
    } else {
518
521
        auto ss = LocalStateType::SharedStateType::create_shared();
519
521
        ss->id = operator_id();
520
521
        for (auto& dest : dests_id()) {
521
521
            ss->related_op_ids.insert(dest);
522
521
        }
523
521
        return ss;
524
521
    }
525
521
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
46.3k
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
46.3k
    } else {
518
46.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
46.3k
        ss->id = operator_id();
520
46.3k
        for (auto& dest : dests_id()) {
521
46.2k
            ss->related_op_ids.insert(dest);
522
46.2k
        }
523
46.3k
        return ss;
524
46.3k
    }
525
46.3k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
510
9.04k
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.04k
    } else {
518
9.04k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
9.04k
        ss->id = operator_id();
520
9.04k
        for (auto& dest : dests_id()) {
521
9.04k
            ss->related_op_ids.insert(dest);
522
9.04k
        }
523
9.04k
        return ss;
524
9.04k
    }
525
9.04k
}
_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.37k
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.37k
    } else {
518
3.37k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
3.37k
        ss->id = operator_id();
520
3.37k
        for (auto& dest : dests_id()) {
521
3.37k
            ss->related_op_ids.insert(dest);
522
3.37k
        }
523
3.37k
        return ss;
524
3.37k
    }
525
3.37k
}
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
7.56k
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
7.56k
    } else {
518
7.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
7.56k
        ss->id = operator_id();
520
7.56k
        for (auto& dest : dests_id()) {
521
7.55k
            ss->related_op_ids.insert(dest);
522
7.55k
        }
523
7.56k
        return ss;
524
7.56k
    }
525
7.56k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
86
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
86
    } else {
518
86
        auto ss = LocalStateType::SharedStateType::create_shared();
519
86
        ss->id = operator_id();
520
86
        for (auto& dest : dests_id()) {
521
86
            ss->related_op_ids.insert(dest);
522
86
        }
523
86
        return ss;
524
86
    }
525
86
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
265k
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
265k
    } else {
518
265k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
265k
        ss->id = operator_id();
520
265k
        for (auto& dest : dests_id()) {
521
265k
            ss->related_op_ids.insert(dest);
522
265k
        }
523
265k
        return ss;
524
265k
    }
525
265k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
32
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
32
    } else {
518
32
        auto ss = LocalStateType::SharedStateType::create_shared();
519
32
        ss->id = operator_id();
520
32
        for (auto& dest : dests_id()) {
521
32
            ss->related_op_ids.insert(dest);
522
32
        }
523
32
        return ss;
524
32
    }
525
32
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
152k
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
152k
    } else {
518
152k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
152k
        ss->id = operator_id();
520
152k
        for (auto& dest : dests_id()) {
521
152k
            ss->related_op_ids.insert(dest);
522
152k
        }
523
152k
        return ss;
524
152k
    }
525
152k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
218
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
218
    } else {
518
218
        auto ss = LocalStateType::SharedStateType::create_shared();
519
218
        ss->id = operator_id();
520
218
        for (auto& dest : dests_id()) {
521
218
            ss->related_op_ids.insert(dest);
522
218
        }
523
218
        return ss;
524
218
    }
525
218
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
688k
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
688k
    } else {
518
688k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
688k
        ss->id = operator_id();
520
688k
        for (auto& dest : dests_id()) {
521
686k
            ss->related_op_ids.insert(dest);
522
686k
        }
523
688k
        return ss;
524
688k
    }
525
688k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
10.6k
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
10.6k
    } else {
518
10.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
10.6k
        ss->id = operator_id();
520
10.6k
        for (auto& dest : dests_id()) {
521
10.6k
            ss->related_op_ids.insert(dest);
522
10.6k
        }
523
10.6k
        return ss;
524
10.6k
    }
525
10.6k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
639
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
639
    } else {
518
639
        auto ss = LocalStateType::SharedStateType::create_shared();
519
639
        ss->id = operator_id();
520
639
        for (auto& dest : dests_id()) {
521
636
            ss->related_op_ids.insert(dest);
522
636
        }
523
639
        return ss;
524
639
    }
525
639
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
510
2.39k
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.39k
    } else {
518
2.39k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.39k
        ss->id = operator_id();
520
2.39k
        for (auto& dest : dests_id()) {
521
2.38k
            ss->related_op_ids.insert(dest);
522
2.38k
        }
523
2.39k
        return ss;
524
2.39k
    }
525
2.39k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
510
2.43k
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.43k
    } else {
518
2.43k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.43k
        ss->id = operator_id();
520
2.43k
        for (auto& dest : dests_id()) {
521
2.41k
            ss->related_op_ids.insert(dest);
522
2.41k
        }
523
2.43k
        return ss;
524
2.43k
    }
525
2.43k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
166
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
166
    } else {
518
166
        auto ss = LocalStateType::SharedStateType::create_shared();
519
166
        ss->id = operator_id();
520
166
        for (auto& dest : dests_id()) {
521
166
            ss->related_op_ids.insert(dest);
522
166
        }
523
166
        return ss;
524
166
    }
525
166
}
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.54M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.54M
    auto local_state = LocalStateType::create_unique(state, this);
530
2.54M
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.54M
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.54M
    return Status::OK();
533
2.54M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
65.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
65.5k
    auto local_state = LocalStateType::create_unique(state, this);
530
65.5k
    RETURN_IF_ERROR(local_state->init(state, info));
531
65.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
65.5k
    return Status::OK();
533
65.5k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
298k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
298k
    auto local_state = LocalStateType::create_unique(state, this);
530
298k
    RETURN_IF_ERROR(local_state->init(state, info));
531
298k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
298k
    return Status::OK();
533
298k
}
_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.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
33.9k
    auto local_state = LocalStateType::create_unique(state, this);
530
33.9k
    RETURN_IF_ERROR(local_state->init(state, info));
531
33.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
33.9k
    return Status::OK();
533
33.9k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
7.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
7.45k
    auto local_state = LocalStateType::create_unique(state, this);
530
7.45k
    RETURN_IF_ERROR(local_state->init(state, info));
531
7.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
7.45k
    return Status::OK();
533
7.45k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
7.99k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
7.99k
    auto local_state = LocalStateType::create_unique(state, this);
530
7.99k
    RETURN_IF_ERROR(local_state->init(state, info));
531
7.99k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
7.99k
    return Status::OK();
533
7.99k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
24
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
24
    auto local_state = LocalStateType::create_unique(state, this);
530
24
    RETURN_IF_ERROR(local_state->init(state, info));
531
24
    state->emplace_local_state(operator_id(), std::move(local_state));
532
24
    return Status::OK();
533
24
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
256k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
256k
    auto local_state = LocalStateType::create_unique(state, this);
530
256k
    RETURN_IF_ERROR(local_state->init(state, info));
531
256k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
256k
    return Status::OK();
533
256k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
152k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
152k
    auto local_state = LocalStateType::create_unique(state, this);
530
152k
    RETURN_IF_ERROR(local_state->init(state, info));
531
152k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
152k
    return Status::OK();
533
152k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
370
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
370
    auto local_state = LocalStateType::create_unique(state, this);
530
370
    RETURN_IF_ERROR(local_state->init(state, info));
531
370
    state->emplace_local_state(operator_id(), std::move(local_state));
532
370
    return Status::OK();
533
370
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
209
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
209
    auto local_state = LocalStateType::create_unique(state, this);
530
209
    RETURN_IF_ERROR(local_state->init(state, info));
531
209
    state->emplace_local_state(operator_id(), std::move(local_state));
532
209
    return Status::OK();
533
209
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
4.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.39k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.39k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.39k
    return Status::OK();
533
4.39k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
379k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
379k
    auto local_state = LocalStateType::create_unique(state, this);
530
379k
    RETURN_IF_ERROR(local_state->init(state, info));
531
379k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
379k
    return Status::OK();
533
379k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.22k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.22k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.22k
    return Status::OK();
533
1.22k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
10.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
10.6k
    auto local_state = LocalStateType::create_unique(state, this);
530
10.6k
    RETURN_IF_ERROR(local_state->init(state, info));
531
10.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
10.6k
    return Status::OK();
533
10.6k
}
_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.70k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.70k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.70k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.70k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.70k
    return Status::OK();
533
1.70k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
55.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
55.3k
    auto local_state = LocalStateType::create_unique(state, this);
530
55.3k
    RETURN_IF_ERROR(local_state->init(state, info));
531
55.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
55.3k
    return Status::OK();
533
55.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_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_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
526
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
526
    auto local_state = LocalStateType::create_unique(state, this);
530
526
    RETURN_IF_ERROR(local_state->init(state, info));
531
526
    state->emplace_local_state(operator_id(), std::move(local_state));
532
526
    return Status::OK();
533
526
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.41k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.41k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.41k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.41k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.41k
    return Status::OK();
533
2.41k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.42k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.42k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.42k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.42k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.42k
    return Status::OK();
533
2.42k
}
_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.06k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.06k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.06k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.06k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.06k
    return Status::OK();
533
2.06k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
6.86k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
6.86k
    auto local_state = LocalStateType::create_unique(state, this);
530
6.86k
    RETURN_IF_ERROR(local_state->init(state, info));
531
6.86k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
6.86k
    return Status::OK();
533
6.86k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
788k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
788k
    auto local_state = LocalStateType::create_unique(state, this);
530
788k
    RETURN_IF_ERROR(local_state->init(state, info));
531
788k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
788k
    return Status::OK();
533
788k
}
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.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.59k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.59k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.59k
    return Status::OK();
533
1.59k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.87k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.87k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.87k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.87k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.87k
    return Status::OK();
533
2.87k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
9.89k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
9.89k
    auto local_state = LocalStateType::create_unique(state, this);
530
9.89k
    RETURN_IF_ERROR(local_state->init(state, info));
531
9.89k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
9.89k
    return Status::OK();
533
9.89k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
436k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
436k
    auto local_state = LocalStateType::create_unique(state, this);
530
436k
    RETURN_IF_ERROR(local_state->init(state, info));
531
436k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
436k
    return Status::OK();
533
436k
}
534
535
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
536
                                                         RuntimeState* state)
537
2.08M
        : _parent(parent), _state(state) {}
538
539
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
540
2.54M
        : _num_rows_returned(0),
541
2.54M
          _rows_returned_counter(nullptr),
542
2.54M
          _parent(parent),
543
2.54M
          _state(state),
544
2.54M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
545
546
template <typename SharedStateArg>
547
2.54M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
2.54M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
2.54M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
2.54M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
2.54M
    _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.54M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
2.54M
    _operator_profile->add_child(_common_profile.get(), true);
556
2.54M
    _operator_profile->add_child(_custom_profile.get(), true);
557
2.54M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
2.54M
    if constexpr (!is_fake_shared) {
559
1.36M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
807k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
807k
                                    .first.get()
562
807k
                                    ->template cast<SharedStateArg>();
563
564
807k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
807k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
807k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
807k
        } else if (info.shared_state) {
568
495k
            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
495k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
495k
            _dependency = _shared_state->create_source_dependency(
575
495k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
495k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
495k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
495k
        } else {
579
62.9k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
3.25k
                DCHECK(false);
581
3.25k
            }
582
62.9k
        }
583
1.36M
    }
584
585
2.54M
    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.54M
    _rows_returned_counter =
590
2.54M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
2.54M
    _blocks_returned_counter =
592
2.54M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
2.54M
    _output_block_bytes_counter =
594
2.54M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
2.54M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
2.54M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
2.54M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
2.54M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
2.54M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
2.54M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
2.54M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
2.54M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
2.54M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
2.54M
    _memory_used_counter =
605
2.54M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
2.54M
    _common_profile->add_info_string("IsColocate",
607
2.54M
                                     std::to_string(_parent->is_colocated_operator()));
608
2.54M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
2.54M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
2.54M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
2.54M
    return Status::OK();
612
2.54M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
65.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
65.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
65.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
65.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
65.7k
    _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
65.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
65.7k
    _operator_profile->add_child(_common_profile.get(), true);
556
65.7k
    _operator_profile->add_child(_custom_profile.get(), true);
557
65.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
65.7k
    if constexpr (!is_fake_shared) {
559
65.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
17.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
17.9k
                                    .first.get()
562
17.9k
                                    ->template cast<SharedStateArg>();
563
564
17.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
17.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
17.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
47.7k
        } 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
47.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
47.5k
            _dependency = _shared_state->create_source_dependency(
575
47.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
47.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
47.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
47.5k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
234
        }
583
65.7k
    }
584
585
65.7k
    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
65.7k
    _rows_returned_counter =
590
65.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
65.7k
    _blocks_returned_counter =
592
65.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
65.7k
    _output_block_bytes_counter =
594
65.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
65.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
65.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
65.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
65.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
65.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
65.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
65.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
65.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
65.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
65.7k
    _memory_used_counter =
605
65.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
65.7k
    _common_profile->add_info_string("IsColocate",
607
65.7k
                                     std::to_string(_parent->is_colocated_operator()));
608
65.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
65.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
65.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
65.7k
    return Status::OK();
612
65.7k
}
_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
265k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
265k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
265k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
265k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
265k
    _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
265k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
265k
    _operator_profile->add_child(_common_profile.get(), true);
556
265k
    _operator_profile->add_child(_custom_profile.get(), true);
557
265k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
265k
    if constexpr (!is_fake_shared) {
559
265k
        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
265k
        } 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
259k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
259k
            _dependency = _shared_state->create_source_dependency(
575
259k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
259k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
259k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
259k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
5.62k
        }
583
265k
    }
584
585
265k
    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
265k
    _rows_returned_counter =
590
265k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
265k
    _blocks_returned_counter =
592
265k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
265k
    _output_block_bytes_counter =
594
265k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
265k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
265k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
265k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
265k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
265k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
265k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
265k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
265k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
265k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
265k
    _memory_used_counter =
605
265k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
265k
    _common_profile->add_info_string("IsColocate",
607
265k
                                     std::to_string(_parent->is_colocated_operator()));
608
265k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
265k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
265k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
265k
    return Status::OK();
612
265k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
24
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
24
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
24
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
24
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
24
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
24
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
24
    _operator_profile->add_child(_common_profile.get(), true);
556
24
    _operator_profile->add_child(_custom_profile.get(), true);
557
24
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
24
    if constexpr (!is_fake_shared) {
559
24
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
24
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
24
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
24
            _dependency = _shared_state->create_source_dependency(
575
24
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
24
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
24
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
24
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
24
    }
584
585
24
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
24
    _rows_returned_counter =
590
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
24
    _blocks_returned_counter =
592
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
24
    _output_block_bytes_counter =
594
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
24
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
24
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
24
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
24
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
24
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
24
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
24
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
24
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
24
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
24
    _memory_used_counter =
605
24
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
24
    _common_profile->add_info_string("IsColocate",
607
24
                                     std::to_string(_parent->is_colocated_operator()));
608
24
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
24
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
24
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
24
    return Status::OK();
612
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
10.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
10.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
10.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
10.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
10.6k
    _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
10.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
10.6k
    _operator_profile->add_child(_common_profile.get(), true);
556
10.6k
    _operator_profile->add_child(_custom_profile.get(), true);
557
10.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
10.6k
    if constexpr (!is_fake_shared) {
559
10.6k
        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
10.6k
        } 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
10.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
10.6k
            _dependency = _shared_state->create_source_dependency(
575
10.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
10.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
10.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
10.6k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
42
        }
583
10.6k
    }
584
585
10.6k
    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
10.6k
    _rows_returned_counter =
590
10.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
10.6k
    _blocks_returned_counter =
592
10.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
10.6k
    _output_block_bytes_counter =
594
10.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
10.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
10.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
10.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
10.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
10.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
10.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
10.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
10.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
10.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
10.6k
    _memory_used_counter =
605
10.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
10.6k
    _common_profile->add_info_string("IsColocate",
607
10.6k
                                     std::to_string(_parent->is_colocated_operator()));
608
10.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
10.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
10.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
10.6k
    return Status::OK();
612
10.6k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
7.53k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
7.53k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
7.53k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
7.53k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
7.53k
    _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
7.53k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
7.53k
    _operator_profile->add_child(_common_profile.get(), true);
556
7.53k
    _operator_profile->add_child(_custom_profile.get(), true);
557
7.53k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
7.53k
    if constexpr (!is_fake_shared) {
559
7.53k
        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
7.53k
        } 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
7.26k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
7.26k
            _dependency = _shared_state->create_source_dependency(
575
7.26k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
7.26k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
7.26k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
7.26k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
270
        }
583
7.53k
    }
584
585
7.53k
    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
7.53k
    _rows_returned_counter =
590
7.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
7.53k
    _blocks_returned_counter =
592
7.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
7.53k
    _output_block_bytes_counter =
594
7.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
7.53k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
7.53k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
7.53k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
7.53k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
7.53k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
7.53k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
7.53k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
7.53k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
7.53k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
7.53k
    _memory_used_counter =
605
7.53k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
7.53k
    _common_profile->add_info_string("IsColocate",
607
7.53k
                                     std::to_string(_parent->is_colocated_operator()));
608
7.53k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
7.53k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
7.53k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
7.53k
    return Status::OK();
612
7.53k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
152k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
152k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
152k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
152k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
152k
    _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
152k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
152k
    _operator_profile->add_child(_common_profile.get(), true);
556
152k
    _operator_profile->add_child(_custom_profile.get(), true);
557
152k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
152k
    if constexpr (!is_fake_shared) {
559
152k
        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
152k
        } 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
151k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
151k
            _dependency = _shared_state->create_source_dependency(
575
151k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
151k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
151k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
151k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
1.11k
        }
583
152k
    }
584
585
152k
    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
152k
    _rows_returned_counter =
590
152k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
152k
    _blocks_returned_counter =
592
152k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
152k
    _output_block_bytes_counter =
594
152k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
152k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
152k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
152k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
152k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
152k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
152k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
152k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
152k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
152k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
152k
    _memory_used_counter =
605
152k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
152k
    _common_profile->add_info_string("IsColocate",
607
152k
                                     std::to_string(_parent->is_colocated_operator()));
608
152k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
152k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
152k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
152k
    return Status::OK();
612
152k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
371
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
371
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
371
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
371
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
371
    _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
371
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
371
    _operator_profile->add_child(_common_profile.get(), true);
556
371
    _operator_profile->add_child(_custom_profile.get(), true);
557
371
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
371
    if constexpr (!is_fake_shared) {
559
371
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
362
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
362
                                    .first.get()
562
362
                                    ->template cast<SharedStateArg>();
563
564
362
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
362
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
362
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
362
        } 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
9
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
9
        }
583
371
    }
584
585
371
    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
371
    _rows_returned_counter =
590
371
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
371
    _blocks_returned_counter =
592
371
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
371
    _output_block_bytes_counter =
594
371
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
371
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
371
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
371
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
371
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
371
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
371
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
371
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
371
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
371
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
371
    _memory_used_counter =
605
371
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
371
    _common_profile->add_info_string("IsColocate",
607
371
                                     std::to_string(_parent->is_colocated_operator()));
608
371
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
371
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
371
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
371
    return Status::OK();
612
371
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
209
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
209
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
209
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
209
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
209
    _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
209
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
209
    _operator_profile->add_child(_common_profile.get(), true);
556
209
    _operator_profile->add_child(_custom_profile.get(), true);
557
209
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
209
    if constexpr (!is_fake_shared) {
559
209
        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
209
        } 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
209
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
209
            _dependency = _shared_state->create_source_dependency(
575
209
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
209
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
209
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
209
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
209
    }
584
585
209
    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
209
    _rows_returned_counter =
590
209
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
209
    _blocks_returned_counter =
592
209
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
209
    _output_block_bytes_counter =
594
209
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
209
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
209
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
209
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
209
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
209
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
209
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
209
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
209
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
209
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
209
    _memory_used_counter =
605
209
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
209
    _common_profile->add_info_string("IsColocate",
607
209
                                     std::to_string(_parent->is_colocated_operator()));
608
209
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
209
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
209
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
209
    return Status::OK();
612
209
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
1.18M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
1.18M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
1.18M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
1.18M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
1.18M
    _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.18M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
1.18M
    _operator_profile->add_child(_common_profile.get(), true);
556
1.18M
    _operator_profile->add_child(_custom_profile.get(), true);
557
1.18M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
    if constexpr (!is_fake_shared) {
559
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
                                    .first.get()
562
                                    ->template cast<SharedStateArg>();
563
564
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
            _dependency = _shared_state->create_source_dependency(
575
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
        }
583
    }
584
585
1.18M
    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.18M
    _rows_returned_counter =
590
1.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
1.18M
    _blocks_returned_counter =
592
1.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
1.18M
    _output_block_bytes_counter =
594
1.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
1.18M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
1.18M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1.18M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1.18M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1.18M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
1.18M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
1.18M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
1.18M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
1.18M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
1.18M
    _memory_used_counter =
605
1.18M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
1.18M
    _common_profile->add_info_string("IsColocate",
607
1.18M
                                     std::to_string(_parent->is_colocated_operator()));
608
1.18M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
1.18M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
1.18M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
1.18M
    return Status::OK();
612
1.18M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
55.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
55.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
55.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
55.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
55.3k
    _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.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
55.3k
    _operator_profile->add_child(_common_profile.get(), true);
556
55.3k
    _operator_profile->add_child(_custom_profile.get(), true);
557
55.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
55.3k
    if constexpr (!is_fake_shared) {
559
55.3k
        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.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
2.95k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
2.95k
            _dependency = _shared_state->create_source_dependency(
575
2.95k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
2.95k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
2.95k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
52.3k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
52.3k
        }
583
55.3k
    }
584
585
55.3k
    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.3k
    _rows_returned_counter =
590
55.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
55.3k
    _blocks_returned_counter =
592
55.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
55.3k
    _output_block_bytes_counter =
594
55.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
55.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
55.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
55.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
55.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
55.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
55.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
55.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
55.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
55.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
55.3k
    _memory_used_counter =
605
55.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
55.3k
    _common_profile->add_info_string("IsColocate",
607
55.3k
                                     std::to_string(_parent->is_colocated_operator()));
608
55.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
55.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
55.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
55.3k
    return Status::OK();
612
55.3k
}
_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
10.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
10.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
10.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
10.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
10.0k
    _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
10.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
10.0k
    _operator_profile->add_child(_common_profile.get(), true);
556
10.0k
    _operator_profile->add_child(_custom_profile.get(), true);
557
10.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
10.0k
    if constexpr (!is_fake_shared) {
559
10.0k
        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
10.0k
        } 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
10.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
10.0k
            _dependency = _shared_state->create_source_dependency(
575
10.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
10.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
10.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
10.0k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
5
        }
583
10.0k
    }
584
585
10.0k
    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
10.0k
    _rows_returned_counter =
590
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
10.0k
    _blocks_returned_counter =
592
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
10.0k
    _output_block_bytes_counter =
594
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
10.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
10.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
10.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
10.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
10.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
10.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
10.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
10.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
10.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
10.0k
    _memory_used_counter =
605
10.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
10.0k
    _common_profile->add_info_string("IsColocate",
607
10.0k
                                     std::to_string(_parent->is_colocated_operator()));
608
10.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
10.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
10.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
10.0k
    return Status::OK();
612
10.0k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
638
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
638
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
638
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
638
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
638
    _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
638
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
638
    _operator_profile->add_child(_common_profile.get(), true);
556
638
    _operator_profile->add_child(_custom_profile.get(), true);
557
638
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
638
    if constexpr (!is_fake_shared) {
559
638
        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
638
        } 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
626
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
626
            _dependency = _shared_state->create_source_dependency(
575
626
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
626
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
626
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
626
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
12
        }
583
638
    }
584
585
638
    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
638
    _rows_returned_counter =
590
638
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
638
    _blocks_returned_counter =
592
638
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
638
    _output_block_bytes_counter =
594
638
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
638
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
638
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
638
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
638
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
638
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
638
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
638
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
638
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
638
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
638
    _memory_used_counter =
605
638
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
638
    _common_profile->add_info_string("IsColocate",
607
638
                                     std::to_string(_parent->is_colocated_operator()));
608
638
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
638
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
638
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
638
    return Status::OK();
612
638
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
4.85k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
4.85k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
4.85k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
4.85k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
4.85k
    _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.85k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
4.85k
    _operator_profile->add_child(_common_profile.get(), true);
556
4.85k
    _operator_profile->add_child(_custom_profile.get(), true);
557
4.85k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
4.85k
    if constexpr (!is_fake_shared) {
559
4.85k
        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.85k
        } 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.83k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
4.83k
            _dependency = _shared_state->create_source_dependency(
575
4.83k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
4.83k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
4.83k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
4.83k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
25
        }
583
4.85k
    }
584
585
4.85k
    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.85k
    _rows_returned_counter =
590
4.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
4.85k
    _blocks_returned_counter =
592
4.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
4.85k
    _output_block_bytes_counter =
594
4.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
4.85k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
4.85k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
4.85k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
4.85k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
4.85k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
4.85k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
4.85k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
4.85k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
4.85k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
4.85k
    _memory_used_counter =
605
4.85k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
4.85k
    _common_profile->add_info_string("IsColocate",
607
4.85k
                                     std::to_string(_parent->is_colocated_operator()));
608
4.85k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
4.85k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
4.85k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
4.85k
    return Status::OK();
612
4.85k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
792k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
792k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
792k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
792k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
792k
    _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
792k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
792k
    _operator_profile->add_child(_common_profile.get(), true);
556
792k
    _operator_profile->add_child(_custom_profile.get(), true);
557
792k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
792k
    if constexpr (!is_fake_shared) {
559
792k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
788k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
788k
                                    .first.get()
562
788k
                                    ->template cast<SharedStateArg>();
563
564
788k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
788k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
788k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
788k
        } 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
3.25k
        } else {
579
3.25k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
3.25k
                DCHECK(false);
581
3.25k
            }
582
3.25k
        }
583
792k
    }
584
585
792k
    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
792k
    _rows_returned_counter =
590
792k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
792k
    _blocks_returned_counter =
592
792k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
792k
    _output_block_bytes_counter =
594
792k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
792k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
792k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
792k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
792k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
792k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
792k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
792k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
792k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
792k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
792k
    _memory_used_counter =
605
792k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
792k
    _common_profile->add_info_string("IsColocate",
607
792k
                                     std::to_string(_parent->is_colocated_operator()));
608
792k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
792k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
792k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
792k
    return Status::OK();
612
792k
}
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.55M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
2.55M
    _conjuncts.resize(_parent->_conjuncts.size());
617
2.55M
    _projections.resize(_parent->_projections.size());
618
3.05M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
502k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
502k
    }
621
5.21M
    for (size_t i = 0; i < _projections.size(); i++) {
622
2.66M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
2.66M
    }
624
2.55M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
2.56M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
11.3k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
76.5k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
65.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
65.2k
                    state, _intermediate_projections[i][j]));
630
65.2k
        }
631
11.3k
    }
632
2.55M
    return Status::OK();
633
2.55M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
65.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
65.7k
    _conjuncts.resize(_parent->_conjuncts.size());
617
65.7k
    _projections.resize(_parent->_projections.size());
618
66.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
937
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
937
    }
621
322k
    for (size_t i = 0; i < _projections.size(); i++) {
622
256k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
256k
    }
624
65.7k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
67.2k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
1.47k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
16.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
15.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
15.2k
                    state, _intermediate_projections[i][j]));
630
15.2k
        }
631
1.47k
    }
632
65.7k
    return Status::OK();
633
65.7k
}
_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
266k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
266k
    _conjuncts.resize(_parent->_conjuncts.size());
617
266k
    _projections.resize(_parent->_projections.size());
618
266k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
266k
    for (size_t i = 0; i < _projections.size(); i++) {
622
355
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
355
    }
624
266k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
266k
    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
266k
    return Status::OK();
633
266k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
24
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
24
    _conjuncts.resize(_parent->_conjuncts.size());
617
24
    _projections.resize(_parent->_projections.size());
618
24
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
24
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
24
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
24
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
24
    return Status::OK();
633
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
10.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
10.6k
    _conjuncts.resize(_parent->_conjuncts.size());
617
10.6k
    _projections.resize(_parent->_projections.size());
618
10.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
89
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
89
    }
621
67.9k
    for (size_t i = 0; i < _projections.size(); i++) {
622
57.2k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
57.2k
    }
624
10.6k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
10.8k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
148
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
933
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
785
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
785
                    state, _intermediate_projections[i][j]));
630
785
        }
631
148
    }
632
10.6k
    return Status::OK();
633
10.6k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
7.60k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
7.60k
    _conjuncts.resize(_parent->_conjuncts.size());
617
7.60k
    _projections.resize(_parent->_projections.size());
618
8.33k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
734
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
734
    }
621
20.4k
    for (size_t i = 0; i < _projections.size(); i++) {
622
12.8k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
12.8k
    }
624
7.60k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
7.69k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
89
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
674
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
585
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
585
                    state, _intermediate_projections[i][j]));
630
585
        }
631
89
    }
632
7.60k
    return Status::OK();
633
7.60k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
152k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
152k
    _conjuncts.resize(_parent->_conjuncts.size());
617
152k
    _projections.resize(_parent->_projections.size());
618
156k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
4.31k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
4.31k
    }
621
412k
    for (size_t i = 0; i < _projections.size(); i++) {
622
259k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
259k
    }
624
152k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
152k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
276
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
2.04k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
1.77k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
1.77k
                    state, _intermediate_projections[i][j]));
630
1.77k
        }
631
276
    }
632
152k
    return Status::OK();
633
152k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
372
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
372
    _conjuncts.resize(_parent->_conjuncts.size());
617
372
    _projections.resize(_parent->_projections.size());
618
388
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
16
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
16
    }
621
1.37k
    for (size_t i = 0; i < _projections.size(); i++) {
622
999
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
999
    }
624
372
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
372
    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
372
    return Status::OK();
633
372
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
213
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
213
    _conjuncts.resize(_parent->_conjuncts.size());
617
213
    _projections.resize(_parent->_projections.size());
618
213
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
601
    for (size_t i = 0; i < _projections.size(); i++) {
622
388
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
388
    }
624
213
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
213
    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
213
    return Status::OK();
633
213
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
1.18M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
1.18M
    _conjuncts.resize(_parent->_conjuncts.size());
617
1.18M
    _projections.resize(_parent->_projections.size());
618
1.67M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
492k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
492k
    }
621
3.16M
    for (size_t i = 0; i < _projections.size(); i++) {
622
1.97M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
1.97M
    }
624
1.18M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
1.19M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
9.33k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
56.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
46.8k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
46.8k
                    state, _intermediate_projections[i][j]));
630
46.8k
        }
631
9.33k
    }
632
1.18M
    return Status::OK();
633
1.18M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
55.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
55.4k
    _conjuncts.resize(_parent->_conjuncts.size());
617
55.4k
    _projections.resize(_parent->_projections.size());
618
55.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
150k
    for (size_t i = 0; i < _projections.size(); i++) {
622
95.2k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
95.2k
    }
624
55.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
55.4k
    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.4k
    return Status::OK();
633
55.4k
}
_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
10.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
10.0k
    _conjuncts.resize(_parent->_conjuncts.size());
617
10.0k
    _projections.resize(_parent->_projections.size());
618
13.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
3.81k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
3.81k
    }
621
10.0k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
10.0k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
10.0k
    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
10.0k
    return Status::OK();
633
10.0k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
640
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
640
    _conjuncts.resize(_parent->_conjuncts.size());
617
640
    _projections.resize(_parent->_projections.size());
618
640
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
640
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
640
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
640
    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
640
    return Status::OK();
633
640
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
4.85k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
4.85k
    _conjuncts.resize(_parent->_conjuncts.size());
617
4.85k
    _projections.resize(_parent->_projections.size());
618
4.85k
    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.85k
    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.85k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
4.85k
    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.85k
    return Status::OK();
633
4.85k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
793k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
793k
    _conjuncts.resize(_parent->_conjuncts.size());
617
793k
    _projections.resize(_parent->_projections.size());
618
793k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
793k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
793k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
793k
    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
793k
    return Status::OK();
633
793k
}
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.74k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
6.74k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
6.74k
    _terminated = true;
641
6.74k
    return Status::OK();
642
6.74k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
281
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
281
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
281
    _terminated = true;
641
281
    return Status::OK();
642
281
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
118
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
118
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
118
    _terminated = true;
641
118
    return Status::OK();
642
118
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
80
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
80
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
80
    _terminated = true;
641
80
    return Status::OK();
642
80
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
114
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
114
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
114
    _terminated = true;
641
114
    return Status::OK();
642
114
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
4.81k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
4.81k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
4.81k
    _terminated = true;
641
4.81k
    return Status::OK();
642
4.81k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
18
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
18
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
18
    _terminated = true;
641
18
    return Status::OK();
642
18
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
11
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
11
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
11
    _terminated = true;
641
11
    return Status::OK();
642
11
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
1.28k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
1.28k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
1.28k
    _terminated = true;
641
1.28k
    return Status::OK();
642
1.28k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
14
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
14
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
14
    _terminated = true;
641
14
    return Status::OK();
642
14
}
643
644
template <typename SharedStateArg>
645
2.85M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
2.85M
    if (_closed) {
647
296k
        return Status::OK();
648
296k
    }
649
2.55M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
1.36M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
1.36M
    }
652
2.55M
    _closed = true;
653
2.55M
    return Status::OK();
654
2.85M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
65.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
65.7k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
65.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
65.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
65.7k
    }
652
65.7k
    _closed = true;
653
65.7k
    return Status::OK();
654
65.7k
}
_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
529k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
529k
    if (_closed) {
647
265k
        return Status::OK();
648
265k
    }
649
264k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
264k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
264k
    }
652
264k
    _closed = true;
653
264k
    return Status::OK();
654
529k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
24
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
24
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
24
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
24
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
24
    }
652
24
    _closed = true;
653
24
    return Status::OK();
654
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
10.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
10.6k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
10.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
10.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
10.6k
    }
652
10.6k
    _closed = true;
653
10.6k
    return Status::OK();
654
10.6k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
15.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
15.2k
    if (_closed) {
647
7.68k
        return Status::OK();
648
7.68k
    }
649
7.59k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
7.59k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
7.59k
    }
652
7.59k
    _closed = true;
653
7.59k
    return Status::OK();
654
15.2k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
152k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
152k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
152k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
152k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
152k
    }
652
152k
    _closed = true;
653
152k
    return Status::OK();
654
152k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
371
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
371
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
371
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
371
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
371
    }
652
371
    _closed = true;
653
371
    return Status::OK();
654
371
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
208
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
208
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
208
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
208
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
208
    }
652
208
    _closed = true;
653
208
    return Status::OK();
654
208
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
1.20M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
1.20M
    if (_closed) {
647
17.8k
        return Status::OK();
648
17.8k
    }
649
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
    }
652
1.18M
    _closed = true;
653
1.18M
    return Status::OK();
654
1.20M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
55.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
55.4k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
55.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
55.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
55.4k
    }
652
55.4k
    _closed = true;
653
55.4k
    return Status::OK();
654
55.4k
}
_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
10.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
10.0k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
10.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
10.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
10.0k
    }
652
10.0k
    _closed = true;
653
10.0k
    return Status::OK();
654
10.0k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
1.07k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
1.07k
    if (_closed) {
647
538
        return Status::OK();
648
538
    }
649
536
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
536
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
536
    }
652
536
    _closed = true;
653
536
    return Status::OK();
654
1.07k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
9.76k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
9.76k
    if (_closed) {
647
4.92k
        return Status::OK();
648
4.92k
    }
649
4.83k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4.83k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4.83k
    }
652
4.83k
    _closed = true;
653
4.83k
    return Status::OK();
654
9.76k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
795k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
795k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
795k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
795k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
795k
    }
652
795k
    _closed = true;
653
795k
    return Status::OK();
654
795k
}
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
2.08M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
2.08M
    _operator_profile =
660
2.08M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
2.08M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
2.08M
    _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.08M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
2.08M
    _operator_profile->add_child(_common_profile, true);
669
2.08M
    _operator_profile->add_child(_custom_profile, true);
670
671
2.08M
    _operator_profile->set_metadata(_parent->node_id());
672
2.08M
    _wait_for_finish_dependency_timer =
673
2.08M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
2.08M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
2.08M
    if constexpr (!is_fake_shared) {
676
1.39M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
1.39M
            info.shared_state_map.end()) {
678
343k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
324k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
324k
            }
681
343k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
343k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
343k
                                                  ? 0
684
343k
                                                  : info.task_idx]
685
343k
                                  .get();
686
343k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
1.05M
        } else {
688
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
18.4E
                DCHECK(false);
690
18.4E
            }
691
1.05M
            _shared_state = info.shared_state->template cast<SharedState>();
692
1.05M
            _dependency = _shared_state->create_sink_dependency(
693
1.05M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
1.05M
        }
695
1.39M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
1.39M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
1.39M
    }
698
699
2.08M
    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.08M
    _rows_input_counter =
704
2.08M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
2.08M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
2.08M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
2.08M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
2.08M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
2.08M
    _memory_used_counter =
710
2.08M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
2.08M
    _common_profile->add_info_string("IsColocate",
712
2.08M
                                     std::to_string(_parent->is_colocated_operator()));
713
2.08M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
2.08M
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
2.08M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
2.08M
    return Status::OK();
717
2.08M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
113k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
113k
    _operator_profile =
660
113k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
113k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
113k
    _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
113k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
113k
    _operator_profile->add_child(_common_profile, true);
669
113k
    _operator_profile->add_child(_custom_profile, true);
670
671
113k
    _operator_profile->set_metadata(_parent->node_id());
672
113k
    _wait_for_finish_dependency_timer =
673
113k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
113k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
113k
    if constexpr (!is_fake_shared) {
676
113k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
113k
            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
17.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
17.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
17.9k
                                                  ? 0
684
17.9k
                                                  : info.task_idx]
685
17.9k
                                  .get();
686
17.9k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
95.7k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
95.7k
            _shared_state = info.shared_state->template cast<SharedState>();
692
95.7k
            _dependency = _shared_state->create_sink_dependency(
693
95.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
95.7k
        }
695
113k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
113k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
113k
    }
698
699
113k
    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
113k
    _rows_input_counter =
704
113k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
113k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
113k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
113k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
113k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
113k
    _memory_used_counter =
710
113k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
113k
    _common_profile->add_info_string("IsColocate",
712
113k
                                     std::to_string(_parent->is_colocated_operator()));
713
113k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
113k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
113k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
113k
    return Status::OK();
717
113k
}
_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
265k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
265k
    _operator_profile =
660
265k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
265k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
265k
    _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
265k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
265k
    _operator_profile->add_child(_common_profile, true);
669
265k
    _operator_profile->add_child(_custom_profile, true);
670
671
265k
    _operator_profile->set_metadata(_parent->node_id());
672
265k
    _wait_for_finish_dependency_timer =
673
265k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
265k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
265k
    if constexpr (!is_fake_shared) {
676
265k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
265k
            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
265k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
265k
            _shared_state = info.shared_state->template cast<SharedState>();
692
265k
            _dependency = _shared_state->create_sink_dependency(
693
265k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
265k
        }
695
265k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
265k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
265k
    }
698
699
265k
    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
265k
    _rows_input_counter =
704
265k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
265k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
265k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
265k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
265k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
265k
    _memory_used_counter =
710
265k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
265k
    _common_profile->add_info_string("IsColocate",
712
265k
                                     std::to_string(_parent->is_colocated_operator()));
713
265k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
265k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
265k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
265k
    return Status::OK();
717
265k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
30
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
30
    _operator_profile =
660
30
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
30
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
30
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
30
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
30
    _operator_profile->add_child(_common_profile, true);
669
30
    _operator_profile->add_child(_custom_profile, true);
670
671
30
    _operator_profile->set_metadata(_parent->node_id());
672
30
    _wait_for_finish_dependency_timer =
673
30
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
30
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
30
    if constexpr (!is_fake_shared) {
676
30
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
30
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
30
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
30
            _shared_state = info.shared_state->template cast<SharedState>();
692
30
            _dependency = _shared_state->create_sink_dependency(
693
30
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
30
        }
695
30
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
30
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
30
    }
698
699
30
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
30
    _rows_input_counter =
704
30
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
30
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
30
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
30
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
30
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
30
    _memory_used_counter =
710
30
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
30
    _common_profile->add_info_string("IsColocate",
712
30
                                     std::to_string(_parent->is_colocated_operator()));
713
30
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
30
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
30
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
30
    return Status::OK();
717
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
10.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
10.6k
    _operator_profile =
660
10.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
10.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
10.6k
    _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
10.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
10.6k
    _operator_profile->add_child(_common_profile, true);
669
10.6k
    _operator_profile->add_child(_custom_profile, true);
670
671
10.6k
    _operator_profile->set_metadata(_parent->node_id());
672
10.6k
    _wait_for_finish_dependency_timer =
673
10.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
10.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
10.6k
    if constexpr (!is_fake_shared) {
676
10.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
10.6k
            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
10.6k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
10.6k
            _shared_state = info.shared_state->template cast<SharedState>();
692
10.6k
            _dependency = _shared_state->create_sink_dependency(
693
10.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
10.6k
        }
695
10.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
10.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
10.6k
    }
698
699
10.6k
    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
10.6k
    _rows_input_counter =
704
10.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
10.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
10.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
10.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
10.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
10.6k
    _memory_used_counter =
710
10.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
10.6k
    _common_profile->add_info_string("IsColocate",
712
10.6k
                                     std::to_string(_parent->is_colocated_operator()));
713
10.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
10.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
10.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
10.6k
    return Status::OK();
717
10.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
7.57k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
7.57k
    _operator_profile =
660
7.57k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
7.57k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
7.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
7.57k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
7.57k
    _operator_profile->add_child(_common_profile, true);
669
7.57k
    _operator_profile->add_child(_custom_profile, true);
670
671
7.57k
    _operator_profile->set_metadata(_parent->node_id());
672
7.57k
    _wait_for_finish_dependency_timer =
673
7.57k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
7.57k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
7.57k
    if constexpr (!is_fake_shared) {
676
7.57k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
7.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
7.57k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
7.57k
            _shared_state = info.shared_state->template cast<SharedState>();
692
7.57k
            _dependency = _shared_state->create_sink_dependency(
693
7.57k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
7.57k
        }
695
7.57k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
7.57k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
7.57k
    }
698
699
7.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
7.57k
    _rows_input_counter =
704
7.57k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
7.57k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
7.57k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
7.57k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
7.57k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
7.57k
    _memory_used_counter =
710
7.57k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
7.57k
    _common_profile->add_info_string("IsColocate",
712
7.57k
                                     std::to_string(_parent->is_colocated_operator()));
713
7.57k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
7.57k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
7.57k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
7.57k
    return Status::OK();
717
7.57k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
152k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
152k
    _operator_profile =
660
152k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
152k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
152k
    _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
152k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
152k
    _operator_profile->add_child(_common_profile, true);
669
152k
    _operator_profile->add_child(_custom_profile, true);
670
671
152k
    _operator_profile->set_metadata(_parent->node_id());
672
152k
    _wait_for_finish_dependency_timer =
673
152k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
152k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
152k
    if constexpr (!is_fake_shared) {
676
152k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
152k
            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
152k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
152k
            _shared_state = info.shared_state->template cast<SharedState>();
692
152k
            _dependency = _shared_state->create_sink_dependency(
693
152k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
152k
        }
695
152k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
152k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
152k
    }
698
699
152k
    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
152k
    _rows_input_counter =
704
152k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
152k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
152k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
152k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
152k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
152k
    _memory_used_counter =
710
152k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
152k
    _common_profile->add_info_string("IsColocate",
712
152k
                                     std::to_string(_parent->is_colocated_operator()));
713
152k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
152k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
152k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
152k
    return Status::OK();
717
152k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
295
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
295
    _operator_profile =
660
295
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
295
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
295
    _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
295
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
295
    _operator_profile->add_child(_common_profile, true);
669
295
    _operator_profile->add_child(_custom_profile, true);
670
671
295
    _operator_profile->set_metadata(_parent->node_id());
672
295
    _wait_for_finish_dependency_timer =
673
295
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
295
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
295
    if constexpr (!is_fake_shared) {
676
295
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
295
            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
295
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
295
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
295
                                                  ? 0
684
295
                                                  : info.task_idx]
685
295
                                  .get();
686
295
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
295
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
0
            _shared_state = info.shared_state->template cast<SharedState>();
692
0
            _dependency = _shared_state->create_sink_dependency(
693
0
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
0
        }
695
295
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
295
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
295
    }
698
699
295
    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
295
    _rows_input_counter =
704
295
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
295
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
295
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
295
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
295
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
295
    _memory_used_counter =
710
295
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
295
    _common_profile->add_info_string("IsColocate",
712
295
                                     std::to_string(_parent->is_colocated_operator()));
713
295
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
295
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
295
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
295
    return Status::OK();
717
295
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
219
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
219
    _operator_profile =
660
219
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
219
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
219
    _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
219
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
219
    _operator_profile->add_child(_common_profile, true);
669
219
    _operator_profile->add_child(_custom_profile, true);
670
671
219
    _operator_profile->set_metadata(_parent->node_id());
672
219
    _wait_for_finish_dependency_timer =
673
219
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
219
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
219
    if constexpr (!is_fake_shared) {
676
219
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
219
            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
219
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
219
            _shared_state = info.shared_state->template cast<SharedState>();
692
219
            _dependency = _shared_state->create_sink_dependency(
693
219
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
219
        }
695
219
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
219
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
219
    }
698
699
219
    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
219
    _rows_input_counter =
704
219
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
219
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
219
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
219
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
219
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
219
    _memory_used_counter =
710
219
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
219
    _common_profile->add_info_string("IsColocate",
712
219
                                     std::to_string(_parent->is_colocated_operator()));
713
219
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
219
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
219
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
219
    return Status::OK();
717
219
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
690k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
690k
    _operator_profile =
660
690k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
690k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
690k
    _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
690k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
690k
    _operator_profile->add_child(_common_profile, true);
669
690k
    _operator_profile->add_child(_custom_profile, true);
670
671
690k
    _operator_profile->set_metadata(_parent->node_id());
672
690k
    _wait_for_finish_dependency_timer =
673
690k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
690k
    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
690k
    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
690k
    _rows_input_counter =
704
690k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
690k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
690k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
690k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
690k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
690k
    _memory_used_counter =
710
690k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
690k
    _common_profile->add_info_string("IsColocate",
712
690k
                                     std::to_string(_parent->is_colocated_operator()));
713
690k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
690k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
690k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
690k
    return Status::OK();
717
690k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
6.27k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
6.27k
    _operator_profile =
660
6.27k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
6.27k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
6.27k
    _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.27k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
6.27k
    _operator_profile->add_child(_common_profile, true);
669
6.27k
    _operator_profile->add_child(_custom_profile, true);
670
671
6.27k
    _operator_profile->set_metadata(_parent->node_id());
672
6.27k
    _wait_for_finish_dependency_timer =
673
6.27k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
6.27k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
6.27k
    if constexpr (!is_fake_shared) {
676
6.27k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
6.27k
            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.27k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
6.27k
            _shared_state = info.shared_state->template cast<SharedState>();
692
6.27k
            _dependency = _shared_state->create_sink_dependency(
693
6.27k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
6.27k
        }
695
6.27k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
6.27k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
6.27k
    }
698
699
6.27k
    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.27k
    _rows_input_counter =
704
6.27k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
6.27k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
6.27k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
6.27k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
6.27k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
6.27k
    _memory_used_counter =
710
6.27k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
6.27k
    _common_profile->add_info_string("IsColocate",
712
6.27k
                                     std::to_string(_parent->is_colocated_operator()));
713
6.27k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
6.27k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
6.27k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
6.27k
    return Status::OK();
717
6.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
637
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
637
    _operator_profile =
660
637
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
637
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
637
    _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
637
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
637
    _operator_profile->add_child(_common_profile, true);
669
637
    _operator_profile->add_child(_custom_profile, true);
670
671
637
    _operator_profile->set_metadata(_parent->node_id());
672
637
    _wait_for_finish_dependency_timer =
673
637
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
637
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
637
    if constexpr (!is_fake_shared) {
676
637
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
637
            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
637
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
637
            _shared_state = info.shared_state->template cast<SharedState>();
692
637
            _dependency = _shared_state->create_sink_dependency(
693
637
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
637
        }
695
637
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
637
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
637
    }
698
699
637
    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
637
    _rows_input_counter =
704
637
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
637
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
637
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
637
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
637
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
637
    _memory_used_counter =
710
637
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
637
    _common_profile->add_info_string("IsColocate",
712
637
                                     std::to_string(_parent->is_colocated_operator()));
713
637
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
637
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
637
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
637
    return Status::OK();
717
637
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
3.55k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
3.55k
    _operator_profile =
660
3.55k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
3.55k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
3.55k
    _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.55k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
3.55k
    _operator_profile->add_child(_common_profile, true);
669
3.55k
    _operator_profile->add_child(_custom_profile, true);
670
671
3.55k
    _operator_profile->set_metadata(_parent->node_id());
672
3.55k
    _wait_for_finish_dependency_timer =
673
3.55k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
3.55k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
3.55k
    if constexpr (!is_fake_shared) {
676
3.55k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
3.55k
            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.55k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
3.55k
            _shared_state = info.shared_state->template cast<SharedState>();
692
3.55k
            _dependency = _shared_state->create_sink_dependency(
693
3.55k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
3.55k
        }
695
3.55k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
3.55k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
3.55k
    }
698
699
3.55k
    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.55k
    _rows_input_counter =
704
3.55k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
3.55k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
3.55k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
3.55k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
3.55k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
3.55k
    _memory_used_counter =
710
3.55k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
3.55k
    _common_profile->add_info_string("IsColocate",
712
3.55k
                                     std::to_string(_parent->is_colocated_operator()));
713
3.55k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
3.55k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
3.55k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
3.55k
    return Status::OK();
717
3.55k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
11.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
11.8k
    _operator_profile =
660
11.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
11.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
11.8k
    _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.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
11.8k
    _operator_profile->add_child(_common_profile, true);
669
11.8k
    _operator_profile->add_child(_custom_profile, true);
670
671
11.8k
    _operator_profile->set_metadata(_parent->node_id());
672
11.8k
    _wait_for_finish_dependency_timer =
673
11.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
11.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
11.8k
    if constexpr (!is_fake_shared) {
676
11.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
11.8k
            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.8k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
11.8k
            _shared_state = info.shared_state->template cast<SharedState>();
692
11.8k
            _dependency = _shared_state->create_sink_dependency(
693
11.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
11.8k
        }
695
11.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
11.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
11.8k
    }
698
699
11.8k
    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.8k
    _rows_input_counter =
704
11.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
11.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
11.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
11.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
11.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
11.8k
    _memory_used_counter =
710
11.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
11.8k
    _common_profile->add_info_string("IsColocate",
712
11.8k
                                     std::to_string(_parent->is_colocated_operator()));
713
11.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
11.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
11.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
11.8k
    return Status::OK();
717
11.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
324k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
324k
    _operator_profile =
660
324k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
324k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
324k
    _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
324k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
324k
    _operator_profile->add_child(_common_profile, true);
669
324k
    _operator_profile->add_child(_custom_profile, true);
670
671
324k
    _operator_profile->set_metadata(_parent->node_id());
672
324k
    _wait_for_finish_dependency_timer =
673
324k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
324k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
324k
    if constexpr (!is_fake_shared) {
676
324k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
324k
            info.shared_state_map.end()) {
678
324k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
324k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
324k
            }
681
324k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
324k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
324k
                                                  ? 0
684
324k
                                                  : info.task_idx]
685
324k
                                  .get();
686
324k
            _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
324k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
324k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
324k
    }
698
699
324k
    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
324k
    _rows_input_counter =
704
324k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
324k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
324k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
324k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
324k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
324k
    _memory_used_counter =
710
324k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
324k
    _common_profile->add_info_string("IsColocate",
712
324k
                                     std::to_string(_parent->is_colocated_operator()));
713
324k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
324k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
324k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
324k
    return Status::OK();
717
324k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
498k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
498k
    _operator_profile =
660
498k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
498k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
498k
    _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
498k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
498k
    _operator_profile->add_child(_common_profile, true);
669
498k
    _operator_profile->add_child(_custom_profile, true);
670
671
498k
    _operator_profile->set_metadata(_parent->node_id());
672
498k
    _wait_for_finish_dependency_timer =
673
498k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
498k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
498k
    if constexpr (!is_fake_shared) {
676
498k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
498k
            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
498k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
498k
            _shared_state = info.shared_state->template cast<SharedState>();
692
498k
            _dependency = _shared_state->create_sink_dependency(
693
498k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
498k
        }
695
498k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
498k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
498k
    }
698
699
498k
    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
498k
    _rows_input_counter =
704
498k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
498k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
498k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
498k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
498k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
498k
    _memory_used_counter =
710
498k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
498k
    _common_profile->add_info_string("IsColocate",
712
498k
                                     std::to_string(_parent->is_colocated_operator()));
713
498k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
498k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
498k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
498k
    return Status::OK();
717
498k
}
_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
2.08M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
2.08M
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
2.08M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1.39M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1.39M
    }
727
2.08M
    _closed = true;
728
2.08M
    return Status::OK();
729
2.08M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
113k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
113k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
113k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
113k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
113k
    }
727
113k
    _closed = true;
728
113k
    return Status::OK();
729
113k
}
_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
265k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
265k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
265k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
265k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
265k
    }
727
265k
    _closed = true;
728
265k
    return Status::OK();
729
265k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
22
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
22
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
20
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
20
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
20
    }
727
20
    _closed = true;
728
20
    return Status::OK();
729
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
10.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
10.6k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
10.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
10.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
10.6k
    }
727
10.6k
    _closed = true;
728
10.6k
    return Status::OK();
729
10.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
7.59k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
7.59k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
7.59k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
7.59k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
7.59k
    }
727
7.59k
    _closed = true;
728
7.59k
    return Status::OK();
729
7.59k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
152k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
152k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
152k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
152k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
152k
    }
727
152k
    _closed = true;
728
152k
    return Status::OK();
729
152k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
295
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
295
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
295
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
295
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
295
    }
727
295
    _closed = true;
728
295
    return Status::OK();
729
295
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
208
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
208
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
208
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
208
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
208
    }
727
208
    _closed = true;
728
208
    return Status::OK();
729
208
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
691k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
691k
    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
691k
    _closed = true;
728
691k
    return Status::OK();
729
691k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
6.27k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
6.27k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
6.27k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
6.27k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
6.27k
    }
727
6.27k
    _closed = true;
728
6.27k
    return Status::OK();
729
6.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
534
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
534
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
534
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
534
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
534
    }
727
534
    _closed = true;
728
534
    return Status::OK();
729
534
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
3.55k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
3.55k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
3.55k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
3.55k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
3.55k
    }
727
3.55k
    _closed = true;
728
3.55k
    return Status::OK();
729
3.55k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
11.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
11.9k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
11.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
11.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
11.9k
    }
727
11.9k
    _closed = true;
728
11.9k
    return Status::OK();
729
11.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
325k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
325k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
325k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
325k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
325k
    }
727
325k
    _closed = true;
728
325k
    return Status::OK();
729
325k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
499k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
499k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
499k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
499k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
499k
    }
727
499k
    _closed = true;
728
499k
    return Status::OK();
729
499k
}
_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.8k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
10.8k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
10.8k
    return pull(state, block, eos);
735
10.8k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
732
431
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
431
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
431
    return pull(state, block, eos);
735
431
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
732
10.4k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
10.4k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
10.4k
    return pull(state, block, eos);
735
10.4k
}
736
737
template <typename LocalStateType>
738
681k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
681k
    auto& local_state = get_local_state(state);
740
681k
    if (need_more_input_data(state)) {
741
655k
        local_state._child_block->clear_column_data(
742
655k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
655k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
655k
                state, local_state._child_block.get(), &local_state._child_eos));
745
655k
        *eos = local_state._child_eos;
746
655k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
58.0k
            return Status::OK();
748
58.0k
        }
749
597k
        {
750
597k
            SCOPED_TIMER(local_state.exec_time_counter());
751
597k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
597k
        }
753
597k
    }
754
755
623k
    if (!need_more_input_data(state)) {
756
580k
        SCOPED_TIMER(local_state.exec_time_counter());
757
580k
        bool new_eos = false;
758
580k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
580k
        if (new_eos) {
760
506k
            *eos = true;
761
506k
        } else if (!need_more_input_data(state)) {
762
20.5k
            *eos = false;
763
20.5k
        }
764
580k
    }
765
623k
    return Status::OK();
766
623k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
121k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
121k
    auto& local_state = get_local_state(state);
740
121k
    if (need_more_input_data(state)) {
741
107k
        local_state._child_block->clear_column_data(
742
107k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
107k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
107k
                state, local_state._child_block.get(), &local_state._child_eos));
745
107k
        *eos = local_state._child_eos;
746
107k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
28.7k
            return Status::OK();
748
28.7k
        }
749
79.0k
        {
750
79.0k
            SCOPED_TIMER(local_state.exec_time_counter());
751
79.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
79.0k
        }
753
79.0k
    }
754
755
92.8k
    if (!need_more_input_data(state)) {
756
92.8k
        SCOPED_TIMER(local_state.exec_time_counter());
757
92.8k
        bool new_eos = false;
758
92.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
92.8k
        if (new_eos) {
760
41.5k
            *eos = true;
761
51.2k
        } else if (!need_more_input_data(state)) {
762
7.92k
            *eos = false;
763
7.92k
        }
764
92.8k
    }
765
92.8k
    return Status::OK();
766
92.8k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
3.03k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
3.03k
    auto& local_state = get_local_state(state);
740
3.03k
    if (need_more_input_data(state)) {
741
1.82k
        local_state._child_block->clear_column_data(
742
1.82k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
1.82k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
1.82k
                state, local_state._child_block.get(), &local_state._child_eos));
745
1.82k
        *eos = local_state._child_eos;
746
1.82k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
369
            return Status::OK();
748
369
        }
749
1.45k
        {
750
1.45k
            SCOPED_TIMER(local_state.exec_time_counter());
751
1.45k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
1.45k
        }
753
1.45k
    }
754
755
2.66k
    if (!need_more_input_data(state)) {
756
2.66k
        SCOPED_TIMER(local_state.exec_time_counter());
757
2.66k
        bool new_eos = false;
758
2.66k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
2.66k
        if (new_eos) {
760
1.21k
            *eos = true;
761
1.45k
        } else if (!need_more_input_data(state)) {
762
1.21k
            *eos = false;
763
1.21k
        }
764
2.66k
    }
765
2.66k
    return Status::OK();
766
2.66k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
4.64k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
4.64k
    auto& local_state = get_local_state(state);
740
4.64k
    if (need_more_input_data(state)) {
741
4.64k
        local_state._child_block->clear_column_data(
742
4.64k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
4.64k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
4.64k
                state, local_state._child_block.get(), &local_state._child_eos));
745
4.64k
        *eos = local_state._child_eos;
746
4.64k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
1.54k
            return Status::OK();
748
1.54k
        }
749
3.09k
        {
750
3.09k
            SCOPED_TIMER(local_state.exec_time_counter());
751
3.09k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
3.09k
        }
753
3.09k
    }
754
755
3.09k
    if (!need_more_input_data(state)) {
756
3.09k
        SCOPED_TIMER(local_state.exec_time_counter());
757
3.09k
        bool new_eos = false;
758
3.09k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
3.09k
        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.09k
    }
765
3.09k
    return Status::OK();
766
3.09k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
23.7k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
23.7k
    auto& local_state = get_local_state(state);
740
23.7k
    if (need_more_input_data(state)) {
741
23.7k
        local_state._child_block->clear_column_data(
742
23.7k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
23.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
23.7k
                state, local_state._child_block.get(), &local_state._child_eos));
745
23.7k
        *eos = local_state._child_eos;
746
23.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
3.14k
            return Status::OK();
748
3.14k
        }
749
20.6k
        {
750
20.6k
            SCOPED_TIMER(local_state.exec_time_counter());
751
20.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
20.6k
        }
753
20.6k
    }
754
755
20.5k
    if (!need_more_input_data(state)) {
756
9.93k
        SCOPED_TIMER(local_state.exec_time_counter());
757
9.93k
        bool new_eos = false;
758
9.93k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
9.93k
        if (new_eos) {
760
9.87k
            *eos = true;
761
9.87k
        } else if (!need_more_input_data(state)) {
762
1
            *eos = false;
763
1
        }
764
9.93k
    }
765
20.5k
    return Status::OK();
766
20.5k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
490k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
490k
    auto& local_state = get_local_state(state);
740
491k
    if (need_more_input_data(state)) {
741
491k
        local_state._child_block->clear_column_data(
742
491k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
491k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
491k
                state, local_state._child_block.get(), &local_state._child_eos));
745
491k
        *eos = local_state._child_eos;
746
491k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
21.1k
            return Status::OK();
748
21.1k
        }
749
470k
        {
750
470k
            SCOPED_TIMER(local_state.exec_time_counter());
751
470k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
470k
        }
753
470k
    }
754
755
469k
    if (!need_more_input_data(state)) {
756
438k
        SCOPED_TIMER(local_state.exec_time_counter());
757
438k
        bool new_eos = false;
758
438k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
438k
        if (new_eos) {
760
437k
            *eos = true;
761
437k
        } else if (!need_more_input_data(state)) {
762
0
            *eos = false;
763
0
        }
764
438k
    }
765
469k
    return Status::OK();
766
469k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
30.3k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
30.3k
    auto& local_state = get_local_state(state);
740
30.3k
    if (need_more_input_data(state)) {
741
19.2k
        local_state._child_block->clear_column_data(
742
19.2k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
19.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
19.2k
                state, local_state._child_block.get(), &local_state._child_eos));
745
19.2k
        *eos = local_state._child_eos;
746
19.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
2.58k
            return Status::OK();
748
2.58k
        }
749
16.6k
        {
750
16.6k
            SCOPED_TIMER(local_state.exec_time_counter());
751
16.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
16.6k
        }
753
16.6k
    }
754
755
27.7k
    if (!need_more_input_data(state)) {
756
27.2k
        SCOPED_TIMER(local_state.exec_time_counter());
757
27.2k
        bool new_eos = false;
758
27.2k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
27.2k
        if (new_eos) {
760
10.6k
            *eos = true;
761
16.6k
        } else if (!need_more_input_data(state)) {
762
11.0k
            *eos = false;
763
11.0k
        }
764
27.2k
    }
765
27.7k
    return Status::OK();
766
27.7k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
6.86k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
6.86k
    auto& local_state = get_local_state(state);
740
6.86k
    if (need_more_input_data(state)) {
741
6.50k
        local_state._child_block->clear_column_data(
742
6.50k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
6.50k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
6.50k
                state, local_state._child_block.get(), &local_state._child_eos));
745
6.50k
        *eos = local_state._child_eos;
746
6.50k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
481
            return Status::OK();
748
481
        }
749
6.02k
        {
750
6.02k
            SCOPED_TIMER(local_state.exec_time_counter());
751
6.02k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
6.02k
        }
753
6.02k
    }
754
755
6.37k
    if (!need_more_input_data(state)) {
756
6.37k
        SCOPED_TIMER(local_state.exec_time_counter());
757
6.37k
        bool new_eos = false;
758
6.37k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
6.37k
        if (new_eos) {
760
4.35k
            *eos = true;
761
4.35k
        } else if (!need_more_input_data(state)) {
762
366
            *eos = false;
763
366
        }
764
6.37k
    }
765
6.37k
    return Status::OK();
766
6.37k
}
767
768
template <typename Writer, typename Parent>
769
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
770
65.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
65.4k
    RETURN_IF_ERROR(Base::init(state, info));
772
65.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
65.4k
                                                         "AsyncWriterDependency", true);
774
65.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
65.4k
                             _finish_dependency));
776
777
65.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
65.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
65.4k
    return Status::OK();
780
65.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
521
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
521
    RETURN_IF_ERROR(Base::init(state, info));
772
521
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
521
                                                         "AsyncWriterDependency", true);
774
521
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
521
                             _finish_dependency));
776
777
521
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
521
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
521
    return Status::OK();
780
521
}
_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
46.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
46.3k
    RETURN_IF_ERROR(Base::init(state, info));
772
46.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
46.3k
                                                         "AsyncWriterDependency", true);
774
46.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
46.3k
                             _finish_dependency));
776
777
46.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
46.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
46.3k
    return Status::OK();
780
46.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
9.04k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
9.04k
    RETURN_IF_ERROR(Base::init(state, info));
772
9.04k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
9.04k
                                                         "AsyncWriterDependency", true);
774
9.04k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
9.04k
                             _finish_dependency));
776
777
9.04k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
9.04k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
9.04k
    return Status::OK();
780
9.04k
}
_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.37k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
3.37k
    RETURN_IF_ERROR(Base::init(state, info));
772
3.37k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
3.37k
                                                         "AsyncWriterDependency", true);
774
3.37k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
3.37k
                             _finish_dependency));
776
777
3.37k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
3.37k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
3.37k
    return Status::OK();
780
3.37k
}
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
65.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
65.5k
    RETURN_IF_ERROR(Base::open(state));
786
65.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
575k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
509k
        RETURN_IF_ERROR(
789
509k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
509k
    }
791
65.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
65.5k
    return Status::OK();
793
65.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
522
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
522
    RETURN_IF_ERROR(Base::open(state));
786
522
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
2.79k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
2.27k
        RETURN_IF_ERROR(
789
2.27k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
2.27k
    }
791
522
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
522
    return Status::OK();
793
522
}
_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
46.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
46.4k
    RETURN_IF_ERROR(Base::open(state));
786
46.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
332k
    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
46.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
46.4k
    return Status::OK();
793
46.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
9.00k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
9.00k
    RETURN_IF_ERROR(Base::open(state));
786
9.00k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
56.9k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
47.9k
        RETURN_IF_ERROR(
789
47.9k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
47.9k
    }
791
9.00k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
9.00k
    return Status::OK();
793
9.00k
}
_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.37k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
3.37k
    RETURN_IF_ERROR(Base::open(state));
786
3.37k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
42.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
38.7k
        RETURN_IF_ERROR(
789
38.7k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
38.7k
    }
791
3.37k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
3.37k
    return Status::OK();
793
3.37k
}
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.38k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
3.74k
        RETURN_IF_ERROR(
789
3.74k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
3.74k
    }
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
89.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
89.9k
    return _writer->sink(block, eos);
799
89.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
2.63k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
2.63k
    return _writer->sink(block, eos);
799
2.63k
}
_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
62.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
62.6k
    return _writer->sink(block, eos);
799
62.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
10.4k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
10.4k
    return _writer->sink(block, eos);
799
10.4k
}
_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.33k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
5.33k
    return _writer->sink(block, eos);
799
5.33k
}
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
794
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
794
    return _writer->sink(block, eos);
799
794
}
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
65.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
65.5k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
65.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
65.5k
    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
65.6k
    if (_writer) {
811
65.6k
        Status st = _writer->get_writer_status();
812
65.6k
        if (exec_status.ok()) {
813
65.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
65.4k
                                                       : Status::Cancelled("force close"));
815
65.4k
        } else {
816
135
            _writer->force_close(exec_status);
817
135
        }
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
65.6k
        RETURN_IF_ERROR(st);
822
65.6k
    }
823
65.5k
    return Base::close(state, exec_status);
824
65.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
510
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
510
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
510
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
510
    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
510
    if (_writer) {
811
510
        Status st = _writer->get_writer_status();
812
510
        if (exec_status.ok()) {
813
510
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
510
                                                       : Status::Cancelled("force close"));
815
510
        } 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
510
        RETURN_IF_ERROR(st);
822
510
    }
823
510
    return Base::close(state, exec_status);
824
510
}
_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
46.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
46.4k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
46.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
46.4k
    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
46.4k
    if (_writer) {
811
46.4k
        Status st = _writer->get_writer_status();
812
46.4k
        if (exec_status.ok()) {
813
46.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
46.3k
                                                       : Status::Cancelled("force close"));
815
46.3k
        } else {
816
97
            _writer->force_close(exec_status);
817
97
        }
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
46.4k
        RETURN_IF_ERROR(st);
822
46.4k
    }
823
46.4k
    return Base::close(state, exec_status);
824
46.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
9.03k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
9.03k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
9.03k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
9.03k
    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
9.04k
    if (_writer) {
811
9.04k
        Status st = _writer->get_writer_status();
812
9.04k
        if (exec_status.ok()) {
813
9.01k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
9.01k
                                                       : Status::Cancelled("force close"));
815
9.01k
        } else {
816
34
            _writer->force_close(exec_status);
817
34
        }
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
9.04k
        RETURN_IF_ERROR(st);
822
9.04k
    }
823
9.03k
    return Base::close(state, exec_status);
824
9.03k
}
_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.37k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
3.37k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
3.37k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
3.37k
    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.37k
    if (_writer) {
811
3.37k
        Status st = _writer->get_writer_status();
812
3.37k
        if (exec_status.ok()) {
813
3.37k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
3.37k
                                                       : Status::Cancelled("force close"));
815
3.37k
        } 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
3.37k
        RETURN_IF_ERROR(st);
822
3.37k
    }
823
3.37k
    return Base::close(state, exec_status);
824
3.37k
}
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