Coverage Report

Created: 2026-10-16 06:40

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <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
2.12M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
2.12M
    if (_parent->nereids_id() == -1) {
123
1.12M
        return fmt::format("(id={})", _parent->node_id());
124
1.12M
    } else {
125
1.00M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1.00M
    }
127
2.12M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
72.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
72.2k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
72.2k
    } else {
125
72.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
72.2k
    }
127
72.2k
}
_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
241k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
241k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
241k
    } else {
125
241k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
241k
    }
127
241k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
24
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
24
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
24
    } else {
125
24
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
24
    }
127
24
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
6.82k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.82k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
6.82k
    } else {
125
6.82k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
6.82k
    }
127
6.82k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
13.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
13.0k
    if (_parent->nereids_id() == -1) {
123
16
        return fmt::format("(id={})", _parent->node_id());
124
13.0k
    } else {
125
13.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
13.0k
    }
127
13.0k
}
_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
61.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
61.2k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
61.2k
    } else {
125
61.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
61.2k
    }
127
61.2k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
160
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
160
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
160
    } else {
125
160
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
160
    }
127
160
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
793k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
793k
    if (_parent->nereids_id() == -1) {
123
351k
        return fmt::format("(id={})", _parent->node_id());
124
441k
    } else {
125
441k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
441k
    }
127
793k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
55.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
55.3k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
55.3k
    } else {
125
55.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
55.3k
    }
127
55.3k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
6.93k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.93k
    if (_parent->nereids_id() == -1) {
123
6.93k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
6.93k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
461
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
461
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
359
    } else {
125
359
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
359
    }
127
461
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.08k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.08k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.07k
    } else {
125
5.07k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.07k
    }
127
5.08k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
766k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
766k
    if (_parent->nereids_id() == -1) {
123
766k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
766k
}
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.35M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.35M
    if (_parent->nereids_id() == -1) {
132
795k
        return fmt::format("(id={})", _parent->node_id());
133
795k
    } else {
134
558k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
558k
    }
136
1.35M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
120k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
120k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
120k
    } else {
134
120k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
120k
    }
136
120k
}
_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
244k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
244k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
244k
    } else {
134
244k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
244k
    }
136
244k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
31
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
31
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
31
    } else {
134
31
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
31
    }
136
31
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
6.84k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
6.84k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
6.84k
    } else {
134
6.84k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
6.84k
    }
136
6.84k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
13.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
13.0k
    if (_parent->nereids_id() == -1) {
132
16
        return fmt::format("(id={})", _parent->node_id());
133
13.0k
    } else {
134
13.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
13.0k
    }
136
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
104k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
104k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
104k
    } else {
134
104k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
104k
    }
136
104k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
61.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
61.1k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
61.1k
    } else {
134
61.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
61.1k
    }
136
61.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
170
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
170
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
170
    } else {
134
170
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
170
    }
136
170
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12
    if (_parent->nereids_id() == -1) {
132
12
        return fmt::format("(id={})", _parent->node_id());
133
12
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
12
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.19k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.19k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
9.19k
    } else {
134
9.19k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.19k
    }
136
9.19k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
468
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
468
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
366
    } else {
134
366
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
366
    }
136
468
}
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
305k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
306k
    if (_parent->nereids_id() == -1) {
132
306k
        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
305k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
475k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
476k
    if (_parent->nereids_id() == -1) {
132
476k
        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
475k
}
_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
30.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
30.1k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
30.1k
    _terminated = true;
144
30.1k
    return Status::OK();
145
30.1k
}
_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.33k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.33k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.33k
    _terminated = true;
144
2.33k
    return Status::OK();
145
2.33k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1
    _terminated = true;
144
1
    return Status::OK();
145
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.78k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.78k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.78k
    _terminated = true;
144
1.78k
    return Status::OK();
145
1.78k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
678
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
678
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
678
    _terminated = true;
144
678
    return Status::OK();
145
678
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
454
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
454
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
454
    _terminated = true;
144
454
    return Status::OK();
145
454
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
255
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
255
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
255
    _terminated = true;
144
255
    return Status::OK();
145
255
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
137
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
137
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
137
    _terminated = true;
144
137
    return Status::OK();
145
137
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_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_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
276
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
276
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
276
    _terminated = true;
144
276
    return Status::OK();
145
276
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
136
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
136
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
136
    _terminated = true;
144
136
    return Status::OK();
145
136
}
146
147
323k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
323k
    return _child && _child->is_serial_operator() && !is_source()
149
323k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
323k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
323k
}
152
153
24.5k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
24.5k
    if (!_child) {
155
23.2k
        return false;
156
23.2k
    }
157
1.25k
    if (_child->is_serial_operator()) {
158
158
        return true;
159
158
    }
160
1.09k
    const auto child_distribution = _child->required_data_distribution(state);
161
1.09k
    return child_distribution.need_local_exchange() &&
162
1.09k
           !is_shuffled_exchange(child_distribution.distribution_type);
163
1.25k
}
164
165
template <typename SharedStateArg>
166
13.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.6k
    fmt::memory_buffer debug_string_buffer;
168
13.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.6k
    return fmt::to_string(debug_string_buffer);
170
13.6k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_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
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16
    fmt::memory_buffer debug_string_buffer;
168
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16
    return fmt::to_string(debug_string_buffer);
170
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16
    fmt::memory_buffer debug_string_buffer;
168
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16
    return fmt::to_string(debug_string_buffer);
170
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
13.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.6k
    fmt::memory_buffer debug_string_buffer;
168
13.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.6k
    return fmt::to_string(debug_string_buffer);
170
13.6k
}
_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
48
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
48
    fmt::memory_buffer debug_string_buffer;
168
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
48
    return fmt::to_string(debug_string_buffer);
170
48
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
13.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.6k
    fmt::memory_buffer debug_string_buffer;
175
13.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.6k
    return fmt::to_string(debug_string_buffer);
177
13.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16
    fmt::memory_buffer debug_string_buffer;
175
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16
    return fmt::to_string(debug_string_buffer);
177
16
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16
    fmt::memory_buffer debug_string_buffer;
175
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16
    return fmt::to_string(debug_string_buffer);
177
16
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
35
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
35
    fmt::memory_buffer debug_string_buffer;
175
35
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
35
    return fmt::to_string(debug_string_buffer);
177
35
}
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
36
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
36
    fmt::memory_buffer debug_string_buffer;
175
36
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
36
    return fmt::to_string(debug_string_buffer);
177
36
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
13.5k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.5k
    fmt::memory_buffer debug_string_buffer;
175
13.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.5k
    return fmt::to_string(debug_string_buffer);
177
13.5k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
13.7k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
13.7k
    fmt::memory_buffer debug_string_buffer;
181
13.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
13.7k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
13.7k
                   _is_serial_operator);
184
13.7k
    return fmt::to_string(debug_string_buffer);
185
13.7k
}
186
187
13.6k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
13.6k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
13.6k
}
190
191
709k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
709k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
709k
    _nereids_id = tnode.nereids_id;
194
709k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.63k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.63k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.63k
            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.63k
    }
207
709k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
709k
    _op_name = substr + "_OPERATOR";
209
210
709k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
709k
    } else if (tnode.__isset.conjuncts) {
213
281k
        for (const auto& conjunct : tnode.conjuncts) {
214
281k
            VExprContextSPtr context;
215
281k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
281k
            _conjuncts.emplace_back(context);
217
281k
        }
218
104k
    }
219
220
    // create the projections expr
221
709k
    if (tnode.__isset.projections) {
222
274k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
274k
    }
224
709k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.63k
        DCHECK(has_projection()) << "no final projections";
226
6.63k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
11.8k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
11.8k
            VExprContextSPtrs projections;
229
11.8k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
11.8k
            _projection->intermediate_projections.push_back(projections);
231
11.8k
        }
232
6.63k
    }
233
709k
    return Status::OK();
234
709k
}
235
236
737k
Status OperatorXBase::prepare(RuntimeState* state) {
237
737k
    for (auto& conjunct : _conjuncts) {
238
281k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
281k
    }
240
737k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
686k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
345k
            return a->execute_cost() < b->execute_cost();
243
345k
        });
244
686k
    };
245
246
737k
    if (has_projection()) {
247
274k
        auto& projection = *_projection;
248
286k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
11.8k
            const auto& input_row_desc =
250
11.8k
                    i == 0 ? operator_row_desc_before_projection()
251
11.8k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
11.8k
            RETURN_IF_ERROR(
253
11.8k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
11.8k
        }
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
737k
    for (auto& conjunct : _conjuncts) {
266
281k
        RETURN_IF_ERROR(conjunct->open(state));
267
281k
    }
268
737k
    if (has_projection()) {
269
274k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
274k
        for (auto& projections : _projection->intermediate_projections) {
271
11.8k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
11.8k
        }
273
274k
    }
274
736k
    if (_child && !is_source()) {
275
104k
        RETURN_IF_ERROR(_child->prepare(state));
276
104k
    }
277
278
736k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
736k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
736k
    return Status::OK();
284
736k
}
285
286
7.01k
Status OperatorXBase::terminate(RuntimeState* state) {
287
7.01k
    if (_child && !is_source()) {
288
918
        RETURN_IF_ERROR(_child->terminate(state));
289
918
    }
290
7.01k
    auto result = state->get_local_state_result(operator_id());
291
7.01k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
7.01k
    return result.value()->terminate(state);
295
7.01k
}
296
297
5.77M
Status OperatorXBase::close(RuntimeState* state) {
298
5.77M
    if (_child && !is_source()) {
299
1.02M
        RETURN_IF_ERROR(_child->close(state));
300
1.02M
    }
301
5.77M
    auto result = state->get_local_state_result(operator_id());
302
5.77M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.77M
    return result.value()->close(state);
306
5.77M
}
307
308
288k
void PipelineXLocalStateBase::clear_origin_block() {
309
288k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
288k
}
311
312
842k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
842k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
842k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
842k
    return Status::OK();
