Coverage Report

Created: 2026-10-26 08:51

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