317
842k
}
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
288k
                                     Block* output_block) const {
326
288k
    auto* local_state = state->get_local_state(operator_id());
327
288k
    SCOPED_TIMER(local_state->exec_time_counter());
328
288k
    SCOPED_TIMER(local_state->_projection_timer);
329
288k
    const size_t rows = origin_block->rows();
330
288k
    if (rows == 0) {
331
146k
        return Status::OK();
332
146k
    }
333
142k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
142k
    {
336
142k
        Block input_block = *origin_block;
337
338
142k
        ColumnsWithTypeAndName new_columns;
339
142k
        for (const auto& projections : local_state->_intermediate_projections) {
340
4.58k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
4.58k
            new_columns.resize(projections.size());
345
77.8k
            for (int i = 0; i < projections.size(); i++) {
346
73.2k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
73.2k
                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
73.2k
            }
355
4.57k
            Block tmp_block {new_columns};
356
4.57k
            input_block.swap(tmp_block);
357
4.57k
        }
358
359
142k
        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
142k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
142k
                output_block, _projection->output_row_descriptor);
368
142k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
142k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
142k
        Columns shared_columns(mutable_columns.size());
371
372
797k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
655k
            ColumnPtr column_ptr;
374
655k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
655k
            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
655k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
655k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
655k
            if (column_ptr->is_exclusive()) {
386
240k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
414k
            } else {
388
414k
                shared_columns[i] = std::move(column_ptr);
389
414k
            }
390
655k
        }
391
392
142k
        scoped_mutable_block.restore();
393
797k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
655k
            if (shared_columns[i]) {
395
414k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
414k
            }
397
655k
        }
398
142k
    }
399
400
0
    origin_block->clear_column_data(
401
142k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
142k
    DCHECK_EQ(output_block->rows(), rows);
403
404
142k
    return Status::OK();
405
142k
}
406
407
4.47M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.47M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.47M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.47M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.47M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.47M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.47M
            if (_debug_point_count++ % 2 == 0) {
414
4.47M
                return Status::OK();
415
4.47M
            }
416
4.47M
        }
417
4.47M
    });
418
419
4.47M
    Status status;
420
4.47M
    auto* local_state = state->get_local_state(operator_id());
421
4.47M
    Defer defer([&]() {
422
4.47M
        if (status.ok()) {
423
4.47M
            local_state->update_output_block_counters(*block);
424
4.47M
        }
425
4.47M
    });
426
4.47M
    if (has_projection()) {
427
288k
        local_state->clear_origin_block();
428
288k
        status = get_block(state, &local_state->_origin_block, eos);
429
288k
        if (UNLIKELY(!status.ok())) {
430
25
            return status;
431
25
        }
432
288k
        status = do_projections(state, &local_state->_origin_block, block);
433
288k
        return status;
434
288k
    }
435
4.18M
    status = get_block(state, block, eos);
436
4.18M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.18M
    return status;
438
4.18M
}
439
440
2.94M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.94M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.98k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.98k
        *eos = true;
444
9.98k
    }
445
446
2.94M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.94M
        auto op_name = to_lower(_parent->_op_name);
448
2.94M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.94M
        arg_op_name = to_lower(arg_op_name);
450
451
2.94M
        if (op_name == arg_op_name) {
452
2.94M
            *eos = true;
453
2.94M
        }
454
2.94M
    });
455
456
2.94M
    if (auto rows = block->rows()) {
457
799k
        _num_rows_returned += rows;
458
799k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
799k
    }
460
2.94M
}
461
462
30.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
30.0k
    auto result = state->get_sink_local_state_result();
464
30.0k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
30.0k
    return result.value()->terminate(state);
468
30.0k
}
469
470
13.6k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
13.6k
    fmt::memory_buffer debug_string_buffer;
472
473
13.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
13.6k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
13.6k
    return fmt::to_string(debug_string_buffer);
476
13.6k
}
477
478
13.6k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
13.6k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
13.6k
}
481
482
365k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
365k
    std::string op_name = "UNKNOWN_SINK";
484
365k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
366k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
366k
        op_name = it->second;
488
366k
    }
489
365k
    _name = op_name + "_OPERATOR";
490
365k
    return Status::OK();
491
365k
}
492
493
312k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
312k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
312k
    _nereids_id = tnode.nereids_id;
496
312k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
312k
    _name = substr + "_SINK_OPERATOR";
498
312k
    return Status::OK();
499
312k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.96M
                                                            LocalSinkStateInfo& info) {
504
1.96M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.96M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.96M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.96M
    return Status::OK();
508
1.96M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
120k
                                                            LocalSinkStateInfo& info) {
504
120k
    auto local_state = LocalStateType::create_unique(this, state);
505
120k
    RETURN_IF_ERROR(local_state->init(state, info));
506
120k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
120k
    return Status::OK();
508
120k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
427k
                                                            LocalSinkStateInfo& info) {
504
427k
    auto local_state = LocalStateType::create_unique(this, state);
505
427k
    RETURN_IF_ERROR(local_state->init(state, info));
506
427k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
427k
    return Status::OK();
508
427k
}
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
359
                                                            LocalSinkStateInfo& info) {
504
359
    auto local_state = LocalStateType::create_unique(this, state);
505
359
    RETURN_IF_ERROR(local_state->init(state, info));
506
359
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
359
    return Status::OK();
508
359
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
48.8k
                                                            LocalSinkStateInfo& info) {
504
48.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
48.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
48.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
48.8k
    return Status::OK();
508
48.8k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
36
                                                            LocalSinkStateInfo& info) {
504
36
    auto local_state = LocalStateType::create_unique(this, state);
505
36
    RETURN_IF_ERROR(local_state->init(state, info));
506
36
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
36
    return Status::OK();
508
36
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
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
13.0k
                                                            LocalSinkStateInfo& info) {
504
13.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
13.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
13.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
13.0k
    return Status::OK();
508
13.0k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9
                                                            LocalSinkStateInfo& info) {
504
9
    auto local_state = LocalStateType::create_unique(this, state);
505
9
    RETURN_IF_ERROR(local_state->init(state, info));
506
9
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9
    return Status::OK();
508
9
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
245k
                                                            LocalSinkStateInfo& info) {
504
245k
    auto local_state = LocalStateType::create_unique(this, state);
505
245k
    RETURN_IF_ERROR(local_state->init(state, info));
506
245k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
245k
    return Status::OK();
508
245k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
31
                                                            LocalSinkStateInfo& info) {
504
31
    auto local_state = LocalStateType::create_unique(this, state);
505
31
    RETURN_IF_ERROR(local_state->init(state, info));
506
31
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
31
    return Status::OK();
508
31
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
305k
                                                            LocalSinkStateInfo& info) {
504
305k
    auto local_state = LocalStateType::create_unique(this, state);
505
305k
    RETURN_IF_ERROR(local_state->init(state, info));
506
305k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
305k
    return Status::OK();
508
305k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
104k
                                                            LocalSinkStateInfo& info) {
504
104k
    auto local_state = LocalStateType::create_unique(this, state);
505
104k
    RETURN_IF_ERROR(local_state->init(state, info));
506
104k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
104k
    return Status::OK();
508
104k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
61.1k
                                                            LocalSinkStateInfo& info) {
504
61.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
61.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
61.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
61.1k
    return Status::OK();
508
61.1k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
170
                                                            LocalSinkStateInfo& info) {
504
170
    auto local_state = LocalStateType::create_unique(this, state);
505
170
    RETURN_IF_ERROR(local_state->init(state, info));
506
170
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
170
    return Status::OK();
508
170
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
603k
                                                            LocalSinkStateInfo& info) {
504
603k
    auto local_state = LocalStateType::create_unique(this, state);
505
603k
    RETURN_IF_ERROR(local_state->init(state, info));
506
603k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
603k
    return Status::OK();
508
603k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.84k
                                                            LocalSinkStateInfo& info) {
504
6.84k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.84k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.84k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.84k
    return Status::OK();
508
6.84k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.19k
                                                            LocalSinkStateInfo& info) {
504
9.19k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.19k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.19k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.19k
    return Status::OK();
508
9.19k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.57k
                                                            LocalSinkStateInfo& info) {
504
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.57k
    return Status::OK();
508
2.57k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
365
                                                            LocalSinkStateInfo& info) {
504
365
    auto local_state = LocalStateType::create_unique(this, state);
505
365
    RETURN_IF_ERROR(local_state->init(state, info));
506
365
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
365
    return Status::OK();
508
365
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.75k
                                                            LocalSinkStateInfo& info) {
504
4.75k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.75k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.75k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.75k
    return Status::OK();
508
4.75k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.55k
                                                            LocalSinkStateInfo& info) {
504
2.55k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.55k
    return Status::OK();
508
2.55k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.56k
                                                            LocalSinkStateInfo& info) {
504
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.56k
    return Status::OK();
508
2.56k
}
_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
107
                                                            LocalSinkStateInfo& info) {
504
107
    auto local_state = LocalStateType::create_unique(this, state);
505
107
    RETURN_IF_ERROR(local_state->init(state, info));
506
107
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
107
    return Status::OK();
508
107
}
_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.56M
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.56M
    } else {
519
1.56M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.56M
        ss->id = operator_id();
521
1.56M
        for (auto& dest : dests_id()) {
522
1.55M
            ss->related_op_ids.insert(dest);
523
1.55M
        }
524
1.56M
        return ss;
525
1.56M
    }
526
1.56M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
103k
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
103k
    } else {
519
103k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
103k
        ss->id = operator_id();
521
103k
        for (auto& dest : dests_id()) {
522
103k
            ss->related_op_ids.insert(dest);
523
103k
        }
524
103k
        return ss;
525
103k
    }
526
103k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
428k
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
428k
    } else {
519
428k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
428k
        ss->id = operator_id();
521
428k
        for (auto& dest : dests_id()) {
522
427k
            ss->related_op_ids.insert(dest);
523
427k
        }
524
428k
        return ss;
525
428k
    }
526
428k
}
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
360
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
360
    } else {
519
360
        auto ss = LocalStateType::SharedStateType::create_shared();
520
360
        ss->id = operator_id();
521
360
        for (auto& dest : dests_id()) {
522
360
            ss->related_op_ids.insert(dest);
523
360
        }
524
360
        return ss;
525
360
    }
526
360
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
48.9k
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.9k
    } else {
519
48.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
48.9k
        ss->id = operator_id();
521
48.9k
        for (auto& dest : dests_id()) {
522
48.6k
            ss->related_op_ids.insert(dest);
523
48.6k
        }
524
48.9k
        return ss;
525
48.9k
    }
526
48.9k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
36
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
36
    } else {
519
36
        auto ss = LocalStateType::SharedStateType::create_shared();
520
36
        ss->id = operator_id();
521
36
        for (auto& dest : dests_id()) {
522
36
            ss->related_op_ids.insert(dest);
523
36
        }
524
36
        return ss;
525
36
    }
526
36
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
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
13.1k
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
13.1k
    } else {
519
13.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
13.1k
        ss->id = operator_id();
521
13.1k
        for (auto& dest : dests_id()) {
522
13.1k
            ss->related_op_ids.insert(dest);
523
13.1k
        }
524
13.1k
        return ss;
525
13.1k
    }
526
13.1k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9
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
9
    } else {
519
9
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9
        ss->id = operator_id();
521
9
        for (auto& dest : dests_id()) {
522
9
            ss->related_op_ids.insert(dest);
523
9
        }
524
9
        return ss;
525
9
    }
526
9
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
245k
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
245k
    } else {
519
245k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
245k
        ss->id = operator_id();
521
245k
        for (auto& dest : dests_id()) {
522
245k
            ss->related_op_ids.insert(dest);
523
245k
        }
524
245k
        return ss;
525
245k
    }
526
245k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
33
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
33
    } else {
519
33
        auto ss = LocalStateType::SharedStateType::create_shared();
520
33
        ss->id = operator_id();
521
33
        for (auto& dest : dests_id()) {
522
33
            ss->related_op_ids.insert(dest);
523
33
        }
524
33
        return ss;
525
33
    }
526
33
}
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
169
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
169
    } else {
519
169
        auto ss = LocalStateType::SharedStateType::create_shared();
520
169
        ss->id = operator_id();
521
169
        for (auto& dest : dests_id()) {
522
169
            ss->related_op_ids.insert(dest);
523
169
        }
524
169
        return ss;
525
169
    }
526
169
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
605k
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
605k
    } else {
519
605k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
605k
        ss->id = operator_id();
521
605k
        for (auto& dest : dests_id()) {
522
599k
            ss->related_op_ids.insert(dest);
523
599k
        }
524
605k
        return ss;
525
605k
    }
526
605k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.86k
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
6.86k
    } else {
519
6.86k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.86k
        ss->id = operator_id();
521
6.86k
        for (auto& dest : dests_id()) {
522
6.85k
            ss->related_op_ids.insert(dest);
523
6.85k
        }
524
6.86k
        return ss;
525
6.86k
    }
526
6.86k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
466
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
466
    } else {
519
466
        auto ss = LocalStateType::SharedStateType::create_shared();
520
466
        ss->id = operator_id();
521
467
        for (auto& dest : dests_id()) {
522
467
            ss->related_op_ids.insert(dest);
523
467
        }
524
466
        return ss;
525
466
    }
526
466
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.57k
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.57k
    } else {
519
2.57k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.57k
        ss->id = operator_id();
521
2.57k
        for (auto& dest : dests_id()) {
522
2.57k
            ss->related_op_ids.insert(dest);
523
2.57k
        }
524
2.57k
        return ss;
525
2.57k
    }
526
2.57k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.47k
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.47k
    } else {
519
2.47k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.47k
        ss->id = operator_id();
521
2.47k
        for (auto& dest : dests_id()) {
522
2.46k
            ss->related_op_ids.insert(dest);
523
2.46k
        }
524
2.47k
        return ss;
525
2.47k
    }
526
2.47k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
569
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
569
    } else {
519
569
        auto ss = LocalStateType::SharedStateType::create_shared();
520
569
        ss->id = operator_id();
521
569
        for (auto& dest : dests_id()) {
522
565
            ss->related_op_ids.insert(dest);
523
565
        }
524
569
        return ss;
525
569
    }
526
569
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
107
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
107
    } else {
519
107
        auto ss = LocalStateType::SharedStateType::create_shared();
520
107
        ss->id = operator_id();
521
107
        for (auto& dest : dests_id()) {
522
107
            ss->related_op_ids.insert(dest);
523
107
        }
524
107
        return ss;
525
107
    }
526
107
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.40M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.40M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.40M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.40M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.40M
    return Status::OK();
534
2.40M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
72.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
72.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
72.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
72.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
72.4k
    return Status::OK();
534
72.4k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
256k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
256k
    auto local_state = LocalStateType::create_unique(state, this);
531
256k
    RETURN_IF_ERROR(local_state->init(state, info));
532
256k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
256k
    return Status::OK();
534
256k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
126
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
126
    auto local_state = LocalStateType::create_unique(state, this);
531
126
    RETURN_IF_ERROR(local_state->init(state, info));
532
126
    state->emplace_local_state(operator_id(), std::move(local_state));
533
126
    return Status::OK();
534
126
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.24k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.24k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.24k
    return Status::OK();
534
3.24k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
13.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
13.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
13.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
13.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
13.0k
    return Status::OK();
534
13.0k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
12.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
12.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
12.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
12.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
12.1k
    return Status::OK();
534
12.1k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
24
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
24
    auto local_state = LocalStateType::create_unique(state, this);
531
24
    RETURN_IF_ERROR(local_state->init(state, info));
532
24
    state->emplace_local_state(operator_id(), std::move(local_state));
533
24
    return Status::OK();
534
24
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
232k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
232k
    auto local_state = LocalStateType::create_unique(state, this);
531
232k
    RETURN_IF_ERROR(local_state->init(state, info));
532
232k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
232k
    return Status::OK();
534
232k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
104k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
104k
    auto local_state = LocalStateType::create_unique(state, this);
531
104k
    RETURN_IF_ERROR(local_state->init(state, info));
532
104k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
104k
    return Status::OK();
534
104k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
61.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
61.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
61.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
61.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
61.3k
    return Status::OK();
534
61.3k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
160
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
160
    auto local_state = LocalStateType::create_unique(state, this);
531
160
    RETURN_IF_ERROR(local_state->init(state, info));
532
160
    state->emplace_local_state(operator_id(), std::move(local_state));
533
160
    return Status::OK();
534
160
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.12k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.12k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.12k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.12k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.12k
    return Status::OK();
534
5.12k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
354k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
354k
    auto local_state = LocalStateType::create_unique(state, this);
531
354k
    RETURN_IF_ERROR(local_state->init(state, info));
532
354k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
354k
    return Status::OK();
534
354k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.23k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.23k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.23k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.23k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.23k
    return Status::OK();
534
1.23k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.83k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.83k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.83k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.83k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.83k
    return Status::OK();
534
6.83k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.55k
    return Status::OK();
534
1.55k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
55.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
55.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
55.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
55.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
55.3k
    return Status::OK();
534
55.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.94k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.94k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.94k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.94k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.94k
    return Status::OK();
534
6.94k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
358
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
358
    auto local_state = LocalStateType::create_unique(state, this);
531
358
    RETURN_IF_ERROR(local_state->init(state, info));
532
358
    state->emplace_local_state(operator_id(), std::move(local_state));
533
358
    return Status::OK();
534
358
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.58k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.58k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.58k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.58k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.58k
    return Status::OK();
534
2.58k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.49k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.49k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.49k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.49k
    return Status::OK();
534
2.49k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
502
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
502
    auto local_state = LocalStateType::create_unique(state, this);
531
502
    RETURN_IF_ERROR(local_state->init(state, info));
532
502
    state->emplace_local_state(operator_id(), std::move(local_state));
533
502
    return Status::OK();
534
502
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.69k
    return Status::OK();
534
1.69k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.8k
    return Status::OK();
534
10.8k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
770k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
770k
    auto local_state = LocalStateType::create_unique(state, this);
531
770k
    RETURN_IF_ERROR(local_state->init(state, info));
532
770k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
770k
    return Status::OK();
534
770k
}
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
798
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
798
    auto local_state = LocalStateType::create_unique(state, this);
531
798
    RETURN_IF_ERROR(local_state->init(state, info));
532
798
    state->emplace_local_state(operator_id(), std::move(local_state));
533
798
    return Status::OK();
534
798
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.10k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.10k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.10k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.10k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.10k
    return Status::OK();
534
1.10k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.77k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.77k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.77k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.77k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.77k
    return Status::OK();
534
7.77k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
412k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
412k
    auto local_state = LocalStateType::create_unique(state, this);
531
412k
    RETURN_IF_ERROR(local_state->init(state, info));
532
412k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
412k
    return Status::OK();
534
412k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.95M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.38M
        : _num_rows_returned(0),
542
2.38M
          _rows_returned_counter(nullptr),
543
2.38M
          _parent(parent),
544
2.38M
          _state(state),
545
2.38M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.40M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.40M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.40M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.40M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.40M
    _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
2.40M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.40M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.40M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.40M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.40M
    if constexpr (!is_fake_shared) {
560
1.34M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
843k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
843k
                                    .first.get()
563
843k
                                    ->template cast<SharedStateArg>();
564
565
843k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
843k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
843k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
843k
        } else if (info.shared_state) {
569
431k
            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
431k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
431k
            _dependency = _shared_state->create_source_dependency(
576
431k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
431k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
431k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
431k
        } else {
580
71.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
9.07k
                DCHECK(false);
582
9.07k
            }
583
71.6k
        }
584
1.34M
    }
585
586
2.40M
    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
2.40M
    _rows_returned_counter =
591
2.40M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.40M
    _blocks_returned_counter =
593
2.40M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.40M
    _output_block_bytes_counter =
595
2.40M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.40M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.40M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.40M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.40M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.40M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.40M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.40M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.40M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.40M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.40M
    _memory_used_counter =
606
2.40M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.40M
    _common_profile->add_info_string("IsColocate",
608
2.40M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.40M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.40M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.40M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.40M
    return Status::OK();
613
2.40M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
72.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
72.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
72.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
72.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
72.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
72.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
72.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
72.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
72.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
72.6k
    if constexpr (!is_fake_shared) {
560
72.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
16.8k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
16.8k
                                    .first.get()
563
16.8k
                                    ->template cast<SharedStateArg>();
564
565
16.8k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
16.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
16.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
55.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
54.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
54.6k
            _dependency = _shared_state->create_source_dependency(
576
54.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
54.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
54.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
54.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.12k
        }
584
72.6k
    }
585
586
72.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
72.6k
    _rows_returned_counter =
591
72.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
72.6k
    _blocks_returned_counter =
593
72.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
72.6k
    _output_block_bytes_counter =
595
72.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
72.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
72.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
72.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
72.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
72.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
72.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
72.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
72.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
72.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
72.6k
    _memory_used_counter =
606
72.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
72.6k
    _common_profile->add_info_string("IsColocate",
608
72.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
72.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
72.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
72.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
72.6k
    return Status::OK();
613
72.6k
}
_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
245k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
245k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
245k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
245k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
245k
    _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
245k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
245k
    _operator_profile->add_child(_common_profile.get(), true);
557
245k
    _operator_profile->add_child(_custom_profile.get(), true);
558
245k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
245k
    if constexpr (!is_fake_shared) {
560
245k
        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
245k
        } 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
237k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
237k
            _dependency = _shared_state->create_source_dependency(
576
237k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
237k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
237k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
237k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
8.26k
        }
584
245k
    }
585
586
245k
    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
245k
    _rows_returned_counter =
591
245k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
245k
    _blocks_returned_counter =
593
245k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
245k
    _output_block_bytes_counter =
595
245k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
245k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
245k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
245k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
245k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
245k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
245k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
245k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
245k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
245k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
245k
    _memory_used_counter =
606
245k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
245k
    _common_profile->add_info_string("IsColocate",
608
245k
                                     std::to_string(_parent->is_colocated_operator()));
609
245k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
245k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
245k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
245k
    return Status::OK();
613
245k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
24
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
24
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
24
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
24
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
24
    _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
24
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
24
    _operator_profile->add_child(_common_profile.get(), true);
557
24
    _operator_profile->add_child(_custom_profile.get(), true);
558
24
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
24
    if constexpr (!is_fake_shared) {
560
24
        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
24
        } 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
24
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
24
            _dependency = _shared_state->create_source_dependency(
576
24
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
24
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
24
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
24
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
24
    }
585
586
24
    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
24
    _rows_returned_counter =
591
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
24
    _blocks_returned_counter =
593
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
24
    _output_block_bytes_counter =
595
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
24
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
24
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
24
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
24
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
24
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
24
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
24
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
24
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
24
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
24
    _memory_used_counter =
606
24
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
24
    _common_profile->add_info_string("IsColocate",
608
24
                                     std::to_string(_parent->is_colocated_operator()));
609
24
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
24
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
24
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
24
    return Status::OK();
613
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.85k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.85k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.85k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.85k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.85k
    _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
6.85k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.85k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.85k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.85k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.85k
    if constexpr (!is_fake_shared) {
560
6.85k
        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
6.85k
        } 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
6.82k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.82k
            _dependency = _shared_state->create_source_dependency(
576
6.82k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.82k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.82k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.82k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
26
        }
584
6.85k
    }
585
586
6.85k
    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
6.85k
    _rows_returned_counter =
591
6.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.85k
    _blocks_returned_counter =
593
6.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.85k
    _output_block_bytes_counter =
595
6.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.85k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.85k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.85k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.85k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.85k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.85k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.85k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.85k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.85k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.85k
    _memory_used_counter =
606
6.85k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.85k
    _common_profile->add_info_string("IsColocate",
608
6.85k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.85k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.85k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.85k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.85k
    return Status::OK();
613
6.85k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
13.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
13.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
13.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
13.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
13.1k
    _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
13.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
13.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
13.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
13.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
13.1k
    if constexpr (!is_fake_shared) {
560
13.1k
        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
13.1k
        } 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
13.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
13.0k
            _dependency = _shared_state->create_source_dependency(
576
13.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
13.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
13.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
13.0k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51
        }
584
13.1k
    }
585
586
13.1k
    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
13.1k
    _rows_returned_counter =
591
13.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
13.1k
    _blocks_returned_counter =
593
13.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
13.1k
    _output_block_bytes_counter =
595
13.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
13.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
13.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
13.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
13.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
13.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
13.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
13.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
13.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
13.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
13.1k
    _memory_used_counter =
606
13.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
13.1k
    _common_profile->add_info_string("IsColocate",
608
13.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
13.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
13.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
13.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
13.1k
    return Status::OK();
613
13.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
104k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
104k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
104k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
104k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
104k
    _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
104k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
104k
    _operator_profile->add_child(_common_profile.get(), true);
557
104k
    _operator_profile->add_child(_custom_profile.get(), true);
558
104k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
104k
    if constexpr (!is_fake_shared) {
560
104k
        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
104k
        } 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.52k
        }
584
104k
    }
585
586
104k
    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
104k
    _rows_returned_counter =
591
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
104k
    _blocks_returned_counter =
593
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
104k
    _output_block_bytes_counter =
595
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
104k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
104k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
104k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
104k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
104k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
104k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
104k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
104k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
104k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
104k
    _memory_used_counter =
606
104k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
104k
    _common_profile->add_info_string("IsColocate",
608
104k
                                     std::to_string(_parent->is_colocated_operator()));
609
104k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
104k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
104k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
104k
    return Status::OK();
613
104k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
61.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
61.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
61.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
61.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
61.3k
    _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
61.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
61.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
61.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
61.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
61.3k
    if constexpr (!is_fake_shared) {
560
61.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
61.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
61.2k
                                    .first.get()
563
61.2k
                                    ->template cast<SharedStateArg>();
564
565
61.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
61.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
61.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
61.2k
        } 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
57
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
57
        }
584
61.3k
    }
585
586
61.3k
    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
61.3k
    _rows_returned_counter =
591
61.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
61.3k
    _blocks_returned_counter =
593
61.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
61.3k
    _output_block_bytes_counter =
595
61.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
61.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
61.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
61.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
61.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
61.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
61.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
61.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
61.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
61.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
61.3k
    _memory_used_counter =
606
61.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
61.3k
    _common_profile->add_info_string("IsColocate",
608
61.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
61.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
61.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
61.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
61.3k
    return Status::OK();
613
61.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
160
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
160
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
160
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
160
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
160
    _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
160
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
160
    _operator_profile->add_child(_common_profile.get(), true);
557
160
    _operator_profile->add_child(_custom_profile.get(), true);
558
160
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
160
    if constexpr (!is_fake_shared) {
560
160
        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
160
        } 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
160
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
160
            _dependency = _shared_state->create_source_dependency(
576
160
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
160
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
160
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
160
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
160
    }
585
586
160
    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
160
    _rows_returned_counter =
591
160
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
160
    _blocks_returned_counter =
593
160
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
160
    _output_block_bytes_counter =
595
160
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
160
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
160
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
160
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
160
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
160
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
160
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
160
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
160
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
160
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
160
    _memory_used_counter =
606
160
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
160
    _common_profile->add_info_string("IsColocate",
608
160
                                     std::to_string(_parent->is_colocated_operator()));
609
160
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
160
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
160
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
160
    return Status::OK();
613
160
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.05M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.05M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.05M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.05M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.05M
    _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.05M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.05M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.05M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.05M
    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
1.05M
    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.05M
    _rows_returned_counter =
591
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.05M
    _blocks_returned_counter =
593
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.05M
    _output_block_bytes_counter =
595
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.05M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.05M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.05M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.05M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.05M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.05M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.05M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.05M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.05M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.05M
    _memory_used_counter =
606
1.05M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.05M
    _common_profile->add_info_string("IsColocate",
608
1.05M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.05M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.05M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.05M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.05M
    return Status::OK();
613
1.05M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.2k
    _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.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.2k
    if constexpr (!is_fake_shared) {
560
55.2k
        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.2k
        } 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.79k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.79k
            _dependency = _shared_state->create_source_dependency(
576
3.79k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.79k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.79k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.5k
        }
584
55.2k
    }
585
586
55.2k
    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.2k
    _rows_returned_counter =
591
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.2k
    _blocks_returned_counter =
593
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.2k
    _output_block_bytes_counter =
595
55.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.2k
    _memory_used_counter =
606
55.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.2k
    _common_profile->add_info_string("IsColocate",
608
55.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.2k
    return Status::OK();
613
55.2k
}
_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
6.94k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.94k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.94k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.94k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.94k
    _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
6.94k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.94k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.94k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.94k
    if constexpr (!is_fake_shared) {
560
6.94k
        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
6.94k
        } 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
6.93k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.93k
            _dependency = _shared_state->create_source_dependency(
576
6.93k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.93k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.93k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.93k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
11
        }
584
6.94k
    }
585
586
6.94k
    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
6.94k
    _rows_returned_counter =
591
6.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.94k
    _blocks_returned_counter =
593
6.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.94k
    _output_block_bytes_counter =
595
6.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.94k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.94k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.94k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.94k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.94k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.94k
    _memory_used_counter =
606
6.94k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.94k
    _common_profile->add_info_string("IsColocate",
608
6.94k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.94k
    return Status::OK();
613
6.94k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
466
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
466
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
466
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
466
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
466
    _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
466
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
466
    _operator_profile->add_child(_common_profile.get(), true);
557
466
    _operator_profile->add_child(_custom_profile.get(), true);
558
466
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
466
    if constexpr (!is_fake_shared) {
560
466
        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
466
        } 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
464
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
464
            _dependency = _shared_state->create_source_dependency(
576
464
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
464
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
464
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
464
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2
        }
584
466
    }
585
586
466
    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
466
    _rows_returned_counter =
591
466
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
466
    _blocks_returned_counter =
593
466
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
466
    _output_block_bytes_counter =
595
466
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
466
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
466
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
466
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
466
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
466
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
466
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
466
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
466
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
466
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
466
    _memory_used_counter =
606
466
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
466
    _common_profile->add_info_string("IsColocate",
608
466
                                     std::to_string(_parent->is_colocated_operator()));
609
466
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
466
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
466
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
466
    return Status::OK();
613
466
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.09k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.09k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.09k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.09k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.09k
    _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.09k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.09k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.09k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.09k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.09k
    if constexpr (!is_fake_shared) {
560
5.09k
        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.09k
        } 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.05k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.05k
            _dependency = _shared_state->create_source_dependency(
576
5.05k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.05k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.05k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.05k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
40
        }
584
5.09k
    }
585
586
5.09k
    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.09k
    _rows_returned_counter =
591
5.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.09k
    _blocks_returned_counter =
593
5.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.09k
    _output_block_bytes_counter =
595
5.09k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.09k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.09k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.09k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.09k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.09k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.09k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.09k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.09k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.09k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.09k
    _memory_used_counter =
606
5.09k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.09k
    _common_profile->add_info_string("IsColocate",
608
5.09k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.09k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.09k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.09k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.09k
    return Status::OK();
613
5.09k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
774k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
774k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
774k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
774k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
774k
    _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
774k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
774k
    _operator_profile->add_child(_common_profile.get(), true);
557
774k
    _operator_profile->add_child(_custom_profile.get(), true);
558
774k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
774k
    if constexpr (!is_fake_shared) {
560
774k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
765k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
765k
                                    .first.get()
563
765k
                                    ->template cast<SharedStateArg>();
564
565
765k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
765k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
765k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
765k
        } 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.07k
        } else {
580
9.07k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
9.07k
                DCHECK(false);
582
9.07k
            }
583
9.07k
        }
584
774k
    }
585
586
774k
    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
774k
    _rows_returned_counter =
591
774k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
774k
    _blocks_returned_counter =
593
774k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
774k
    _output_block_bytes_counter =
595
774k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
774k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
774k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
774k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
774k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
774k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
774k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
774k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
774k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
774k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
774k
    _memory_used_counter =
606
774k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
774k
    _common_profile->add_info_string("IsColocate",
608
774k
                                     std::to_string(_parent->is_colocated_operator()));
609
774k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
774k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
774k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
774k
    return Status::OK();
613
774k
}
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
2.41M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.41M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.73M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
316k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
316k
    }
621
2.41M
    if (_parent->has_projection()) {
622
401k
        const auto& projection = *_parent->_projection;
623
401k
        _projections.resize(projection.projections.size());
624
2.49M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.09M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.09M
        }
627
401k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
422k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
20.8k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
275k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
254k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
254k
                        state, _intermediate_projections[i][j]));
633
254k
            }
634
20.8k
        }
635
401k
    }
636
2.41M
    return Status::OK();
637
2.41M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
72.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
72.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
74.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.95k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.95k
    }
621
72.7k
    if (_parent->has_projection()) {
622
72.7k
        const auto& projection = *_parent->_projection;
623
72.7k
        _projections.resize(projection.projections.size());
624
389k
        for (size_t i = 0; i < _projections.size(); i++) {
625
316k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
316k
        }
627
72.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
82.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.95k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
209k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
199k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
199k
                        state, _intermediate_projections[i][j]));
633
199k
            }
634
9.95k
        }
635
72.7k
    }
636
72.7k
    return Status::OK();
637
72.7k
}
_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
246k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
246k
    _conjuncts.resize(_parent->_conjuncts.size());
618
246k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
246k
    if (_parent->has_projection()) {
622
83
        const auto& projection = *_parent->_projection;
623
83
        _projections.resize(projection.projections.size());
624
420
        for (size_t i = 0; i < _projections.size(); i++) {
625
337
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
337
        }
627
83
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
83
        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
83
    }
636
246k
    return Status::OK();
637
246k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
24
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
24
    _conjuncts.resize(_parent->_conjuncts.size());
618
24
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
24
    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
24
    return Status::OK();
637
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.86k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.86k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.93k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
74
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
74
    }
621
6.86k
    if (_parent->has_projection()) {
622
6.86k
        const auto& projection = *_parent->_projection;
623
6.86k
        _projections.resize(projection.projections.size());
624
31.3k
        for (size_t i = 0; i < _projections.size(); i++) {
625
24.4k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
24.4k
        }
627
6.86k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.90k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
47
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
342
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
295
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
295
                        state, _intermediate_projections[i][j]));
633
295
            }
634
47
        }
635
6.86k
    }
636
6.86k
    return Status::OK();
637
6.86k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
13.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
13.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
13.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
822
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
822
    }
621
13.1k
    if (_parent->has_projection()) {
622
7.21k
        const auto& projection = *_parent->_projection;
623
7.21k
        _projections.resize(projection.projections.size());
624
29.6k
        for (size_t i = 0; i < _projections.size(); i++) {
625
22.4k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
22.4k
        }
627
7.21k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
7.31k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
95
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
717
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
622
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
622
                        state, _intermediate_projections[i][j]));
633
622
            }
634
95
        }
635
7.21k
    }
636
13.1k
    return Status::OK();
637
13.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
104k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
104k
    _conjuncts.resize(_parent->_conjuncts.size());
618
106k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.59k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.59k
    }
621
104k
    if (_parent->has_projection()) {
622
33.0k
        const auto& projection = *_parent->_projection;
623
33.0k
        _projections.resize(projection.projections.size());
624
295k
        for (size_t i = 0; i < _projections.size(); i++) {
625
262k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
262k
        }
627
33.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
33.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
731
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.48k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.74k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.74k
                        state, _intermediate_projections[i][j]));
633
3.74k
            }
634
731
        }
635
33.0k
    }
636
104k
    return Status::OK();
637
104k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
61.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
61.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
61.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
17
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
17
    }
621
61.3k
    if (_parent->has_projection()) {
622
195
        const auto& projection = *_parent->_projection;
623
195
        _projections.resize(projection.projections.size());
624
884
        for (size_t i = 0; i < _projections.size(); i++) {
625
689
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
689
        }
627
195
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
195
        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
195
    }
636
61.3k
    return Status::OK();
637
61.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
164
    _conjuncts.resize(_parent->_conjuncts.size());
618
164
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
164
    if (_parent->has_projection()) {
622
135
        const auto& projection = *_parent->_projection;
623
135
        _projections.resize(projection.projections.size());
624
405
        for (size_t i = 0; i < _projections.size(); i++) {
625
270
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
270
        }
627
135
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
135
        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
135
    }
636
164
    return Status::OK();
637
164
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
1.06M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.06M
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.37M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
310k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
310k
    }
621
1.06M
    if (_parent->has_projection()) {
622
269k
        const auto& projection = *_parent->_projection;
623
269k
        _projections.resize(projection.projections.size());
624
1.63M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.36M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.36M
        }
627
269k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
279k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.94k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
58.3k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
48.4k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
48.4k
                        state, _intermediate_projections[i][j]));
633
48.4k
            }
634
9.94k
        }
635
269k
    }
636
1.06M
    return Status::OK();
637
1.06M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
55.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
55.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
55.5k
    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.5k
    if (_parent->has_projection()) {
622
11.6k
        const auto& projection = *_parent->_projection;
623
11.6k
        _projections.resize(projection.projections.size());
624
113k
        for (size_t i = 0; i < _projections.size(); i++) {
625
101k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
101k
        }
627
11.6k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
95
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.84k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.74k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.74k
                        state, _intermediate_projections[i][j]));
633
1.74k
            }
634
95
        }
635
11.6k
    }
636
55.5k
    return Status::OK();
637
55.5k
}
_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
6.93k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.93k
    _conjuncts.resize(_parent->_conjuncts.size());
618
8.16k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.22k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.22k
    }
621
6.93k
    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
6.93k
    return Status::OK();
637
6.93k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
468
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
468
    _conjuncts.resize(_parent->_conjuncts.size());
618
468
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
468
    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
468
    return Status::OK();
637
468
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.10k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.10k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.10k
    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.10k
    if (_parent->has_projection()) {
622
63
        const auto& projection = *_parent->_projection;
623
63
        _projections.resize(projection.projections.size());
624
237
        for (size_t i = 0; i < _projections.size(); i++) {
625
174
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
174
        }
627
63
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
63
        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
63
    }
636
5.10k
    return Status::OK();
637
5.10k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
777k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
777k
    _conjuncts.resize(_parent->_conjuncts.size());
618
777k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
777k
    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
777k
    return Status::OK();
637
777k
}
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.01k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.01k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.01k
    _terminated = true;
645
7.01k
    return Status::OK();
646
7.01k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
560
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
560
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
560
    _terminated = true;
645
560
    return Status::OK();
646
560
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
23
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
23
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
23
    _terminated = true;
645
23
    return Status::OK();
646
23
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_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
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
135
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
135
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
135
    _terminated = true;
645
135
    return Status::OK();
646
135
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
5.18k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5.18k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5.18k
    _terminated = true;
645
5.18k
    return Status::OK();
646
5.18k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
53
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
53
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
53
    _terminated = true;
645
53
    return Status::OK();
646
53
}
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
5
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5
    _terminated = true;
645
5
    return Status::OK();
646
5
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
987
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
987
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
987
    _terminated = true;
645
987
    return Status::OK();
646
987
}
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.69M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.69M
    if (_closed) {
651
279k
        return Status::OK();
652
279k
    }
653
2.41M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.34M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.34M
    }
656
2.41M
    _closed = true;
657
2.41M
    return Status::OK();
658
2.69M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
72.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
72.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
72.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
72.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
72.7k
    }
656
72.7k
    _closed = true;
657
72.7k
    return Status::OK();
658
72.7k
}
_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
488k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
488k
    if (_closed) {
651
244k
        return Status::OK();
652
244k
    }
653
243k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
243k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
243k
    }
656
243k
    _closed = true;
657
243k
    return Status::OK();
658
488k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
24
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
24
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
24
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
24
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
24
    }
656
24
    _closed = true;
657
24
    return Status::OK();
658
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.84k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.84k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.84k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.84k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.84k
    }
656
6.84k
    _closed = true;
657
6.84k
    return Status::OK();
658
6.84k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
26.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
26.3k
    if (_closed) {
651
13.3k
        return Status::OK();
652
13.3k
    }
653
13.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
13.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
13.0k
    }
656
13.0k
    _closed = true;
657
13.0k
    return Status::OK();
658
26.3k
}
_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
61.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
61.0k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
61.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
61.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
61.0k
    }
656
61.0k
    _closed = true;
657
61.0k
    return Status::OK();
658
61.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
159
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
159
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
159
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
159
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
159
    }
656
159
    _closed = true;
657
159
    return Status::OK();
658
159
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.08M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.08M
    if (_closed) {
651
15.7k
        return Status::OK();
652
15.7k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
1.06M
    _closed = true;
657
1.06M
    return Status::OK();
658
1.08M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
55.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
55.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
55.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
55.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
55.5k
    }
656
55.5k
    _closed = true;
657
55.5k
    return Status::OK();
658
55.5k
}
_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
6.91k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.91k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.91k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.91k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.91k
    }
656
6.91k
    _closed = true;
657
6.91k
    return Status::OK();
658
6.91k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
731
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
731
    if (_closed) {
651
365
        return Status::OK();
652
365
    }
653
366
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
366
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
366
    }
656
366
    _closed = true;
657
366
    return Status::OK();
658
731
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.2k
    if (_closed) {
651
5.19k
        return Status::OK();
652
5.19k
    }
653
5.09k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.09k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.09k
    }
656
5.09k
    _closed = true;
657
5.09k
    return Status::OK();
658
10.2k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
778k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
778k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
778k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
778k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
778k
    }
656
778k
    _closed = true;
657
778k
    return Status::OK();
658
778k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
335
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
335
    if (_closed) {
651
175
        return Status::OK();
652
175
    }
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
335
}
659
660
template <typename SharedState>
661
1.96M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.96M
    _operator_profile =
664
1.96M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.96M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.96M
    _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.96M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.96M
    _operator_profile->add_child(_common_profile, true);
673
1.96M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.96M
    _operator_profile->set_metadata(_parent->node_id());
676
1.96M
    _wait_for_finish_dependency_timer =
677
1.96M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.96M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.96M
    if constexpr (!is_fake_shared) {
680
1.36M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.36M
            info.shared_state_map.end()) {
682
384k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
306k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
306k
            }
685
384k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
384k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
384k
                                                  ? 0
688
384k
                                                  : info.task_idx]
689
384k
                                  .get();
690
384k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
977k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
977k
            _shared_state = info.shared_state->template cast<SharedState>();
696
977k
            _dependency = _shared_state->create_sink_dependency(
697
977k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
977k
        }
699
1.36M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.36M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.36M
    }
702
703
1.96M
    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.96M
    _rows_input_counter =
708
1.96M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.96M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.96M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.96M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.96M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.96M
    _memory_used_counter =
714
1.96M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.96M
    _common_profile->add_info_string("IsColocate",
716
1.96M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.96M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.96M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.96M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.96M
    return Status::OK();
721
1.96M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
120k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
120k
    _operator_profile =
664
120k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
120k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
120k
    _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
120k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
120k
    _operator_profile->add_child(_common_profile, true);
673
120k
    _operator_profile->add_child(_custom_profile, true);
674
675
120k
    _operator_profile->set_metadata(_parent->node_id());
676
120k
    _wait_for_finish_dependency_timer =
677
120k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
120k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
120k
    if constexpr (!is_fake_shared) {
680
120k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
120k
            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
17.1k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
17.1k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
17.1k
                                                  ? 0
688
17.1k
                                                  : info.task_idx]
689
17.1k
                                  .get();
690
17.1k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
103k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
103k
            _shared_state = info.shared_state->template cast<SharedState>();
696
103k
            _dependency = _shared_state->create_sink_dependency(
697
103k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
103k
        }
699
120k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
120k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
120k
    }
702
703
120k
    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
120k
    _rows_input_counter =
708
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
120k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
120k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
120k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
120k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
120k
    _memory_used_counter =
714
120k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
120k
    _common_profile->add_info_string("IsColocate",
716
120k
                                     std::to_string(_parent->is_colocated_operator()));
717
120k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
120k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
120k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
120k
    return Status::OK();
721
120k
}
_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
245k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
245k
    _operator_profile =
664
245k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
245k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
245k
    _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
245k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
245k
    _operator_profile->add_child(_common_profile, true);
673
245k
    _operator_profile->add_child(_custom_profile, true);
674
675
245k
    _operator_profile->set_metadata(_parent->node_id());
676
245k
    _wait_for_finish_dependency_timer =
677
245k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
245k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
245k
    if constexpr (!is_fake_shared) {
680
245k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
245k
            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
245k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
245k
            _shared_state = info.shared_state->template cast<SharedState>();
696
245k
            _dependency = _shared_state->create_sink_dependency(
697
245k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
245k
        }
699
245k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
245k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
245k
    }
702
703
245k
    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
245k
    _rows_input_counter =
708
245k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
245k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
245k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
245k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
245k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
245k
    _memory_used_counter =
714
245k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
245k
    _common_profile->add_info_string("IsColocate",
716
245k
                                     std::to_string(_parent->is_colocated_operator()));
717
245k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
245k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
245k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
245k
    return Status::OK();
721
245k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
31
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
31
    _operator_profile =
664
31
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
31
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
31
    _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
31
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
31
    _operator_profile->add_child(_common_profile, true);
673
31
    _operator_profile->add_child(_custom_profile, true);
674
675
31
    _operator_profile->set_metadata(_parent->node_id());
676
31
    _wait_for_finish_dependency_timer =
677
31
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
31
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
31
    if constexpr (!is_fake_shared) {
680
31
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
31
            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
31
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
31
            _shared_state = info.shared_state->template cast<SharedState>();
696
31
            _dependency = _shared_state->create_sink_dependency(
697
31
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
31
        }
699
31
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
31
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
31
    }
702
703
31
    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
31
    _rows_input_counter =
708
31
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
31
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
31
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
31
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
31
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
31
    _memory_used_counter =
714
31
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
31
    _common_profile->add_info_string("IsColocate",
716
31
                                     std::to_string(_parent->is_colocated_operator()));
717
31
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
31
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
31
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
31
    return Status::OK();
721
31
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.85k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.85k
    _operator_profile =
664
6.85k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.85k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.85k
    _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
6.85k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.85k
    _operator_profile->add_child(_common_profile, true);
673
6.85k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.85k
    _operator_profile->set_metadata(_parent->node_id());
676
6.85k
    _wait_for_finish_dependency_timer =
677
6.85k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.85k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.85k
    if constexpr (!is_fake_shared) {
680
6.85k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.85k
            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
6.85k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.85k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.85k
            _dependency = _shared_state->create_sink_dependency(
697
6.85k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.85k
        }
699
6.85k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.85k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.85k
    }
702
703
6.85k
    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
6.85k
    _rows_input_counter =
708
6.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.85k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.85k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.85k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.85k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.85k
    _memory_used_counter =
714
6.85k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.85k
    _common_profile->add_info_string("IsColocate",
716
6.85k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.85k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.85k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.85k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.85k
    return Status::OK();
721
6.85k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
13.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
13.1k
    _operator_profile =
664
13.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
13.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
13.1k
    _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
13.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
13.1k
    _operator_profile->add_child(_common_profile, true);
673
13.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
13.1k
    _operator_profile->set_metadata(_parent->node_id());
676
13.1k
    _wait_for_finish_dependency_timer =
677
13.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
13.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
13.1k
    if constexpr (!is_fake_shared) {
680
13.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
13.1k
            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
13.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
13.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
13.1k
            _dependency = _shared_state->create_sink_dependency(
697
13.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
13.1k
        }
699
13.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
13.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
13.1k
    }
702
703
13.1k
    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
13.1k
    _rows_input_counter =
708
13.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
13.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
13.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
13.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
13.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
13.1k
    _memory_used_counter =
714
13.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
13.1k
    _common_profile->add_info_string("IsColocate",
716
13.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
13.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
13.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
13.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
13.1k
    return Status::OK();
721
13.1k
}
_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
61.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
61.3k
    _operator_profile =
664
61.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
61.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
61.3k
    _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
61.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
61.3k
    _operator_profile->add_child(_common_profile, true);
673
61.3k
    _operator_profile->add_child(_custom_profile, true);
674
675
61.3k
    _operator_profile->set_metadata(_parent->node_id());
676
61.3k
    _wait_for_finish_dependency_timer =
677
61.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
61.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
61.3k
    if constexpr (!is_fake_shared) {
680
61.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
61.3k
            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
61.3k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
61.3k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
61.3k
                                                  ? 0
688
61.3k
                                                  : info.task_idx]
689
61.3k
                                  .get();
690
61.3k
            _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
61.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
61.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
61.3k
    }
702
703
61.3k
    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
61.3k
    _rows_input_counter =
708
61.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
61.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
61.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
61.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
61.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
61.3k
    _memory_used_counter =
714
61.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
61.3k
    _common_profile->add_info_string("IsColocate",
716
61.3k
                                     std::to_string(_parent->is_colocated_operator()));
717
61.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
61.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
61.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
61.3k
    return Status::OK();
721
61.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
170
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
170
    _operator_profile =
664
170
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
170
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
170
    _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
170
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
170
    _operator_profile->add_child(_common_profile, true);
673
170
    _operator_profile->add_child(_custom_profile, true);
674
675
170
    _operator_profile->set_metadata(_parent->node_id());
676
170
    _wait_for_finish_dependency_timer =
677
170
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
170
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
170
    if constexpr (!is_fake_shared) {
680
170
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
170
            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
170
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
170
            _shared_state = info.shared_state->template cast<SharedState>();
696
170
            _dependency = _shared_state->create_sink_dependency(
697
170
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
170
        }
699
170
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
170
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
170
    }
702
703
170
    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
170
    _rows_input_counter =
708
170
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
170
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
170
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
170
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
170
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
170
    _memory_used_counter =
714
170
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
170
    _common_profile->add_info_string("IsColocate",
716
170
                                     std::to_string(_parent->is_colocated_operator()));
717
170
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
170
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
170
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
170
    return Status::OK();
721
170
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
605k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
605k
    _operator_profile =
664
605k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
605k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
605k
    _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
605k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
605k
    _operator_profile->add_child(_common_profile, true);
673
605k
    _operator_profile->add_child(_custom_profile, true);
674
675
605k
    _operator_profile->set_metadata(_parent->node_id());
676
605k
    _wait_for_finish_dependency_timer =
677
605k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
605k
    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
605k
    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
605k
    _rows_input_counter =
708
605k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
605k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
605k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
605k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
605k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
605k
    _memory_used_counter =
714
605k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
605k
    _common_profile->add_info_string("IsColocate",
716
605k
                                     std::to_string(_parent->is_colocated_operator()));
717
605k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
605k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
605k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
605k
    return Status::OK();
721
605k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.21k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.21k
    _operator_profile =
664
9.21k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.21k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.21k
    _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
9.21k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.21k
    _operator_profile->add_child(_common_profile, true);
673
9.21k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.21k
    _operator_profile->set_metadata(_parent->node_id());
676
9.21k
    _wait_for_finish_dependency_timer =
677
9.21k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.21k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.21k
    if constexpr (!is_fake_shared) {
680
9.21k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.21k
            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
9.21k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.21k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.21k
            _dependency = _shared_state->create_sink_dependency(
697
9.21k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.21k
        }
699
9.21k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.21k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.21k
    }
702
703
9.21k
    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
9.21k
    _rows_input_counter =
708
9.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.21k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.21k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.21k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.21k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.21k
    _memory_used_counter =
714
9.21k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.21k
    _common_profile->add_info_string("IsColocate",
716
9.21k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.21k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.21k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.21k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.21k
    return Status::OK();
721
9.21k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
467
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
467
    _operator_profile =
664
467
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
467
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
467
    _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
467
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
467
    _operator_profile->add_child(_common_profile, true);
673
467
    _operator_profile->add_child(_custom_profile, true);
674
675
467
    _operator_profile->set_metadata(_parent->node_id());
676
467
    _wait_for_finish_dependency_timer =
677
467
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
467
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
467
    if constexpr (!is_fake_shared) {
680
467
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
467
            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
467
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
467
            _shared_state = info.shared_state->template cast<SharedState>();
696
467
            _dependency = _shared_state->create_sink_dependency(
697
467
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
467
        }
699
467
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
467
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
467
    }
702
703
467
    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
467
    _rows_input_counter =
708
467
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
467
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
467
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
467
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
467
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
467
    _memory_used_counter =
714
467
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
467
    _common_profile->add_info_string("IsColocate",
716
467
                                     std::to_string(_parent->is_colocated_operator()));
717
467
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
467
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
467
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
467
    return Status::OK();
721
467
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.57k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.57k
    _operator_profile =
664
2.57k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.57k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.57k
    _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.57k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.57k
    _operator_profile->add_child(_common_profile, true);
673
2.57k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.57k
    _operator_profile->set_metadata(_parent->node_id());
676
2.57k
    _wait_for_finish_dependency_timer =
677
2.57k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.57k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.57k
    if constexpr (!is_fake_shared) {
680
2.57k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.57k
            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.57k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.57k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.57k
            _dependency = _shared_state->create_sink_dependency(
697
2.57k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.57k
        }
699
2.57k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.57k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.57k
    }
702
703
2.57k
    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.57k
    _rows_input_counter =
708
2.57k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.57k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.57k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.57k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.57k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.57k
    _memory_used_counter =
714
2.57k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.57k
    _common_profile->add_info_string("IsColocate",
716
2.57k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.57k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.57k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.57k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.57k
    return Status::OK();
721
2.57k
}
_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
306k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
306k
    _operator_profile =
664
306k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
306k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
306k
    _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
306k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
306k
    _operator_profile->add_child(_common_profile, true);
673
306k
    _operator_profile->add_child(_custom_profile, true);
674
675
306k
    _operator_profile->set_metadata(_parent->node_id());
676
306k
    _wait_for_finish_dependency_timer =
677
306k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
306k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
306k
    if constexpr (!is_fake_shared) {
680
306k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
306k
            info.shared_state_map.end()) {
682
306k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
306k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
306k
            }
685
306k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
306k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
306k
                                                  ? 0
688
306k
                                                  : info.task_idx]
689
306k
                                  .get();
690
306k
            _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
306k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
306k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
306k
    }
702
703
306k
    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
306k
    _rows_input_counter =
708
306k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
306k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
306k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
306k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
306k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
306k
    _memory_used_counter =
714
306k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
306k
    _common_profile->add_info_string("IsColocate",
716
306k
                                     std::to_string(_parent->is_colocated_operator()));
717
306k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
306k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
306k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
306k
    return Status::OK();
721
306k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
479k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
479k
    _operator_profile =
664
479k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
479k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
479k
    _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
479k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
479k
    _operator_profile->add_child(_common_profile, true);
673
479k
    _operator_profile->add_child(_custom_profile, true);
674
675
479k
    _operator_profile->set_metadata(_parent->node_id());
676
479k
    _wait_for_finish_dependency_timer =
677
479k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
479k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
479k
    if constexpr (!is_fake_shared) {
680
479k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
479k
            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
479k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
479k
            _shared_state = info.shared_state->template cast<SharedState>();
696
479k
            _dependency = _shared_state->create_sink_dependency(
697
479k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
479k
        }
699
479k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
479k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
479k
    }
702
703
479k
    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
479k
    _rows_input_counter =
708
479k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
479k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
479k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
479k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
479k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
479k
    _memory_used_counter =
714
479k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
479k
    _common_profile->add_info_string("IsColocate",
716
479k
                                     std::to_string(_parent->is_colocated_operator()));
717
479k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
479k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
479k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
479k
    return Status::OK();
721
479k
}
_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.97M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.97M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.97M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.36M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.36M
    }
731
1.97M
    _closed = true;
732
1.97M
    return Status::OK();
733
1.97M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
120k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
120k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
120k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
120k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
120k
    }
731
120k
    _closed = true;
732
120k
    return Status::OK();
733
120k
}
_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
245k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
245k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
245k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
245k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
245k
    }
731
245k
    _closed = true;
732
245k
    return Status::OK();
733
245k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
22
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
22
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
20
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
20
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
20
    }
731
20
    _closed = true;
732
20
    return Status::OK();
733
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
6.84k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
6.84k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
6.84k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
6.84k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
6.84k
    }
731
6.84k
    _closed = true;
732
6.84k
    return Status::OK();
733
6.84k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
13.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
13.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
13.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
13.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
13.0k
    }
731
13.0k
    _closed = true;
732
13.0k
    return Status::OK();
733
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
104k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
104k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
104k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
104k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
104k
    }
731
104k
    _closed = true;
732
104k
    return Status::OK();
733
104k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
60.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
60.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
60.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
60.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
60.9k
    }
731
60.9k
    _closed = true;
732
60.9k
    return Status::OK();
733
60.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
159
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
159
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
159
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
159
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
159
    }
731
159
    _closed = true;
732
159
    return Status::OK();
733
159
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
608k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
608k
    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
608k
    _closed = true;
732
608k
    return Status::OK();
733
608k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.20k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.20k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.20k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.20k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.20k
    }
731
9.20k
    _closed = true;
732
9.20k
    return Status::OK();
733
9.20k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
363
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
363
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
363
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
363
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
363
    }
731
363
    _closed = true;
732
363
    return Status::OK();
733
363
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.56k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.56k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.56k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.56k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.56k
    }
731
2.56k
    _closed = true;
732
2.56k
    return Status::OK();
733
2.56k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.4k
    }
731
12.4k
    _closed = true;
732
12.4k
    return Status::OK();
733
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
306k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
306k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
306k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
306k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
306k
    }
731
306k
    _closed = true;
732
306k
    return Status::OK();
733
306k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
480k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
480k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
480k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
480k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
480k
    }
731
480k
    _closed = true;
732
480k
    return Status::OK();
733
480k
}
_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
6.91k
                                                          bool* eos) {
738
6.91k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
6.91k
    return pull(state, block, eos);
740
6.91k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
37
                                                          bool* eos) {
738
37
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
37
    return pull(state, block, eos);
740
37
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
6.87k
                                                          bool* eos) {
738
6.87k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
6.87k
    return pull(state, block, eos);
740
6.87k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
664k
                                                         bool* eos) {
745
664k
    auto& local_state = get_local_state(state);
746
664k
    if (need_more_input_data(state)) {
747
629k
        local_state._child_block->clear_column_data(
748
629k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
629k
                        .num_slots());
750
629k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
629k
                state, local_state._child_block.get(), &local_state._child_eos));
752
629k
        *eos = local_state._child_eos;
753
629k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
72.1k
            return Status::OK();
755
72.1k
        }
756
557k
        {
757
557k
            SCOPED_TIMER(local_state.exec_time_counter());
758
557k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
557k
        }
760
557k
    }
761
762
592k
    if (!need_more_input_data(state)) {
763
561k
        SCOPED_TIMER(local_state.exec_time_counter());
764
561k
        bool new_eos = false;
765
561k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
561k
        if (new_eos) {
767
482k
            *eos = true;
768
482k
        } else if (!need_more_input_data(state)) {
769
25.9k
            *eos = false;
770
25.9k
        }
771
561k
    }
772
592k
    return Status::OK();
773
592k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
131k
                                                         bool* eos) {
745
131k
    auto& local_state = get_local_state(state);
746
131k
    if (need_more_input_data(state)) {
747
109k
        local_state._child_block->clear_column_data(
748
109k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
109k
                        .num_slots());
750
109k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
109k
                state, local_state._child_block.get(), &local_state._child_eos));
752
109k
        *eos = local_state._child_eos;
753
109k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
25.3k
            return Status::OK();
755
25.3k
        }
756
84.3k
        {
757
84.3k
            SCOPED_TIMER(local_state.exec_time_counter());
758
84.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
84.3k
        }
760
84.3k
    }
761
762
106k
    if (!need_more_input_data(state)) {
763
106k
        SCOPED_TIMER(local_state.exec_time_counter());
764
106k
        bool new_eos = false;
765
106k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
106k
        if (new_eos) {
767
48.4k
            *eos = true;
768
57.5k
        } else if (!need_more_input_data(state)) {
769
11.4k
            *eos = false;
770
11.4k
        }
771
106k
    }
772
105k
    return Status::OK();
773
105k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.50k
                                                         bool* eos) {
745
4.50k
    auto& local_state = get_local_state(state);
746
4.50k
    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
755
            return Status::OK();
755
755
        }
756
1.83k
        {
757
1.83k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.83k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.83k
        }
760
1.83k
    }
761
762
3.75k
    if (!need_more_input_data(state)) {
763
3.75k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.75k
        bool new_eos = false;
765
3.75k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.75k
        if (new_eos) {
767
1.24k
            *eos = true;
768
2.51k
        } else if (!need_more_input_data(state)) {
769
1.90k
            *eos = false;
770
1.90k
        }
771
3.75k
    }
772
3.74k
    return Status::OK();
773
3.74k
}
_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
789
            return Status::OK();
755
789
        }
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
798
            *eos = true;
768
798
        } 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
17.9k
                                                         bool* eos) {
745
17.9k
    auto& local_state = get_local_state(state);
746
17.9k
    if (need_more_input_data(state)) {
747
17.9k
        local_state._child_block->clear_column_data(
748
17.9k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
17.9k
                        .num_slots());
750
17.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
17.9k
                state, local_state._child_block.get(), &local_state._child_eos));
752
17.9k
        *eos = local_state._child_eos;
753
17.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
4.15k
            return Status::OK();
755
4.15k
        }
756
13.7k
        {
757
13.7k
            SCOPED_TIMER(local_state.exec_time_counter());
758
13.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
13.7k
        }
760
13.7k
    }
761
762
13.7k
    if (!need_more_input_data(state)) {
763
7.82k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.82k
        bool new_eos = false;
765
7.82k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.82k
        if (new_eos) {
767
7.70k
            *eos = true;
768
7.70k
        } else if (!need_more_input_data(state)) {
769
8
            *eos = false;
770
8
        }
771
7.82k
    }
772
13.7k
    return Status::OK();
773
13.7k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
477k
                                                         bool* eos) {
745
477k
    auto& local_state = get_local_state(state);
746
478k
    if (need_more_input_data(state)) {
747
478k
        local_state._child_block->clear_column_data(
748
478k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
478k
                        .num_slots());
750
478k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
478k
                state, local_state._child_block.get(), &local_state._child_eos));
752
478k
        *eos = local_state._child_eos;
753
478k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
39.7k
            return Status::OK();
755
39.7k
        }
756
438k
        {
757
438k
            SCOPED_TIMER(local_state.exec_time_counter());
758
438k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
438k
        }
760
438k
    }
761
762
437k
    if (!need_more_input_data(state)) {
763
413k
        SCOPED_TIMER(local_state.exec_time_counter());
764
413k
        bool new_eos = false;
765
413k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
413k
        if (new_eos) {
767
412k
            *eos = true;
768
412k
        } else if (!need_more_input_data(state)) {
769
7
            *eos = false;
770
7
        }
771
413k
    }
772
437k
    return Status::OK();
773
437k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
23.4k
                                                         bool* eos) {
745
23.4k
    auto& local_state = get_local_state(state);
746
23.4k
    if (need_more_input_data(state)) {
747
11.2k
        local_state._child_block->clear_column_data(
748
11.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
11.2k
                        .num_slots());
750
11.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
11.2k
                state, local_state._child_block.get(), &local_state._child_eos));
752
11.2k
        *eos = local_state._child_eos;
753
11.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
694
            return Status::OK();
755
694
        }
756
10.6k
        {
757
10.6k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.6k
        }
760
10.6k
    }
761
762
22.7k
    if (!need_more_input_data(state)) {
763
22.1k
        SCOPED_TIMER(local_state.exec_time_counter());
764
22.1k
        bool new_eos = false;
765
22.1k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
22.1k
        if (new_eos) {
767
6.82k
            *eos = true;
768
15.3k
        } else if (!need_more_input_data(state)) {
769
12.1k
            *eos = false;
770
12.1k
        }
771
22.1k
    }
772
22.7k
    return Status::OK();
773
22.7k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
8.10k
                                                         bool* eos) {
745
8.10k
    auto& local_state = get_local_state(state);
746
8.10k
    if (need_more_input_data(state)) {
747
7.74k
        local_state._child_block->clear_column_data(
748
7.74k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.74k
                        .num_slots());
750
7.74k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.74k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.74k
        *eos = local_state._child_eos;
753
7.74k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
655
            return Status::OK();
755
655
        }
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.08k
            *eos = true;
768
5.08k
        } 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.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.1k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.1k
                                                         "AsyncWriterDependency", true);
781
49.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.1k
                             _finish_dependency));
783
784
49.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.1k
    return Status::OK();
787
49.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
360
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
360
    RETURN_IF_ERROR(Base::init(state, info));
779
360
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
360
                                                         "AsyncWriterDependency", true);
781
360
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
360
                             _finish_dependency));
783
784
360
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
360
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
360
    return Status::OK();
787
360
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
48.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
48.7k
    RETURN_IF_ERROR(Base::init(state, info));
779
48.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
48.7k
                                                         "AsyncWriterDependency", true);
781
48.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
48.7k
                             _finish_dependency));
783
784
48.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
48.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
48.7k
    return Status::OK();
787
48.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
36
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
36
    RETURN_IF_ERROR(Base::init(state, info));
779
36
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
36
                                                         "AsyncWriterDependency", true);
781
36
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
36
                             _finish_dependency));
783
784
36
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
36
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
36
    return Status::OK();
787
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
49.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.3k
    RETURN_IF_ERROR(Base::open(state));
793
49.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
389k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
340k
        RETURN_IF_ERROR(
796
340k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
340k
    }
798
49.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.3k
    return Status::OK();
800
49.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
359
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
359
    RETURN_IF_ERROR(Base::open(state));
793
359
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.86k
    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
359
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
359
    return Status::OK();
800
359
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
48.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.9k
    RETURN_IF_ERROR(Base::open(state));
793
48.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
387k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
338k
        RETURN_IF_ERROR(
796
338k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
338k
    }
798
48.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.9k
    return Status::OK();
800
48.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
36
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
36
    RETURN_IF_ERROR(Base::open(state));
793
36
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
648
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
612
        RETURN_IF_ERROR(
796
612
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
612
    }
798
36
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
36
    return Status::OK();
800
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
64.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.2k
    return _writer->sink(block, eos);
806
64.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.15k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.15k
    return _writer->sink(block, eos);
806
1.15k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
63.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.0k
    return _writer->sink(block, eos);
806
63.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
36
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
36
    return _writer->sink(block, eos);
806
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
49.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
49.4k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
49.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
49.4k
    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.5k
    if (_writer) {
818
49.5k
        Status st = _writer->get_writer_status();
819
49.5k
        if (exec_status.ok()) {
820
49.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.4k
                                                       : Status::Cancelled("force close"));
822
49.4k
        } else {
823
107
            _writer->force_close(exec_status);
824
107
        }
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.5k
        RETURN_IF_ERROR(st);
829
49.5k
    }
830
49.4k
    return Base::close(state, exec_status);
831
49.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
349
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
349
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
349
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
349
    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
349
    if (_writer) {
818
349
        Status st = _writer->get_writer_status();
819
349
        if (exec_status.ok()) {
820
349
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
349
                                                       : Status::Cancelled("force close"));
822
349
        } 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
349
        RETURN_IF_ERROR(st);
829
349
    }
830
349
    return Base::close(state, exec_status);
831
349
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
49.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
49.0k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
49.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
49.0k
    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.1k
    if (_writer) {
818
49.1k
        Status st = _writer->get_writer_status();
819
49.1k
        if (exec_status.ok()) {
820
49.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.0k
                                                       : Status::Cancelled("force close"));
822
49.0k
        } else {
823
107
            _writer->force_close(exec_status);
824
107
        }
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.1k
        RETURN_IF_ERROR(st);
829
49.1k
    }
830
49.0k
    return Base::close(state, exec_status);
831
49.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
36
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
36
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
36
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
36
    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
36
    if (_writer) {
818
36
        Status st = _writer->get_writer_status();
819
36
        if (exec_status.ok()) {
820
36
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
36
                                                       : Status::Cancelled("force close"));
822
36
        } 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
36
        RETURN_IF_ERROR(st);
829
36
    }
830
36
    return Base::close(state, exec_status);
831
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
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::VIcebergTableWriter, IcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
977
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
978
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
979
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
980
981
#ifdef BE_TEST
982
template class OperatorX<DummyOperatorLocalState>;
983
template class DataSinkOperatorX<DummySinkLocalState>;
984
#endif
985
986
} // namespace doris