Coverage Report

Created: 2026-09-06 18:15

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <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/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
1.43M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.43M
    if (_parent->nereids_id() == -1) {
122
752k
        return fmt::format("(id={})", _parent->node_id());
123
752k
    } else {
124
686k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
686k
    }
126
1.43M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
66.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
66.0k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
66.0k
    } else {
124
66.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
66.0k
    }
126
66.0k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
186k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
186k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
186k
    } else {
124
186k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
186k
    }
126
186k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
22
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
22
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
22
    } else {
124
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
22
    }
126
22
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.78k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.78k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
4.78k
    } else {
124
4.78k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.78k
    }
126
4.78k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
11.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
11.2k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
11.2k
    } else {
124
11.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
11.2k
    }
126
11.2k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
83.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
83.4k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
83.3k
    } else {
124
83.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
83.3k
    }
126
83.4k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
48.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
48.8k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
48.8k
    } else {
124
48.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
48.8k
    }
126
48.8k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
40
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
40
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
40
    } else {
124
40
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
40
    }
126
40
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
450k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
450k
    if (_parent->nereids_id() == -1) {
122
221k
        return fmt::format("(id={})", _parent->node_id());
123
229k
    } else {
124
229k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
229k
    }
126
450k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
52.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
52.9k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
52.9k
    } else {
124
52.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
52.9k
    }
126
52.9k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
26
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.33k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.33k
    if (_parent->nereids_id() == -1) {
122
4.33k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
4.33k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
387
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
387
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
285
    } else {
124
285
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
285
    }
126
387
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.00k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.00k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
4.98k
    } else {
124
4.98k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.98k
    }
126
5.00k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
524k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
527k
    if (_parent->nereids_id() == -1) {
122
527k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
524k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
164
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
164
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
164
    } else {
124
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
164
    }
126
164
}
127
128
template <typename SharedStateArg>
129
1.04M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.04M
    if (_parent->nereids_id() == -1) {
131
583k
        return fmt::format("(id={})", _parent->node_id());
132
583k
    } else {
133
460k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
460k
    }
135
1.04M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
114k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
114k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
114k
    } else {
133
114k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
114k
    }
135
114k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
189k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
189k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
189k
    } else {
133
189k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
189k
    }
135
189k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
29
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
29
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
29
    } else {
133
29
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
29
    }
135
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
4.77k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
4.77k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
4.77k
    } else {
133
4.77k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
4.77k
    }
135
4.77k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
11.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
11.3k
    if (_parent->nereids_id() == -1) {
131
12
        return fmt::format("(id={})", _parent->node_id());
132
11.3k
    } else {
133
11.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
11.3k
    }
135
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
83.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
83.6k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
83.6k
    } else {
133
83.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
83.6k
    }
135
83.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
48.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
48.6k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
48.6k
    } else {
133
48.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
48.6k
    }
135
48.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
50
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
50
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
50
    } else {
133
50
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
50
    }
135
50
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
18
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
18
    if (_parent->nereids_id() == -1) {
131
15
        return fmt::format("(id={})", _parent->node_id());
132
15
    } else {
133
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
3
    }
135
18
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.54k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.54k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
8.54k
    } else {
133
8.54k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.54k
    }
135
8.54k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
387
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
387
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
285
    } else {
133
285
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
285
    }
135
387
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.6k
    if (_parent->nereids_id() == -1) {
131
12.6k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
226k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
227k
    if (_parent->nereids_id() == -1) {
131
227k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
226k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
342k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
342k
    if (_parent->nereids_id() == -1) {
131
342k
        return fmt::format("(id={})", _parent->node_id());
132
342k
    } else {
133
382
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
382
    }
135
342k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
25
    if (_parent->nereids_id() == -1) {
131
25
        return fmt::format("(id={})", _parent->node_id());
132
25
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
328
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
328
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
328
    } else {
133
328
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
328
    }
135
328
}
136
137
template <typename SharedStateArg>
138
31.6k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
31.6k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
31.6k
    _terminated = true;
143
31.6k
    return Status::OK();
144
31.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.1k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.1k
    _terminated = true;
143
24.1k
    return Status::OK();
144
24.1k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2.35k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2.35k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2.35k
    _terminated = true;
143
2.35k
    return Status::OK();
144
2.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
8
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
8
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
8
    _terminated = true;
143
8
    return Status::OK();
144
8
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.79k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.79k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.79k
    _terminated = true;
143
1.79k
    return Status::OK();
144
1.79k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.58k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.58k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.58k
    _terminated = true;
143
1.58k
    return Status::OK();
144
1.58k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
673
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
673
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
673
    _terminated = true;
143
673
    return Status::OK();
144
673
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
486
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
486
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
486
    _terminated = true;
143
486
    return Status::OK();
144
486
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
6
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
6
    _terminated = true;
143
6
    return Status::OK();
144
6
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
188
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
188
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
188
    _terminated = true;
143
188
    return Status::OK();
144
188
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
12
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
12
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
12
    _terminated = true;
143
12
    return Status::OK();
144
12
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
314
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
314
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
314
    _terminated = true;
143
314
    return Status::OK();
144
314
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
128
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
128
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
128
    _terminated = true;
143
128
    return Status::OK();
144
128
}
145
146
290k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
290k
    return _child && _child->is_serial_operator() && !is_source()
148
290k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
290k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
290k
}
151
152
23.5k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
23.5k
    if (!_child) {
154
22.5k
        return false;
155
22.5k
    }
156
1.05k
    if (_child->is_serial_operator()) {
157
117
        return true;
158
117
    }
159
937
    const auto child_distribution = _child->required_data_distribution(state);
160
937
    return child_distribution.need_local_exchange() &&
161
937
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.05k
}
163
164
template <typename SharedStateArg>
165
20.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
20.6k
    fmt::memory_buffer debug_string_buffer;
167
20.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
20.6k
    return fmt::to_string(debug_string_buffer);
169
20.6k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
3
    fmt::memory_buffer debug_string_buffer;
167
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
3
    return fmt::to_string(debug_string_buffer);
169
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
20.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
20.6k
    fmt::memory_buffer debug_string_buffer;
167
20.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
20.6k
    return fmt::to_string(debug_string_buffer);
169
20.6k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
1
    fmt::memory_buffer debug_string_buffer;
167
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
1
    return fmt::to_string(debug_string_buffer);
169
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
20.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.6k
    fmt::memory_buffer debug_string_buffer;
174
20.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.6k
    return fmt::to_string(debug_string_buffer);
176
20.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
20.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.6k
    fmt::memory_buffer debug_string_buffer;
174
20.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.6k
    return fmt::to_string(debug_string_buffer);
176
20.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
20.6k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
20.6k
    fmt::memory_buffer debug_string_buffer;
180
20.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
20.6k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
20.6k
                   _is_serial_operator);
183
20.6k
    return fmt::to_string(debug_string_buffer);
184
20.6k
}
185
186
20.6k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
20.6k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
20.6k
}
189
190
614k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
614k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
614k
    _nereids_id = tnode.nereids_id;
193
614k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.59k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.59k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.59k
            tnode.intermediate_projections_list.size()) {
199
0
            return Status::InternalError(
200
0
                    "intermediate_output_tuple_id_list size:{} not match "
201
0
                    "intermediate_projections_list size:{}",
202
0
                    tnode.intermediate_output_tuple_id_list.size(),
203
0
                    tnode.intermediate_projections_list.size());
204
0
        }
205
3.59k
    }
206
614k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
614k
    _op_name = substr + "_OPERATOR";
208
209
614k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
614k
    } else if (tnode.__isset.conjuncts) {
212
262k
        for (const auto& conjunct : tnode.conjuncts) {
213
262k
            VExprContextSPtr context;
214
262k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
262k
            _conjuncts.emplace_back(context);
216
262k
        }
217
91.7k
    }
218
219
    // create the projections expr
220
614k
    if (tnode.__isset.projections) {
221
244k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
244k
    }
223
614k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.59k
        DCHECK(has_projection()) << "no final projections";
225
3.59k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
5.79k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
5.79k
            VExprContextSPtrs projections;
228
5.79k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
5.79k
            _projection->intermediate_projections.push_back(projections);
230
5.79k
        }
231
3.59k
    }
232
614k
    return Status::OK();
233
614k
}
234
235
642k
Status OperatorXBase::prepare(RuntimeState* state) {
236
642k
    for (auto& conjunct : _conjuncts) {
237
262k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
262k
    }
239
642k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
592k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
334k
            return a->execute_cost() < b->execute_cost();
242
334k
        });
243
592k
    };
244
245
642k
    if (has_projection()) {
246
244k
        auto& projection = *_projection;
247
249k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
5.79k
            const auto& input_row_desc =
249
5.79k
                    i == 0 ? operator_row_desc_before_projection()
250
5.79k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
5.79k
            RETURN_IF_ERROR(
252
5.79k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
5.79k
        }
254
244k
        const auto& final_projection_input_row_desc =
255
244k
                projection.intermediate_output_row_descriptors.empty()
256
244k
                        ? operator_row_desc_before_projection()
257
244k
                        : projection.intermediate_output_row_descriptors.back();
258
244k
        RETURN_IF_ERROR(
259
244k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
244k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
244k
                                                      projection.output_row_descriptor));
262
244k
    }
263
264
642k
    for (auto& conjunct : _conjuncts) {
265
262k
        RETURN_IF_ERROR(conjunct->open(state));
266
262k
    }
267
642k
    if (has_projection()) {
268
244k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
244k
        for (auto& projections : _projection->intermediate_projections) {
270
5.79k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
5.79k
        }
272
244k
    }
273
642k
    if (_child && !is_source()) {
274
94.7k
        RETURN_IF_ERROR(_child->prepare(state));
275
94.7k
    }
276
277
642k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
643k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
642k
    return Status::OK();
283
642k
}
284
285
8.32k
Status OperatorXBase::terminate(RuntimeState* state) {
286
8.32k
    if (_child && !is_source()) {
287
668
        RETURN_IF_ERROR(_child->terminate(state));
288
668
    }
289
8.32k
    auto result = state->get_local_state_result(operator_id());
290
8.32k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
8.32k
    return result.value()->terminate(state);
294
8.32k
}
295
296
3.93M
Status OperatorXBase::close(RuntimeState* state) {
297
3.93M
    if (_child && !is_source()) {
298
589k
        RETURN_IF_ERROR(_child->close(state));
299
589k
    }
300
3.93M
    auto result = state->get_local_state_result(operator_id());
301
3.93M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
3.93M
    return result.value()->close(state);
305
3.93M
}
306
307
274k
void PipelineXLocalStateBase::clear_origin_block() {
308
274k
    _origin_block.clear_column_data(
309
274k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
274k
}
311
312
519k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
519k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
519k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
519k
    return Status::OK();
317
519k
}
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
274k
                                     Block* output_block) const {
326
274k
    auto* local_state = state->get_local_state(operator_id());
327
274k
    SCOPED_TIMER(local_state->exec_time_counter());
328
274k
    SCOPED_TIMER(local_state->_projection_timer);
329
274k
    const size_t rows = origin_block->rows();
330
274k
    if (rows == 0) {
331
153k
        return Status::OK();
332
153k
    }
333
121k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
121k
    {
336
121k
        Block input_block = *origin_block;
337
338
121k
        ColumnsWithTypeAndName new_columns;
339
121k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.21k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.21k
            new_columns.resize(projections.size());
345
62.0k
            for (int i = 0; i < projections.size(); i++) {
346
58.8k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
58.8k
                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
58.8k
            }
355
3.20k
            Block tmp_block {new_columns};
356
3.20k
            input_block.swap(tmp_block);
357
3.20k
        }
358
359
121k
        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
121k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
121k
                output_block, _projection->output_row_descriptor);
368
121k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
121k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
121k
        Columns shared_columns(mutable_columns.size());
371
372
705k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
583k
            ColumnPtr column_ptr;
374
583k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
583k
            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
583k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
583k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
583k
            if (column_ptr->is_exclusive()) {
386
221k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
361k
            } else {
388
361k
                shared_columns[i] = std::move(column_ptr);
389
361k
            }
390
583k
        }
391
392
121k
        scoped_mutable_block.restore();
393
705k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
583k
            if (shared_columns[i]) {
395
361k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
361k
            }
397
583k
        }
398
121k
    }
399
400
0
    origin_block->clear_column_data(
401
121k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
121k
    DCHECK_EQ(output_block->rows(), rows);
403
404
121k
    return Status::OK();
405
121k
}
406
407
4.03M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.03M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.03M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.03M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.03M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.03M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.03M
            if (_debug_point_count++ % 2 == 0) {
414
4.03M
                return Status::OK();
415
4.03M
            }
416
4.03M
        }
417
4.03M
    });
418
419
4.03M
    Status status;
420
4.03M
    auto* local_state = state->get_local_state(operator_id());
421
4.03M
    Defer defer([&]() {
422
4.04M
        if (status.ok()) {
423
4.04M
            local_state->update_output_block_counters(*block);
424
4.04M
        }
425
4.03M
    });
426
4.03M
    if (has_projection()) {
427
274k
        local_state->clear_origin_block();
428
274k
        status = get_block(state, &local_state->_origin_block, eos);
429
274k
        if (UNLIKELY(!status.ok())) {
430
25
            return status;
431
25
        }
432
274k
        status = do_projections(state, &local_state->_origin_block, block);
433
274k
        return status;
434
274k
    }
435
3.76M
    status = get_block(state, block, eos);
436
3.76M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.76M
    return status;
438
3.76M
}
439
440
2.38M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.38M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
3.97k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
3.97k
        *eos = true;
444
3.97k
    }
445
446
2.38M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.38M
        auto op_name = to_lower(_parent->_op_name);
448
2.38M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.38M
        arg_op_name = to_lower(arg_op_name);
450
451
2.38M
        if (op_name == arg_op_name) {
452
2.38M
            *eos = true;
453
2.38M
        }
454
2.38M
    });
455
456
2.38M
    if (auto rows = block->rows()) {
457
700k
        _num_rows_returned += rows;
458
700k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
700k
    }
460
2.38M
}
461
462
31.6k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
31.6k
    auto result = state->get_sink_local_state_result();
464
31.6k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
31.6k
    return result.value()->terminate(state);
468
31.6k
}
469
470
20.6k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
20.6k
    fmt::memory_buffer debug_string_buffer;
472
473
20.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
20.6k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
20.6k
    return fmt::to_string(debug_string_buffer);
476
20.6k
}
477
478
20.6k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
20.6k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
20.6k
}
481
482
320k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
320k
    std::string op_name = "UNKNOWN_SINK";
484
320k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
321k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
321k
        op_name = it->second;
488
321k
    }
489
320k
    _name = op_name + "_OPERATOR";
490
320k
    return Status::OK();
491
320k
}
492
493
273k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
273k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
273k
    _nereids_id = tnode.nereids_id;
496
273k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
273k
    _name = substr + "_SINK_OPERATOR";
498
273k
    return Status::OK();
499
273k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.47M
                                                            LocalSinkStateInfo& info) {
504
1.47M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.47M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.47M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.47M
    return Status::OK();
508
1.47M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
114k
                                                            LocalSinkStateInfo& info) {
504
114k
    auto local_state = LocalStateType::create_unique(this, state);
505
114k
    RETURN_IF_ERROR(local_state->init(state, info));
506
114k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
114k
    return Status::OK();
508
114k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
296k
                                                            LocalSinkStateInfo& info) {
504
296k
    auto local_state = LocalStateType::create_unique(this, state);
505
296k
    RETURN_IF_ERROR(local_state->init(state, info));
506
296k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
296k
    return Status::OK();
508
296k
}
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
361
                                                            LocalSinkStateInfo& info) {
504
361
    auto local_state = LocalStateType::create_unique(this, state);
505
361
    RETURN_IF_ERROR(local_state->init(state, info));
506
361
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
361
    return Status::OK();
508
361
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
46.6k
                                                            LocalSinkStateInfo& info) {
504
46.6k
    auto local_state = LocalStateType::create_unique(this, state);
505
46.6k
    RETURN_IF_ERROR(local_state->init(state, info));
506
46.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
46.6k
    return Status::OK();
508
46.6k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
12
                                                            LocalSinkStateInfo& info) {
504
12
    auto local_state = LocalStateType::create_unique(this, state);
505
12
    RETURN_IF_ERROR(local_state->init(state, info));
506
12
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
12
    return Status::OK();
508
12
}
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_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
11.4k
                                                            LocalSinkStateInfo& info) {
504
11.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
11.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
11.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
11.4k
    return Status::OK();
508
11.4k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
15
                                                            LocalSinkStateInfo& info) {
504
15
    auto local_state = LocalStateType::create_unique(this, state);
505
15
    RETURN_IF_ERROR(local_state->init(state, info));
506
15
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
15
    return Status::OK();
508
15
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
190k
                                                            LocalSinkStateInfo& info) {
504
190k
    auto local_state = LocalStateType::create_unique(this, state);
505
190k
    RETURN_IF_ERROR(local_state->init(state, info));
506
190k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
190k
    return Status::OK();
508
190k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
29
                                                            LocalSinkStateInfo& info) {
504
29
    auto local_state = LocalStateType::create_unique(this, state);
505
29
    RETURN_IF_ERROR(local_state->init(state, info));
506
29
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
29
    return Status::OK();
508
29
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
229k
                                                            LocalSinkStateInfo& info) {
504
229k
    auto local_state = LocalStateType::create_unique(this, state);
505
229k
    RETURN_IF_ERROR(local_state->init(state, info));
506
229k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
229k
    return Status::OK();
508
229k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
84.1k
                                                            LocalSinkStateInfo& info) {
504
84.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
84.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
84.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
84.1k
    return Status::OK();
508
84.1k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.2k
                                                            LocalSinkStateInfo& info) {
504
49.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.2k
    return Status::OK();
508
49.2k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
50
                                                            LocalSinkStateInfo& info) {
504
50
    auto local_state = LocalStateType::create_unique(this, state);
505
50
    RETURN_IF_ERROR(local_state->init(state, info));
506
50
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
50
    return Status::OK();
508
50
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
424k
                                                            LocalSinkStateInfo& info) {
504
424k
    auto local_state = LocalStateType::create_unique(this, state);
505
424k
    RETURN_IF_ERROR(local_state->init(state, info));
506
424k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
424k
    return Status::OK();
508
424k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.79k
                                                            LocalSinkStateInfo& info) {
504
4.79k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.79k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.79k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.79k
    return Status::OK();
508
4.79k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.54k
                                                            LocalSinkStateInfo& info) {
504
8.54k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.54k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.54k
    return Status::OK();
508
8.54k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.76k
                                                            LocalSinkStateInfo& info) {
504
1.76k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.76k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.76k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.76k
    return Status::OK();
508
1.76k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
285
                                                            LocalSinkStateInfo& info) {
504
285
    auto local_state = LocalStateType::create_unique(this, state);
505
285
    RETURN_IF_ERROR(local_state->init(state, info));
506
285
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
285
    return Status::OK();
508
285
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.84k
                                                            LocalSinkStateInfo& info) {
504
4.84k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.84k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.84k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.84k
    return Status::OK();
508
4.84k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.62k
                                                            LocalSinkStateInfo& info) {
504
2.62k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.62k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.62k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.62k
    return Status::OK();
508
2.62k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.63k
                                                            LocalSinkStateInfo& info) {
504
2.63k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.63k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.63k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.63k
    return Status::OK();
508
2.63k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_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_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
566
                                                            LocalSinkStateInfo& info) {
504
566
    auto local_state = LocalStateType::create_unique(this, state);
505
566
    RETURN_IF_ERROR(local_state->init(state, info));
506
566
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
566
    return Status::OK();
508
566
}
_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
98
                                                            LocalSinkStateInfo& info) {
504
98
    auto local_state = LocalStateType::create_unique(this, state);
505
98
    RETURN_IF_ERROR(local_state->init(state, info));
506
98
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
98
    return Status::OK();
508
98
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
509
510
template <typename LocalStateType>
511
1.16M
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.16M
    } else {
519
1.16M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.16M
        ss->id = operator_id();
521
1.16M
        for (auto& dest : dests_id()) {
522
1.15M
            ss->related_op_ids.insert(dest);
523
1.15M
        }
524
1.16M
        return ss;
525
1.16M
    }
526
1.16M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
98.6k
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
98.6k
    } else {
519
98.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
98.6k
        ss->id = operator_id();
521
98.6k
        for (auto& dest : dests_id()) {
522
98.5k
            ss->related_op_ids.insert(dest);
523
98.5k
        }
524
98.6k
        return ss;
525
98.6k
    }
526
98.6k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
297k
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
297k
    } else {
519
297k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
297k
        ss->id = operator_id();
521
297k
        for (auto& dest : dests_id()) {
522
296k
            ss->related_op_ids.insert(dest);
523
296k
        }
524
297k
        return ss;
525
297k
    }
526
297k
}
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
361
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
361
    } else {
519
361
        auto ss = LocalStateType::SharedStateType::create_shared();
520
361
        ss->id = operator_id();
521
361
        for (auto& dest : dests_id()) {
522
359
            ss->related_op_ids.insert(dest);
523
359
        }
524
361
        return ss;
525
361
    }
526
361
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
46.6k
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
46.6k
    } else {
519
46.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
46.6k
        ss->id = operator_id();
521
46.6k
        for (auto& dest : dests_id()) {
522
46.4k
            ss->related_op_ids.insert(dest);
523
46.4k
        }
524
46.6k
        return ss;
525
46.6k
    }
526
46.6k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
12
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
12
    } else {
519
12
        auto ss = LocalStateType::SharedStateType::create_shared();
520
12
        ss->id = operator_id();
521
12
        for (auto& dest : dests_id()) {
522
12
            ss->related_op_ids.insert(dest);
523
12
        }
524
12
        return ss;
525
12
    }
526
12
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_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
11.4k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
11.4k
    } else {
519
11.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
11.4k
        ss->id = operator_id();
521
11.4k
        for (auto& dest : dests_id()) {
522
11.2k
            ss->related_op_ids.insert(dest);
523
11.2k
        }
524
11.4k
        return ss;
525
11.4k
    }
526
11.4k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
15
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
15
    } else {
519
15
        auto ss = LocalStateType::SharedStateType::create_shared();
520
15
        ss->id = operator_id();
521
15
        for (auto& dest : dests_id()) {
522
14
            ss->related_op_ids.insert(dest);
523
14
        }
524
15
        return ss;
525
15
    }
526
15
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
190k
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
190k
    } else {
519
190k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
190k
        ss->id = operator_id();
521
190k
        for (auto& dest : dests_id()) {
522
190k
            ss->related_op_ids.insert(dest);
523
190k
        }
524
190k
        return ss;
525
190k
    }
526
190k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
31
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
31
    } else {
519
31
        auto ss = LocalStateType::SharedStateType::create_shared();
520
31
        ss->id = operator_id();
521
31
        for (auto& dest : dests_id()) {
522
31
            ss->related_op_ids.insert(dest);
523
31
        }
524
31
        return ss;
525
31
    }
526
31
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
84.2k
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
84.2k
    } else {
519
84.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
84.2k
        ss->id = operator_id();
521
84.2k
        for (auto& dest : dests_id()) {
522
84.0k
            ss->related_op_ids.insert(dest);
523
84.0k
        }
524
84.2k
        return ss;
525
84.2k
    }
526
84.2k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
49
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
49
    } else {
519
49
        auto ss = LocalStateType::SharedStateType::create_shared();
520
49
        ss->id = operator_id();
521
49
        for (auto& dest : dests_id()) {
522
49
            ss->related_op_ids.insert(dest);
523
49
        }
524
49
        return ss;
525
49
    }
526
49
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
423k
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
423k
    } else {
519
423k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
423k
        ss->id = operator_id();
521
423k
        for (auto& dest : dests_id()) {
522
419k
            ss->related_op_ids.insert(dest);
523
419k
        }
524
423k
        return ss;
525
423k
    }
526
423k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
4.79k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
4.79k
    } else {
519
4.79k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
4.79k
        ss->id = operator_id();
521
4.79k
        for (auto& dest : dests_id()) {
522
4.78k
            ss->related_op_ids.insert(dest);
523
4.78k
        }
524
4.79k
        return ss;
525
4.79k
    }
526
4.79k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
387
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
387
    } else {
519
387
        auto ss = LocalStateType::SharedStateType::create_shared();
520
387
        ss->id = operator_id();
521
387
        for (auto& dest : dests_id()) {
522
387
            ss->related_op_ids.insert(dest);
523
387
        }
524
387
        return ss;
525
387
    }
526
387
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.62k
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.62k
    } else {
519
2.62k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.62k
        ss->id = operator_id();
521
2.62k
        for (auto& dest : dests_id()) {
522
2.61k
            ss->related_op_ids.insert(dest);
523
2.61k
        }
524
2.62k
        return ss;
525
2.62k
    }
526
2.62k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.55k
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.55k
    } else {
519
2.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.55k
        ss->id = operator_id();
521
2.55k
        for (auto& dest : dests_id()) {
522
2.52k
            ss->related_op_ids.insert(dest);
523
2.52k
        }
524
2.55k
        return ss;
525
2.55k
    }
526
2.55k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
567
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
567
    } else {
519
567
        auto ss = LocalStateType::SharedStateType::create_shared();
520
567
        ss->id = operator_id();
521
568
        for (auto& dest : dests_id()) {
522
568
            ss->related_op_ids.insert(dest);
523
568
        }
524
567
        return ss;
525
567
    }
526
567
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
102
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
102
    } else {
519
102
        auto ss = LocalStateType::SharedStateType::create_shared();
520
102
        ss->id = operator_id();
521
102
        for (auto& dest : dests_id()) {
522
100
            ss->related_op_ids.insert(dest);
523
100
        }
524
102
        return ss;
525
102
    }
526
102
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
1.69M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.69M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.69M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.69M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.69M
    return Status::OK();
534
1.69M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
66.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
66.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
66.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
66.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
66.3k
    return Status::OK();
534
66.3k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
235k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
235k
    auto local_state = LocalStateType::create_unique(state, this);
531
235k
    RETURN_IF_ERROR(local_state->init(state, info));
532
235k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
235k
    return Status::OK();
534
235k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_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
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.07k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.07k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.07k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.07k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.07k
    return Status::OK();
534
3.07k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
11.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
11.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
11.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
11.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
11.3k
    return Status::OK();
534
11.3k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
11.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
11.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
11.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
11.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
11.1k
    return Status::OK();
534
11.1k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
22
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
22
    auto local_state = LocalStateType::create_unique(state, this);
531
22
    RETURN_IF_ERROR(local_state->init(state, info));
532
22
    state->emplace_local_state(operator_id(), std::move(local_state));
533
22
    return Status::OK();
534
22
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
178k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
178k
    auto local_state = LocalStateType::create_unique(state, this);
531
178k
    RETURN_IF_ERROR(local_state->init(state, info));
532
178k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
178k
    return Status::OK();
534
178k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
83.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
83.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
83.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
83.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
83.9k
    return Status::OK();
534
83.9k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
49.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
49.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
49.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
49.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
49.2k
    return Status::OK();
534
49.2k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
40
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
40
    auto local_state = LocalStateType::create_unique(state, this);
531
40
    RETURN_IF_ERROR(local_state->init(state, info));
532
40
    state->emplace_local_state(operator_id(), std::move(local_state));
533
40
    return Status::OK();
534
40
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.65k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.65k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.65k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.65k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.65k
    return Status::OK();
534
4.65k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
222k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
222k
    auto local_state = LocalStateType::create_unique(state, this);
531
222k
    RETURN_IF_ERROR(local_state->init(state, info));
532
222k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
222k
    return Status::OK();
534
222k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.29k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.29k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.29k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.29k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.29k
    return Status::OK();
534
1.29k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.77k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.77k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.77k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.77k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.77k
    return Status::OK();
534
4.77k
}
_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.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.60k
    return Status::OK();
534
1.60k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
53.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
53.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
53.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
53.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
53.3k
    return Status::OK();
534
53.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.33k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.33k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.33k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.33k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.33k
    return Status::OK();
534
4.33k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
284
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
284
    auto local_state = LocalStateType::create_unique(state, this);
531
284
    RETURN_IF_ERROR(local_state->init(state, info));
532
284
    state->emplace_local_state(operator_id(), std::move(local_state));
533
284
    return Status::OK();
534
284
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.60k
    return Status::OK();
534
2.60k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.53k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.53k
    return Status::OK();
534
2.53k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
291
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
291
    auto local_state = LocalStateType::create_unique(state, this);
531
291
    RETURN_IF_ERROR(local_state->init(state, info));
532
291
    state->emplace_local_state(operator_id(), std::move(local_state));
533
291
    return Status::OK();
534
291
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.60k
    return Status::OK();
534
1.60k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.83k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.83k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.83k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.83k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.83k
    return Status::OK();
534
4.83k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
531k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
531k
    auto local_state = LocalStateType::create_unique(state, this);
531
531k
    RETURN_IF_ERROR(local_state->init(state, info));
532
531k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
531k
    return Status::OK();
534
531k
}
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
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
164
    auto local_state = LocalStateType::create_unique(state, this);
531
164
    RETURN_IF_ERROR(local_state->init(state, info));
532
164
    state->emplace_local_state(operator_id(), std::move(local_state));
533
164
    return Status::OK();
534
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.18k
    return Status::OK();
534
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
779
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
779
    auto local_state = LocalStateType::create_unique(state, this);
531
779
    RETURN_IF_ERROR(local_state->init(state, info));
532
779
    state->emplace_local_state(operator_id(), std::move(local_state));
533
779
    return Status::OK();
534
779
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
872
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
872
    auto local_state = LocalStateType::create_unique(state, this);
531
872
    RETURN_IF_ERROR(local_state->init(state, info));
532
872
    state->emplace_local_state(operator_id(), std::move(local_state));
533
872
    return Status::OK();
534
872
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.55k
    return Status::OK();
534
6.55k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
207k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
207k
    auto local_state = LocalStateType::create_unique(state, this);
531
207k
    RETURN_IF_ERROR(local_state->init(state, info));
532
207k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
207k
    return Status::OK();
534
207k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.46M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.68M
        : _num_rows_returned(0),
542
1.68M
          _rows_returned_counter(nullptr),
543
1.68M
          _parent(parent),
544
1.68M
          _state(state),
545
1.68M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.69M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.69M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.69M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.69M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.69M
    _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.69M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.69M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.69M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.69M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.69M
    if constexpr (!is_fake_shared) {
560
1.00M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
599k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
599k
                                    .first.get()
563
599k
                                    ->template cast<SharedStateArg>();
564
565
599k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
599k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
599k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
599k
        } else if (info.shared_state) {
569
353k
            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
353k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
353k
            _dependency = _shared_state->create_source_dependency(
576
353k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
353k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
353k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
353k
        } else {
580
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
18.4E
                DCHECK(false);
582
18.4E
            }
583
51.0k
        }
584
1.00M
    }
585
586
1.69M
    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.69M
    _rows_returned_counter =
591
1.69M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.69M
    _blocks_returned_counter =
593
1.69M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.69M
    _output_block_bytes_counter =
595
1.69M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.69M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.69M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.69M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.69M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.69M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.69M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.69M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.69M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.69M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.69M
    _memory_used_counter =
606
1.69M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.69M
    _common_profile->add_info_string("IsColocate",
608
1.69M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.69M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.69M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.69M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.69M
    return Status::OK();
613
1.69M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
66.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
66.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
66.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
66.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
66.4k
    _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
66.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
66.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
66.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
66.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
66.4k
    if constexpr (!is_fake_shared) {
560
66.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
15.7k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
15.7k
                                    .first.get()
563
15.7k
                                    ->template cast<SharedStateArg>();
564
565
15.7k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
15.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
15.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
50.6k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
50.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
50.4k
            _dependency = _shared_state->create_source_dependency(
576
50.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
50.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
50.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
50.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
126
        }
584
66.4k
    }
585
586
66.4k
    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
66.4k
    _rows_returned_counter =
591
66.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
66.4k
    _blocks_returned_counter =
593
66.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
66.4k
    _output_block_bytes_counter =
595
66.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
66.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
66.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
66.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
66.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
66.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
66.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
66.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
66.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
66.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
66.4k
    _memory_used_counter =
606
66.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
66.4k
    _common_profile->add_info_string("IsColocate",
608
66.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
66.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
66.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
66.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
66.4k
    return Status::OK();
613
66.4k
}
_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
190k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
190k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
190k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
190k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
190k
    _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
190k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
190k
    _operator_profile->add_child(_common_profile.get(), true);
557
190k
    _operator_profile->add_child(_custom_profile.get(), true);
558
190k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
190k
    if constexpr (!is_fake_shared) {
560
190k
        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
190k
        } 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
188k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
188k
            _dependency = _shared_state->create_source_dependency(
576
188k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
188k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
188k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
188k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.43k
        }
584
190k
    }
585
586
190k
    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
190k
    _rows_returned_counter =
591
190k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
190k
    _blocks_returned_counter =
593
190k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
190k
    _output_block_bytes_counter =
595
190k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
190k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
190k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
190k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
190k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
190k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
190k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
190k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
190k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
190k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
190k
    _memory_used_counter =
606
190k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
190k
    _common_profile->add_info_string("IsColocate",
608
190k
                                     std::to_string(_parent->is_colocated_operator()));
609
190k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
190k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
190k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
190k
    return Status::OK();
613
190k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
22
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
22
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
22
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
22
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
22
    _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
22
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
22
    _operator_profile->add_child(_common_profile.get(), true);
557
22
    _operator_profile->add_child(_custom_profile.get(), true);
558
22
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
22
    if constexpr (!is_fake_shared) {
560
22
        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
22
        } 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
22
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
22
            _dependency = _shared_state->create_source_dependency(
576
22
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
22
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
22
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
22
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
22
    }
585
586
22
    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
22
    _rows_returned_counter =
591
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
22
    _blocks_returned_counter =
593
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
22
    _output_block_bytes_counter =
595
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
22
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
22
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
22
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
22
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
22
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
22
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
22
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
22
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
22
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
22
    _memory_used_counter =
606
22
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
22
    _common_profile->add_info_string("IsColocate",
608
22
                                     std::to_string(_parent->is_colocated_operator()));
609
22
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
22
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
22
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
22
    return Status::OK();
613
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.79k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.79k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.79k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.79k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.79k
    _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
4.79k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.79k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.79k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.79k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.79k
    if constexpr (!is_fake_shared) {
560
4.79k
        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
4.79k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.77k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.77k
            _dependency = _shared_state->create_source_dependency(
576
4.77k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.77k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.77k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.77k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
14
        }
584
4.79k
    }
585
586
4.79k
    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
4.79k
    _rows_returned_counter =
591
4.79k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.79k
    _blocks_returned_counter =
593
4.79k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.79k
    _output_block_bytes_counter =
595
4.79k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.79k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.79k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.79k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.79k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.79k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.79k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.79k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.79k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.79k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.79k
    _memory_used_counter =
606
4.79k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.79k
    _common_profile->add_info_string("IsColocate",
608
4.79k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.79k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.79k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.79k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.79k
    return Status::OK();
613
4.79k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
11.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
11.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
11.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
11.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
11.4k
    _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
11.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
11.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
11.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
11.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
11.4k
    if constexpr (!is_fake_shared) {
560
11.4k
        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
11.4k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
11.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
11.3k
            _dependency = _shared_state->create_source_dependency(
576
11.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
11.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
11.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
11.3k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
77
        }
584
11.4k
    }
585
586
11.4k
    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
11.4k
    _rows_returned_counter =
591
11.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
11.4k
    _blocks_returned_counter =
593
11.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
11.4k
    _output_block_bytes_counter =
595
11.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
11.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
11.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
11.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
11.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
11.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
11.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
11.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
11.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
11.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
11.4k
    _memory_used_counter =
606
11.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
11.4k
    _common_profile->add_info_string("IsColocate",
608
11.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
11.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
11.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
11.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
11.4k
    return Status::OK();
613
11.4k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
84.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
84.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
84.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
84.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
84.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
84.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
84.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
84.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
84.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
84.1k
    if constexpr (!is_fake_shared) {
560
84.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
84.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
83.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
83.8k
            _dependency = _shared_state->create_source_dependency(
576
83.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
83.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
83.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
83.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
321
        }
584
84.1k
    }
585
586
84.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
84.1k
    _rows_returned_counter =
591
84.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
84.1k
    _blocks_returned_counter =
593
84.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
84.1k
    _output_block_bytes_counter =
595
84.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
84.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
84.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
84.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
84.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
84.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
84.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
84.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
84.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
84.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
84.1k
    _memory_used_counter =
606
84.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
84.1k
    _common_profile->add_info_string("IsColocate",
608
84.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
84.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
84.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
84.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
84.1k
    return Status::OK();
613
84.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
49.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
49.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
49.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
49.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
49.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
49.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
49.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
49.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
49.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
49.2k
    if constexpr (!is_fake_shared) {
560
49.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
49.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
49.1k
                                    .first.get()
563
49.1k
                                    ->template cast<SharedStateArg>();
564
565
49.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
49.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
49.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
49.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
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
29
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
29
        }
584
49.2k
    }
585
586
49.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
49.2k
    _rows_returned_counter =
591
49.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
49.2k
    _blocks_returned_counter =
593
49.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
49.2k
    _output_block_bytes_counter =
595
49.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
49.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
49.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
49.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
49.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
49.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
49.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
49.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
49.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
49.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
49.2k
    _memory_used_counter =
606
49.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
49.2k
    _common_profile->add_info_string("IsColocate",
608
49.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
49.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
49.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
49.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
49.2k
    return Status::OK();
613
49.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
40
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
40
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
40
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
40
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
40
    _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
40
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
40
    _operator_profile->add_child(_common_profile.get(), true);
557
40
    _operator_profile->add_child(_custom_profile.get(), true);
558
40
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
40
    if constexpr (!is_fake_shared) {
560
40
        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
40
        } 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
40
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
40
            _dependency = _shared_state->create_source_dependency(
576
40
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
40
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
40
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
40
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
40
    }
585
586
40
    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
40
    _rows_returned_counter =
591
40
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
40
    _blocks_returned_counter =
593
40
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
40
    _output_block_bytes_counter =
595
40
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
40
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
40
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
40
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
40
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
40
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
40
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
40
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
40
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
40
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
40
    _memory_used_counter =
606
40
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
40
    _common_profile->add_info_string("IsColocate",
608
40
                                     std::to_string(_parent->is_colocated_operator()));
609
40
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
40
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
40
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
40
    return Status::OK();
613
40
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
689k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
689k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
689k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
689k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
689k
    _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
689k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
689k
    _operator_profile->add_child(_common_profile.get(), true);
557
689k
    _operator_profile->add_child(_custom_profile.get(), true);
558
689k
    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
689k
    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
689k
    _rows_returned_counter =
591
689k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
689k
    _blocks_returned_counter =
593
689k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
689k
    _output_block_bytes_counter =
595
689k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
689k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
689k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
689k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
689k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
689k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
689k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
689k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
689k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
689k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
689k
    _memory_used_counter =
606
689k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
689k
    _common_profile->add_info_string("IsColocate",
608
689k
                                     std::to_string(_parent->is_colocated_operator()));
609
689k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
689k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
689k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
689k
    return Status::OK();
613
689k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
53.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
53.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
53.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
53.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
53.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
53.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
53.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
53.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
53.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
53.2k
    if constexpr (!is_fake_shared) {
560
53.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
53.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.83k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.83k
            _dependency = _shared_state->create_source_dependency(
576
3.83k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.83k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.83k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
49.3k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
49.3k
        }
584
53.2k
    }
585
586
53.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
53.2k
    _rows_returned_counter =
591
53.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
53.2k
    _blocks_returned_counter =
593
53.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
53.2k
    _output_block_bytes_counter =
595
53.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
53.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
53.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
53.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
53.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
53.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
53.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
53.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
53.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
53.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
53.2k
    _memory_used_counter =
606
53.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
53.2k
    _common_profile->add_info_string("IsColocate",
608
53.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
53.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
53.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
53.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
53.2k
    return Status::OK();
613
53.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
4.33k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.33k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.33k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.33k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.33k
    _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
4.33k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.33k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.33k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.33k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.33k
    if constexpr (!is_fake_shared) {
560
4.33k
        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
4.33k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.33k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.33k
            _dependency = _shared_state->create_source_dependency(
576
4.33k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.33k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.33k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.33k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
4
        }
584
4.33k
    }
585
586
4.33k
    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
4.33k
    _rows_returned_counter =
591
4.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.33k
    _blocks_returned_counter =
593
4.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.33k
    _output_block_bytes_counter =
595
4.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.33k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.33k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.33k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.33k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.33k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.33k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.33k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.33k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.33k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.33k
    _memory_used_counter =
606
4.33k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.33k
    _common_profile->add_info_string("IsColocate",
608
4.33k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.33k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.33k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.33k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.33k
    return Status::OK();
613
4.33k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
387
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
387
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
387
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
387
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
387
    _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
387
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
387
    _operator_profile->add_child(_common_profile.get(), true);
557
387
    _operator_profile->add_child(_custom_profile.get(), true);
558
387
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
387
    if constexpr (!is_fake_shared) {
560
387
        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
387
        } 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
387
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
387
            _dependency = _shared_state->create_source_dependency(
576
387
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
387
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
387
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
387
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
387
    }
585
586
387
    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
387
    _rows_returned_counter =
591
387
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
387
    _blocks_returned_counter =
593
387
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
387
    _output_block_bytes_counter =
595
387
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
387
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
387
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
387
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
387
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
387
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
387
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
387
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
387
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
387
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
387
    _memory_used_counter =
606
387
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
387
    _common_profile->add_info_string("IsColocate",
608
387
                                     std::to_string(_parent->is_colocated_operator()));
609
387
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
387
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
387
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
387
    return Status::OK();
613
387
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.20k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.20k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.20k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.20k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.20k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.20k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.20k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.20k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.20k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.20k
    if constexpr (!is_fake_shared) {
560
5.20k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.20k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.10k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.10k
            _dependency = _shared_state->create_source_dependency(
576
5.10k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.10k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.10k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.10k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
98
        }
584
5.20k
    }
585
586
5.20k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.20k
    _rows_returned_counter =
591
5.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.20k
    _blocks_returned_counter =
593
5.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.20k
    _output_block_bytes_counter =
595
5.20k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.20k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.20k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.20k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.20k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.20k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.20k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.20k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.20k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.20k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.20k
    _memory_used_counter =
606
5.20k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.20k
    _common_profile->add_info_string("IsColocate",
608
5.20k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.20k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.20k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.20k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.20k
    return Status::OK();
613
5.20k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
533k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
533k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
533k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
533k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
533k
    _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
533k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
533k
    _operator_profile->add_child(_common_profile.get(), true);
557
533k
    _operator_profile->add_child(_custom_profile.get(), true);
558
533k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
533k
    if constexpr (!is_fake_shared) {
560
534k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
534k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
534k
                                    .first.get()
563
534k
                                    ->template cast<SharedStateArg>();
564
565
534k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
534k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
534k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } 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
18.4E
        } else {
580
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
18.4E
                DCHECK(false);
582
18.4E
            }
583
18.4E
        }
584
533k
    }
585
586
533k
    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
533k
    _rows_returned_counter =
591
533k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
533k
    _blocks_returned_counter =
593
533k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
533k
    _output_block_bytes_counter =
595
533k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
533k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
533k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
533k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
533k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
533k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
533k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
533k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
533k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
533k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
533k
    _memory_used_counter =
606
533k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
533k
    _common_profile->add_info_string("IsColocate",
608
533k
                                     std::to_string(_parent->is_colocated_operator()));
609
533k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
533k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
533k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
533k
    return Status::OK();
613
533k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
164
    _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
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
164
    _operator_profile->add_child(_common_profile.get(), true);
557
164
    _operator_profile->add_child(_custom_profile.get(), true);
558
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
164
    if constexpr (!is_fake_shared) {
560
164
        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
164
        } 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
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
164
            _dependency = _shared_state->create_source_dependency(
576
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
164
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
164
    }
585
586
164
    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
164
    _rows_returned_counter =
591
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
164
    _blocks_returned_counter =
593
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
164
    _output_block_bytes_counter =
595
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
164
    _memory_used_counter =
606
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
164
    _common_profile->add_info_string("IsColocate",
608
164
                                     std::to_string(_parent->is_colocated_operator()));
609
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
164
    return Status::OK();
613
164
}
614
615
template <typename SharedStateArg>
616
1.70M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.70M
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.99M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
291k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
291k
    }
621
1.70M
    if (_parent->has_projection()) {
622
357k
        const auto& projection = *_parent->_projection;
623
357k
        _projections.resize(projection.projections.size());
624
2.23M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.87M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.87M
        }
627
357k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
370k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
13.2k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
198k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
185k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
185k
                        state, _intermediate_projections[i][j]));
633
185k
            }
634
13.2k
        }
635
357k
    }
636
1.70M
    return Status::OK();
637
1.70M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
66.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
66.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
67.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.01k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.01k
    }
621
66.4k
    if (_parent->has_projection()) {
622
66.4k
        const auto& projection = *_parent->_projection;
623
66.4k
        _projections.resize(projection.projections.size());
624
352k
        for (size_t i = 0; i < _projections.size(); i++) {
625
286k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
286k
        }
627
66.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
71.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
5.45k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
147k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
142k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
142k
                        state, _intermediate_projections[i][j]));
633
142k
            }
634
5.45k
        }
635
66.4k
    }
636
66.4k
    return Status::OK();
637
66.4k
}
_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
190k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
190k
    _conjuncts.resize(_parent->_conjuncts.size());
618
190k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
190k
    if (_parent->has_projection()) {
622
79
        const auto& projection = *_parent->_projection;
623
79
        _projections.resize(projection.projections.size());
624
401
        for (size_t i = 0; i < _projections.size(); i++) {
625
322
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
322
        }
627
79
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
79
        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
79
    }
636
190k
    return Status::OK();
637
190k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
22
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
22
    _conjuncts.resize(_parent->_conjuncts.size());
618
22
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
22
    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
22
    return Status::OK();
637
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.78k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.78k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.83k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
46
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
46
    }
621
4.79k
    if (_parent->has_projection()) {
622
4.79k
        const auto& projection = *_parent->_projection;
623
4.79k
        _projections.resize(projection.projections.size());
624
21.5k
        for (size_t i = 0; i < _projections.size(); i++) {
625
16.7k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
16.7k
        }
627
4.79k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.80k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
17
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
114
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
97
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
97
                        state, _intermediate_projections[i][j]));
633
97
            }
634
17
        }
635
4.79k
    }
636
4.78k
    return Status::OK();
637
4.78k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
11.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
11.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
12.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
670
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
670
    }
621
11.4k
    if (_parent->has_projection()) {
622
7.06k
        const auto& projection = *_parent->_projection;
623
7.06k
        _projections.resize(projection.projections.size());
624
27.1k
        for (size_t i = 0; i < _projections.size(); i++) {
625
20.1k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
20.1k
        }
627
7.06k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
7.15k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
91
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
685
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
594
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
594
                        state, _intermediate_projections[i][j]));
633
594
            }
634
91
        }
635
7.06k
    }
636
11.4k
    return Status::OK();
637
11.4k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
84.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
84.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
85.5k
    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
84.3k
    if (_parent->has_projection()) {
622
28.2k
        const auto& projection = *_parent->_projection;
623
28.2k
        _projections.resize(projection.projections.size());
624
264k
        for (size_t i = 0; i < _projections.size(); i++) {
625
236k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
236k
        }
627
28.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
28.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
259
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.86k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.60k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.60k
                        state, _intermediate_projections[i][j]));
633
1.60k
            }
634
259
        }
635
28.2k
    }
636
84.3k
    return Status::OK();
637
84.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
49.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
49.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
49.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
15
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
15
    }
621
49.2k
    if (_parent->has_projection()) {
622
139
        const auto& projection = *_parent->_projection;
623
139
        _projections.resize(projection.projections.size());
624
523
        for (size_t i = 0; i < _projections.size(); i++) {
625
384
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
384
        }
627
139
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
139
        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
139
    }
636
49.2k
    return Status::OK();
637
49.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
44
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
44
    _conjuncts.resize(_parent->_conjuncts.size());
618
44
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
44
    if (_parent->has_projection()) {
622
30
        const auto& projection = *_parent->_projection;
623
30
        _projections.resize(projection.projections.size());
624
90
        for (size_t i = 0; i < _projections.size(); i++) {
625
60
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
60
        }
627
30
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
30
        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
30
    }
636
44
    return Status::OK();
637
44
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
694k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
694k
    _conjuncts.resize(_parent->_conjuncts.size());
618
982k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
287k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
287k
    }
621
694k
    if (_parent->has_projection()) {
622
238k
        const auto& projection = *_parent->_projection;
623
238k
        _projections.resize(projection.projections.size());
624
1.45M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.21M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.21M
        }
627
238k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
245k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
7.10k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
41.9k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
34.8k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
34.8k
                        state, _intermediate_projections[i][j]));
633
34.8k
            }
634
7.10k
        }
635
238k
    }
636
694k
    return Status::OK();
637
694k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
53.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
53.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
53.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
53.4k
    if (_parent->has_projection()) {
622
11.6k
        const auto& projection = *_parent->_projection;
623
11.6k
        _projections.resize(projection.projections.size());
624
110k
        for (size_t i = 0; i < _projections.size(); i++) {
625
99.1k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
99.1k
        }
627
11.6k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
282
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
6.62k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
6.34k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
6.34k
                        state, _intermediate_projections[i][j]));
633
6.34k
            }
634
282
        }
635
11.6k
    }
636
53.4k
    return Status::OK();
637
53.4k
}
_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
4.32k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.32k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.89k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
573
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
573
    }
621
4.32k
    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
4.32k
    return Status::OK();
637
4.32k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
387
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
387
    _conjuncts.resize(_parent->_conjuncts.size());
618
387
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
387
    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
387
    return Status::OK();
637
387
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.21k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.21k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.21k
    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.21k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
228
        for (size_t i = 0; i < _projections.size(); i++) {
625
168
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
168
        }
627
60
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
60
        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
60
    }
636
5.21k
    return Status::OK();
637
5.21k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
536k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
536k
    _conjuncts.resize(_parent->_conjuncts.size());
618
536k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
536k
    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
536k
    return Status::OK();
637
536k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
164
    _conjuncts.resize(_parent->_conjuncts.size());
618
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
164
    if (_parent->has_projection()) {
622
161
        const auto& projection = *_parent->_projection;
623
161
        _projections.resize(projection.projections.size());
624
480
        for (size_t i = 0; i < _projections.size(); i++) {
625
319
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
319
        }
627
161
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
164
        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
161
    }
636
164
    return Status::OK();
637
164
}
638
639
template <typename SharedStateArg>
640
8.33k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.33k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
8.33k
    _terminated = true;
645
8.33k
    return Status::OK();
646
8.33k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
423
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
423
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
423
    _terminated = true;
645
423
    return Status::OK();
646
423
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
25
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
25
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
25
    _terminated = true;
645
25
    return Status::OK();
646
25
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
39
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
39
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
39
    _terminated = true;
645
39
    return Status::OK();
646
39
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
139
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
139
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
139
    _terminated = true;
645
139
    return Status::OK();
646
139
}
_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
6.23k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.23k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.23k
    _terminated = true;
645
6.23k
    return Status::OK();
646
6.23k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
70
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
70
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
70
    _terminated = true;
645
70
    return Status::OK();
646
70
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
9
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9
    _terminated = true;
645
9
    return Status::OK();
646
9
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
162
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
162
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
162
    _terminated = true;
645
162
    return Status::OK();
646
162
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.20k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.20k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.20k
    _terminated = true;
645
1.20k
    return Status::OK();
646
1.20k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
34
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
34
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
34
    _terminated = true;
645
34
    return Status::OK();
646
34
}
647
648
template <typename SharedStateArg>
649
1.92M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.92M
    if (_closed) {
651
223k
        return Status::OK();
652
223k
    }
653
1.70M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.00M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.00M
    }
656
1.70M
    _closed = true;
657
1.70M
    return Status::OK();
658
1.92M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
66.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
66.4k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
66.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
66.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
66.4k
    }
656
66.4k
    _closed = true;
657
66.4k
    return Status::OK();
658
66.4k
}
_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
380k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
380k
    if (_closed) {
651
189k
        return Status::OK();
652
189k
    }
653
190k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
190k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
190k
    }
656
190k
    _closed = true;
657
190k
    return Status::OK();
658
380k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
22
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
22
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
22
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
22
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
22
    }
656
22
    _closed = true;
657
22
    return Status::OK();
658
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.78k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.78k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.78k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.78k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.78k
    }
656
4.78k
    _closed = true;
657
4.78k
    return Status::OK();
658
4.78k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
23.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
23.0k
    if (_closed) {
651
11.5k
        return Status::OK();
652
11.5k
    }
653
11.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
11.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
11.4k
    }
656
11.4k
    _closed = true;
657
11.4k
    return Status::OK();
658
23.0k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
84.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
84.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
84.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
84.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
84.1k
    }
656
84.1k
    _closed = true;
657
84.1k
    return Status::OK();
658
84.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
49.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
49.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
49.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
49.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
49.1k
    }
656
49.1k
    _closed = true;
657
49.1k
    return Status::OK();
658
49.1k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
39
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
39
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
39
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
39
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
39
    }
656
39
    _closed = true;
657
39
    return Status::OK();
658
39
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
711k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
711k
    if (_closed) {
651
16.1k
        return Status::OK();
652
16.1k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
695k
    _closed = true;
657
695k
    return Status::OK();
658
711k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
53.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
53.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
53.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
53.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
53.5k
    }
656
53.5k
    _closed = true;
657
53.5k
    return Status::OK();
658
53.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
4.33k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.33k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.33k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.33k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.33k
    }
656
4.33k
    _closed = true;
657
4.33k
    return Status::OK();
658
4.33k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
570
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
570
    if (_closed) {
651
285
        return Status::OK();
652
285
    }
653
285
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
285
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
285
    }
656
285
    _closed = true;
657
285
    return Status::OK();
658
570
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.5k
    if (_closed) {
651
5.30k
        return Status::OK();
652
5.30k
    }
653
5.20k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.20k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.20k
    }
656
5.20k
    _closed = true;
657
5.20k
    return Status::OK();
658
10.5k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
537k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
537k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
537k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
537k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
537k
    }
656
537k
    _closed = true;
657
537k
    return Status::OK();
658
537k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
322
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
322
    if (_closed) {
651
167
        return Status::OK();
652
167
    }
653
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
155
    }
656
155
    _closed = true;
657
155
    return Status::OK();
658
322
}
659
660
template <typename SharedState>
661
1.46M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.46M
    _operator_profile =
664
1.46M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.46M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.46M
    _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.46M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.46M
    _operator_profile->add_child(_common_profile, true);
673
1.46M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.46M
    _operator_profile->set_metadata(_parent->node_id());
676
1.46M
    _wait_for_finish_dependency_timer =
677
1.46M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.46M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.46M
    if constexpr (!is_fake_shared) {
680
1.04M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.04M
            info.shared_state_map.end()) {
682
294k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
229k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
229k
            }
685
294k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
294k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
294k
                                                  ? 0
688
294k
                                                  : info.task_idx]
689
294k
                                  .get();
690
294k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
751k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
751k
            _shared_state = info.shared_state->template cast<SharedState>();
696
751k
            _dependency = _shared_state->create_sink_dependency(
697
751k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
751k
        }
699
1.04M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.04M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.04M
    }
702
703
1.46M
    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.46M
    _rows_input_counter =
708
1.46M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.46M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.46M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.46M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.46M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.46M
    _memory_used_counter =
714
1.46M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.46M
    _common_profile->add_info_string("IsColocate",
716
1.46M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.46M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.46M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.46M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.46M
    return Status::OK();
721
1.46M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
114k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
114k
    _operator_profile =
664
114k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
114k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
114k
    _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
114k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
114k
    _operator_profile->add_child(_common_profile, true);
673
114k
    _operator_profile->add_child(_custom_profile, true);
674
675
114k
    _operator_profile->set_metadata(_parent->node_id());
676
114k
    _wait_for_finish_dependency_timer =
677
114k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
114k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
114k
    if constexpr (!is_fake_shared) {
680
114k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
114k
            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
15.8k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
15.8k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
15.8k
                                                  ? 0
688
15.8k
                                                  : info.task_idx]
689
15.8k
                                  .get();
690
15.8k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
98.4k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
98.4k
            _shared_state = info.shared_state->template cast<SharedState>();
696
98.4k
            _dependency = _shared_state->create_sink_dependency(
697
98.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
98.4k
        }
699
114k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
114k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
114k
    }
702
703
114k
    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
114k
    _rows_input_counter =
708
114k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
114k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
114k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
114k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
114k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
114k
    _memory_used_counter =
714
114k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
114k
    _common_profile->add_info_string("IsColocate",
716
114k
                                     std::to_string(_parent->is_colocated_operator()));
717
114k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
114k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
114k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
114k
    return Status::OK();
721
114k
}
_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
189k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
189k
    _operator_profile =
664
189k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
189k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
189k
    _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
189k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
189k
    _operator_profile->add_child(_common_profile, true);
673
189k
    _operator_profile->add_child(_custom_profile, true);
674
675
189k
    _operator_profile->set_metadata(_parent->node_id());
676
189k
    _wait_for_finish_dependency_timer =
677
189k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
189k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
189k
    if constexpr (!is_fake_shared) {
680
189k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
189k
            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
189k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
189k
            _shared_state = info.shared_state->template cast<SharedState>();
696
189k
            _dependency = _shared_state->create_sink_dependency(
697
189k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
189k
        }
699
189k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
189k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
189k
    }
702
703
189k
    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
189k
    _rows_input_counter =
708
189k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
189k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
189k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
189k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
189k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
189k
    _memory_used_counter =
714
189k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
189k
    _common_profile->add_info_string("IsColocate",
716
189k
                                     std::to_string(_parent->is_colocated_operator()));
717
189k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
189k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
189k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
189k
    return Status::OK();
721
189k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
29
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
29
    _operator_profile =
664
29
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
29
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
29
    _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
29
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
29
    _operator_profile->add_child(_common_profile, true);
673
29
    _operator_profile->add_child(_custom_profile, true);
674
675
29
    _operator_profile->set_metadata(_parent->node_id());
676
29
    _wait_for_finish_dependency_timer =
677
29
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
29
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
29
    if constexpr (!is_fake_shared) {
680
29
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
29
            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
29
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
29
            _shared_state = info.shared_state->template cast<SharedState>();
696
29
            _dependency = _shared_state->create_sink_dependency(
697
29
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
29
        }
699
29
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
29
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
29
    }
702
703
29
    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
29
    _rows_input_counter =
708
29
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
29
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
29
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
29
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
29
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
29
    _memory_used_counter =
714
29
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
29
    _common_profile->add_info_string("IsColocate",
716
29
                                     std::to_string(_parent->is_colocated_operator()));
717
29
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
29
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
29
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
29
    return Status::OK();
721
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
4.79k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
4.79k
    _operator_profile =
664
4.79k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
4.79k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
4.79k
    _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
4.79k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
4.79k
    _operator_profile->add_child(_common_profile, true);
673
4.79k
    _operator_profile->add_child(_custom_profile, true);
674
675
4.79k
    _operator_profile->set_metadata(_parent->node_id());
676
4.79k
    _wait_for_finish_dependency_timer =
677
4.79k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
4.79k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
4.79k
    if constexpr (!is_fake_shared) {
680
4.79k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
4.79k
            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
4.79k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
4.79k
            _shared_state = info.shared_state->template cast<SharedState>();
696
4.79k
            _dependency = _shared_state->create_sink_dependency(
697
4.79k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
4.79k
        }
699
4.79k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
4.79k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
4.79k
    }
702
703
4.79k
    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
4.79k
    _rows_input_counter =
708
4.79k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
4.79k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
4.79k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
4.79k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
4.79k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
4.79k
    _memory_used_counter =
714
4.79k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
4.79k
    _common_profile->add_info_string("IsColocate",
716
4.79k
                                     std::to_string(_parent->is_colocated_operator()));
717
4.79k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
4.79k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
4.79k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
4.79k
    return Status::OK();
721
4.79k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11.3k
    _operator_profile =
664
11.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11.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
11.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11.3k
    _operator_profile->add_child(_common_profile, true);
673
11.3k
    _operator_profile->add_child(_custom_profile, true);
674
675
11.3k
    _operator_profile->set_metadata(_parent->node_id());
676
11.3k
    _wait_for_finish_dependency_timer =
677
11.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11.3k
    if constexpr (!is_fake_shared) {
680
11.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11.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
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
11.3k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11.3k
            _shared_state = info.shared_state->template cast<SharedState>();
696
11.3k
            _dependency = _shared_state->create_sink_dependency(
697
11.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11.3k
        }
699
11.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11.3k
    }
702
703
11.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
11.3k
    _rows_input_counter =
708
11.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11.3k
    _memory_used_counter =
714
11.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11.3k
    _common_profile->add_info_string("IsColocate",
716
11.3k
                                     std::to_string(_parent->is_colocated_operator()));
717
11.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11.3k
    return Status::OK();
721
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
84.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
84.0k
    _operator_profile =
664
84.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
84.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
84.0k
    _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
84.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
84.0k
    _operator_profile->add_child(_common_profile, true);
673
84.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
84.0k
    _operator_profile->set_metadata(_parent->node_id());
676
84.0k
    _wait_for_finish_dependency_timer =
677
84.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
84.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
84.0k
    if constexpr (!is_fake_shared) {
680
84.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
84.0k
            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
84.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
84.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
84.0k
            _dependency = _shared_state->create_sink_dependency(
697
84.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
84.0k
        }
699
84.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
84.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
84.0k
    }
702
703
84.0k
    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
84.0k
    _rows_input_counter =
708
84.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
84.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
84.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
84.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
84.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
84.0k
    _memory_used_counter =
714
84.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
84.0k
    _common_profile->add_info_string("IsColocate",
716
84.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
84.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
84.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
84.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
84.0k
    return Status::OK();
721
84.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
49.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
49.0k
    _operator_profile =
664
49.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
49.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
49.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
49.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
49.0k
    _operator_profile->add_child(_common_profile, true);
673
49.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
49.0k
    _operator_profile->set_metadata(_parent->node_id());
676
49.0k
    _wait_for_finish_dependency_timer =
677
49.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
49.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
49.0k
    if constexpr (!is_fake_shared) {
680
49.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
49.2k
            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
49.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
49.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
49.2k
                                                  ? 0
688
49.2k
                                                  : info.task_idx]
689
49.2k
                                  .get();
690
49.2k
            _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
49.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
49.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
49.0k
    }
702
703
49.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
49.0k
    _rows_input_counter =
708
49.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
49.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
49.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
49.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
49.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
49.0k
    _memory_used_counter =
714
49.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
49.0k
    _common_profile->add_info_string("IsColocate",
716
49.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
49.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
49.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
49.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
49.0k
    return Status::OK();
721
49.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
50
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
50
    _operator_profile =
664
50
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
50
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
50
    _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
50
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
50
    _operator_profile->add_child(_common_profile, true);
673
50
    _operator_profile->add_child(_custom_profile, true);
674
675
50
    _operator_profile->set_metadata(_parent->node_id());
676
50
    _wait_for_finish_dependency_timer =
677
50
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
50
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
50
    if constexpr (!is_fake_shared) {
680
50
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
50
            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
50
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
50
            _shared_state = info.shared_state->template cast<SharedState>();
696
50
            _dependency = _shared_state->create_sink_dependency(
697
50
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
50
        }
699
50
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
50
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
50
    }
702
703
50
    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
50
    _rows_input_counter =
708
50
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
50
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
50
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
50
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
50
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
50
    _memory_used_counter =
714
50
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
50
    _common_profile->add_info_string("IsColocate",
716
50
                                     std::to_string(_parent->is_colocated_operator()));
717
50
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
50
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
50
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
50
    return Status::OK();
721
50
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
419k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
419k
    _operator_profile =
664
419k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
419k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
419k
    _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
419k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
419k
    _operator_profile->add_child(_common_profile, true);
673
419k
    _operator_profile->add_child(_custom_profile, true);
674
675
419k
    _operator_profile->set_metadata(_parent->node_id());
676
419k
    _wait_for_finish_dependency_timer =
677
419k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
419k
    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
419k
    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
419k
    _rows_input_counter =
708
419k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
419k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
419k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
419k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
419k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
419k
    _memory_used_counter =
714
419k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
419k
    _common_profile->add_info_string("IsColocate",
716
419k
                                     std::to_string(_parent->is_colocated_operator()));
717
419k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
419k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
419k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
419k
    return Status::OK();
721
419k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.54k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.54k
    _operator_profile =
664
8.54k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.54k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.54k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.54k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.54k
    _operator_profile->add_child(_common_profile, true);
673
8.54k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.54k
    _operator_profile->set_metadata(_parent->node_id());
676
8.54k
    _wait_for_finish_dependency_timer =
677
8.54k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.54k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.54k
    if constexpr (!is_fake_shared) {
680
8.54k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.54k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.54k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.54k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.54k
            _dependency = _shared_state->create_sink_dependency(
697
8.54k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.54k
        }
699
8.54k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.54k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.54k
    }
702
703
8.54k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.54k
    _rows_input_counter =
708
8.54k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.54k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.54k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.54k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.54k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.54k
    _memory_used_counter =
714
8.54k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.54k
    _common_profile->add_info_string("IsColocate",
716
8.54k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.54k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.54k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.54k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.54k
    return Status::OK();
721
8.54k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
387
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
387
    _operator_profile =
664
387
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
387
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
387
    _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
387
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
387
    _operator_profile->add_child(_common_profile, true);
673
387
    _operator_profile->add_child(_custom_profile, true);
674
675
387
    _operator_profile->set_metadata(_parent->node_id());
676
387
    _wait_for_finish_dependency_timer =
677
387
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
387
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
387
    if constexpr (!is_fake_shared) {
680
387
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
387
            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
387
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
387
            _shared_state = info.shared_state->template cast<SharedState>();
696
387
            _dependency = _shared_state->create_sink_dependency(
697
387
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
387
        }
699
387
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
387
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
387
    }
702
703
387
    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
387
    _rows_input_counter =
708
387
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
387
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
387
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
387
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
387
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
387
    _memory_used_counter =
714
387
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
387
    _common_profile->add_info_string("IsColocate",
716
387
                                     std::to_string(_parent->is_colocated_operator()));
717
387
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
387
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
387
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
387
    return Status::OK();
721
387
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.75k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.75k
    _operator_profile =
664
1.75k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.75k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.75k
    _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.75k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.75k
    _operator_profile->add_child(_common_profile, true);
673
1.75k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.75k
    _operator_profile->set_metadata(_parent->node_id());
676
1.75k
    _wait_for_finish_dependency_timer =
677
1.75k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.75k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.75k
    if constexpr (!is_fake_shared) {
680
1.75k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.75k
            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
1.75k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.75k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.75k
            _dependency = _shared_state->create_sink_dependency(
697
1.75k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.75k
        }
699
1.75k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.75k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.75k
    }
702
703
1.75k
    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.75k
    _rows_input_counter =
708
1.75k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.75k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.75k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.75k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.75k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.75k
    _memory_used_counter =
714
1.75k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.75k
    _common_profile->add_info_string("IsColocate",
716
1.75k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.75k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.75k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.75k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.75k
    return Status::OK();
721
1.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.6k
    _operator_profile =
664
12.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.6k
    _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.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.6k
    _operator_profile->add_child(_common_profile, true);
673
12.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.6k
    _operator_profile->set_metadata(_parent->node_id());
676
12.6k
    _wait_for_finish_dependency_timer =
677
12.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.6k
    if constexpr (!is_fake_shared) {
680
12.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.6k
            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.6k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.6k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.6k
            _dependency = _shared_state->create_sink_dependency(
697
12.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.6k
        }
699
12.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.6k
    }
702
703
12.6k
    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.6k
    _rows_input_counter =
708
12.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.6k
    _memory_used_counter =
714
12.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.6k
    _common_profile->add_info_string("IsColocate",
716
12.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.6k
    return Status::OK();
721
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
227k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
227k
    _operator_profile =
664
227k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
227k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
227k
    _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
227k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
227k
    _operator_profile->add_child(_common_profile, true);
673
227k
    _operator_profile->add_child(_custom_profile, true);
674
675
227k
    _operator_profile->set_metadata(_parent->node_id());
676
227k
    _wait_for_finish_dependency_timer =
677
227k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
227k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
227k
    if constexpr (!is_fake_shared) {
680
227k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
229k
            info.shared_state_map.end()) {
682
229k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
229k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
229k
            }
685
229k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
229k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
229k
                                                  ? 0
688
229k
                                                  : info.task_idx]
689
229k
                                  .get();
690
229k
            _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
227k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
227k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
227k
    }
702
703
227k
    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
227k
    _rows_input_counter =
708
227k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
227k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
227k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
227k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
227k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
227k
    _memory_used_counter =
714
227k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
227k
    _common_profile->add_info_string("IsColocate",
716
227k
                                     std::to_string(_parent->is_colocated_operator()));
717
227k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
227k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
227k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
227k
    return Status::OK();
721
227k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
342k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
342k
    _operator_profile =
664
342k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
342k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
342k
    _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
342k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
342k
    _operator_profile->add_child(_common_profile, true);
673
342k
    _operator_profile->add_child(_custom_profile, true);
674
675
342k
    _operator_profile->set_metadata(_parent->node_id());
676
342k
    _wait_for_finish_dependency_timer =
677
342k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
342k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
342k
    if constexpr (!is_fake_shared) {
680
342k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
342k
            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
342k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
342k
            _shared_state = info.shared_state->template cast<SharedState>();
696
342k
            _dependency = _shared_state->create_sink_dependency(
697
342k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
342k
        }
699
342k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
342k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
342k
    }
702
703
342k
    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
342k
    _rows_input_counter =
708
342k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
342k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
342k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
342k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
342k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
342k
    _memory_used_counter =
714
342k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
342k
    _common_profile->add_info_string("IsColocate",
716
342k
                                     std::to_string(_parent->is_colocated_operator()));
717
342k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
342k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
342k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
342k
    return Status::OK();
721
342k
}
_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
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
328
    _operator_profile =
664
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
328
    _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
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
328
    _operator_profile->add_child(_common_profile, true);
673
328
    _operator_profile->add_child(_custom_profile, true);
674
675
328
    _operator_profile->set_metadata(_parent->node_id());
676
328
    _wait_for_finish_dependency_timer =
677
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
328
    if constexpr (!is_fake_shared) {
680
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
328
            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
328
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
328
            _shared_state = info.shared_state->template cast<SharedState>();
696
328
            _dependency = _shared_state->create_sink_dependency(
697
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
328
        }
699
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
328
    }
702
703
328
    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
328
    _rows_input_counter =
708
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
328
    _memory_used_counter =
714
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
328
    _common_profile->add_info_string("IsColocate",
716
328
                                     std::to_string(_parent->is_colocated_operator()));
717
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
328
    return Status::OK();
721
328
}
722
723
template <typename SharedState>
724
1.47M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.47M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.47M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.05M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.05M
    }
731
1.47M
    _closed = true;
732
1.47M
    return Status::OK();
733
1.47M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
114k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
114k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
114k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
114k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
114k
    }
731
114k
    _closed = true;
732
114k
    return Status::OK();
733
114k
}
_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
190k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
190k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
190k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
190k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
190k
    }
731
190k
    _closed = true;
732
190k
    return Status::OK();
733
190k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
20
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
20
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
18
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
18
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
18
    }
731
18
    _closed = true;
732
18
    return Status::OK();
733
20
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4.78k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4.78k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4.78k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4.78k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4.78k
    }
731
4.78k
    _closed = true;
732
4.78k
    return Status::OK();
733
4.78k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
11.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
11.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
11.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
11.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
11.4k
    }
731
11.4k
    _closed = true;
732
11.4k
    return Status::OK();
733
11.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
84.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
84.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
84.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
84.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
84.1k
    }
731
84.1k
    _closed = true;
732
84.1k
    return Status::OK();
733
84.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
49.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
49.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
49.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
49.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
49.1k
    }
731
49.1k
    _closed = true;
732
49.1k
    return Status::OK();
733
49.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
39
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
39
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
39
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
39
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
39
    }
731
39
    _closed = true;
732
39
    return Status::OK();
733
39
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
425k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
425k
    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
425k
    _closed = true;
732
425k
    return Status::OK();
733
425k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.55k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.55k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.55k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.55k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.55k
    }
731
8.55k
    _closed = true;
732
8.55k
    return Status::OK();
733
8.55k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
285
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
285
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
285
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
285
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
285
    }
731
285
    _closed = true;
732
285
    return Status::OK();
733
285
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.76k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.76k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.76k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.76k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.76k
    }
731
1.76k
    _closed = true;
732
1.76k
    return Status::OK();
733
1.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.6k
    }
731
12.6k
    _closed = true;
732
12.6k
    return Status::OK();
733
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
229k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
229k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
229k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
229k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
229k
    }
731
229k
    _closed = true;
732
229k
    return Status::OK();
733
229k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
345k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
345k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
345k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
345k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
345k
    }
731
345k
    _closed = true;
732
345k
    return Status::OK();
733
345k
}
_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
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
328
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
328
    }
731
328
    _closed = true;
732
328
    return Status::OK();
733
328
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
3.03k
                                                          bool* eos) {
738
3.03k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
3.03k
    return pull(state, block, eos);
740
3.03k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
38
                                                          bool* eos) {
738
38
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
38
    return pull(state, block, eos);
740
38
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
2.99k
                                                          bool* eos) {
738
2.99k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
2.99k
    return pull(state, block, eos);
740
2.99k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
438k
                                                         bool* eos) {
745
438k
    auto& local_state = get_local_state(state);
746
438k
    if (need_more_input_data(state)) {
747
408k
        local_state._child_block->clear_column_data(
748
408k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
408k
                        .num_materialized_slots());
750
408k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
408k
                state, local_state._child_block.get(), &local_state._child_eos));
752
408k
        *eos = local_state._child_eos;
753
408k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
67.1k
            return Status::OK();
755
67.1k
        }
756
340k
        {
757
340k
            SCOPED_TIMER(local_state.exec_time_counter());
758
340k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
340k
        }
760
340k
    }
761
762
371k
    if (!need_more_input_data(state)) {
763
346k
        SCOPED_TIMER(local_state.exec_time_counter());
764
346k
        bool new_eos = false;
765
346k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
346k
        if (new_eos) {
767
268k
            *eos = true;
768
268k
        } else if (!need_more_input_data(state)) {
769
24.4k
            *eos = false;
770
24.4k
        }
771
346k
    }
772
371k
    return Status::OK();
773
371k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
146k
                                                         bool* eos) {
745
146k
    auto& local_state = get_local_state(state);
746
146k
    if (need_more_input_data(state)) {
747
129k
        local_state._child_block->clear_column_data(
748
129k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
129k
                        .num_materialized_slots());
750
129k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
129k
                state, local_state._child_block.get(), &local_state._child_eos));
752
129k
        *eos = local_state._child_eos;
753
129k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
46.2k
            return Status::OK();
755
46.2k
        }
756
82.9k
        {
757
82.9k
            SCOPED_TIMER(local_state.exec_time_counter());
758
82.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
82.9k
        }
760
82.9k
    }
761
762
100k
    if (!need_more_input_data(state)) {
763
100k
        SCOPED_TIMER(local_state.exec_time_counter());
764
100k
        bool new_eos = false;
765
100k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
100k
        if (new_eos) {
767
42.1k
            *eos = true;
768
58.1k
        } else if (!need_more_input_data(state)) {
769
10.0k
            *eos = false;
770
10.0k
        }
771
100k
    }
772
100k
    return Status::OK();
773
100k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.43k
                                                         bool* eos) {
745
4.43k
    auto& local_state = get_local_state(state);
746
4.43k
    if (need_more_input_data(state)) {
747
2.50k
        local_state._child_block->clear_column_data(
748
2.50k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.50k
                        .num_materialized_slots());
750
2.50k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.50k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.50k
        *eos = local_state._child_eos;
753
2.50k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
574
            return Status::OK();
755
574
        }
756
1.93k
        {
757
1.93k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.93k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.93k
        }
760
1.93k
    }
761
762
3.86k
    if (!need_more_input_data(state)) {
763
3.86k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.86k
        bool new_eos = false;
765
3.86k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.86k
        if (new_eos) {
767
1.29k
            *eos = true;
768
2.57k
        } else if (!need_more_input_data(state)) {
769
1.93k
            *eos = false;
770
1.93k
        }
771
3.86k
    }
772
3.85k
    return Status::OK();
773
3.85k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.87k
                                                         bool* eos) {
745
1.87k
    auto& local_state = get_local_state(state);
746
1.87k
    if (need_more_input_data(state)) {
747
1.87k
        local_state._child_block->clear_column_data(
748
1.87k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.87k
                        .num_materialized_slots());
750
1.87k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.87k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.87k
        *eos = local_state._child_eos;
753
1.87k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
761
            return Status::OK();
755
761
        }
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
779
            *eos = true;
768
779
        } 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
14.1k
                                                         bool* eos) {
745
14.1k
    auto& local_state = get_local_state(state);
746
14.2k
    if (need_more_input_data(state)) {
747
14.2k
        local_state._child_block->clear_column_data(
748
14.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
14.2k
                        .num_materialized_slots());
750
14.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
14.2k
                state, local_state._child_block.get(), &local_state._child_eos));
752
14.2k
        *eos = local_state._child_eos;
753
14.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.62k
            return Status::OK();
755
3.62k
        }
756
10.5k
        {
757
10.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.5k
        }
760
10.5k
    }
761
762
10.5k
    if (!need_more_input_data(state)) {
763
6.57k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.57k
        bool new_eos = false;
765
6.57k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.57k
        if (new_eos) {
767
6.53k
            *eos = true;
768
6.53k
        } else if (!need_more_input_data(state)) {
769
13
            *eos = false;
770
13
        }
771
6.57k
    }
772
10.5k
    return Status::OK();
773
10.5k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
242k
                                                         bool* eos) {
745
242k
    auto& local_state = get_local_state(state);
746
243k
    if (need_more_input_data(state)) {
747
243k
        local_state._child_block->clear_column_data(
748
243k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
243k
                        .num_materialized_slots());
750
243k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
243k
                state, local_state._child_block.get(), &local_state._child_eos));
752
243k
        *eos = local_state._child_eos;
753
243k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
14.3k
            return Status::OK();
755
14.3k
        }
756
229k
        {
757
229k
            SCOPED_TIMER(local_state.exec_time_counter());
758
229k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
229k
        }
760
229k
    }
761
762
228k
    if (!need_more_input_data(state)) {
763
208k
        SCOPED_TIMER(local_state.exec_time_counter());
764
208k
        bool new_eos = false;
765
208k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
208k
        if (new_eos) {
767
208k
            *eos = true;
768
208k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
208k
    }
772
228k
    return Status::OK();
773
228k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.3k
                                                         bool* eos) {
745
21.3k
    auto& local_state = get_local_state(state);
746
21.3k
    if (need_more_input_data(state)) {
747
9.28k
        local_state._child_block->clear_column_data(
748
9.28k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.28k
                        .num_materialized_slots());
750
9.28k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.28k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.28k
        *eos = local_state._child_eos;
753
9.28k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
807
            return Status::OK();
755
807
        }
756
8.47k
        {
757
8.47k
            SCOPED_TIMER(local_state.exec_time_counter());
758
8.47k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
8.47k
        }
760
8.47k
    }
761
762
20.5k
    if (!need_more_input_data(state)) {
763
20.0k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.0k
        bool new_eos = false;
765
20.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.0k
        if (new_eos) {
767
4.76k
            *eos = true;
768
15.3k
        } else if (!need_more_input_data(state)) {
769
12.0k
            *eos = false;
770
12.0k
        }
771
20.0k
    }
772
20.5k
    return Status::OK();
773
20.5k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.40k
                                                         bool* eos) {
745
7.40k
    auto& local_state = get_local_state(state);
746
7.40k
    if (need_more_input_data(state)) {
747
7.05k
        local_state._child_block->clear_column_data(
748
7.05k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.05k
                        .num_materialized_slots());
750
7.05k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.05k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.05k
        *eos = local_state._child_eos;
753
7.05k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
796
            return Status::OK();
755
796
        }
756
6.26k
        {
757
6.26k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.26k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.26k
        }
760
6.26k
    }
761
762
6.62k
    if (!need_more_input_data(state)) {
763
6.62k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.62k
        bool new_eos = false;
765
6.62k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.62k
        if (new_eos) {
767
4.59k
            *eos = true;
768
4.59k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
6.62k
    }
772
6.60k
    return Status::OK();
773
6.60k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
46.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
46.8k
    RETURN_IF_ERROR(Base::init(state, info));
779
46.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
46.8k
                                                         "AsyncWriterDependency", true);
781
46.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
46.8k
                             _finish_dependency));
783
784
46.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
46.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
46.8k
    return Status::OK();
787
46.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
361
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
361
    RETURN_IF_ERROR(Base::init(state, info));
779
361
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
361
                                                         "AsyncWriterDependency", true);
781
361
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
361
                             _finish_dependency));
783
784
361
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
361
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
361
    return Status::OK();
787
361
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
46.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
46.4k
    RETURN_IF_ERROR(Base::init(state, info));
779
46.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
46.4k
                                                         "AsyncWriterDependency", true);
781
46.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
46.4k
                             _finish_dependency));
783
784
46.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
46.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
46.4k
    return Status::OK();
787
46.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
12
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
12
    RETURN_IF_ERROR(Base::init(state, info));
779
12
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
12
                                                         "AsyncWriterDependency", true);
781
12
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
12
                             _finish_dependency));
783
784
12
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
12
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
12
    return Status::OK();
787
12
}
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
47.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
47.1k
    RETURN_IF_ERROR(Base::open(state));
793
47.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
378k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
331k
        RETURN_IF_ERROR(
796
331k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
331k
    }
798
47.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
47.1k
    return Status::OK();
800
47.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
361
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
361
    RETURN_IF_ERROR(Base::open(state));
793
361
    _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
361
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
361
    return Status::OK();
800
361
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
46.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
46.8k
    RETURN_IF_ERROR(Base::open(state));
793
46.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
376k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
329k
        RETURN_IF_ERROR(
796
329k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
329k
    }
798
46.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
46.8k
    return Status::OK();
800
46.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
12
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
12
    RETURN_IF_ERROR(Base::open(state));
793
12
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
216
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
204
        RETURN_IF_ERROR(
796
204
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
204
    }
798
12
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
12
    return Status::OK();
800
12
}
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
62.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
62.2k
    return _writer->sink(block, eos);
806
62.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.36k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.36k
    return _writer->sink(block, eos);
806
1.36k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
60.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
60.8k
    return _writer->sink(block, eos);
806
60.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
12
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
12
    return _writer->sink(block, eos);
806
12
}
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
47.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
47.1k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
47.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
47.1k
    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
47.2k
    if (_writer) {
818
47.2k
        Status st = _writer->get_writer_status();
819
47.2k
        if (exec_status.ok()) {
820
47.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
47.1k
                                                       : Status::Cancelled("force close"));
822
47.1k
        } else {
823
87
            _writer->force_close(exec_status);
824
87
        }
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
47.2k
        RETURN_IF_ERROR(st);
829
47.2k
    }
830
47.1k
    return Base::close(state, exec_status);
831
47.1k
}
_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
46.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
46.8k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
46.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
46.8k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
46.8k
    if (_writer) {
818
46.8k
        Status st = _writer->get_writer_status();
819
46.8k
        if (exec_status.ok()) {
820
46.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
46.7k
                                                       : Status::Cancelled("force close"));
822
46.7k
        } else {
823
87
            _writer->force_close(exec_status);
824
87
        }
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
46.8k
        RETURN_IF_ERROR(st);
829
46.8k
    }
830
46.7k
    return Base::close(state, exec_status);
831
46.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
12
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
12
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
12
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
12
    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
12
    if (_writer) {
818
12
        Status st = _writer->get_writer_status();
819
12
        if (exec_status.ok()) {
820
12
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
12
                                                       : Status::Cancelled("force close"));
822
12
        } 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
12
        RETURN_IF_ERROR(st);
829
12
    }
830
12
    return Base::close(state, exec_status);
831
12
}
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(SpillIcebergTableSinkLocalState)
850
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
851
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
852
DECLARE_OPERATOR(MCTableSinkLocalState)
853
DECLARE_OPERATOR(AnalyticSinkLocalState)
854
DECLARE_OPERATOR(BlackholeSinkLocalState)
855
DECLARE_OPERATOR(SortSinkLocalState)
856
DECLARE_OPERATOR(SpillSortSinkLocalState)
857
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
858
DECLARE_OPERATOR(AggSinkLocalState)
859
DECLARE_OPERATOR(BucketedAggSinkLocalState)
860
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
861
DECLARE_OPERATOR(ExchangeSinkLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
863
DECLARE_OPERATOR(UnionSinkLocalState)
864
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
865
DECLARE_OPERATOR(PartitionSortSinkLocalState)
866
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
868
DECLARE_OPERATOR(SetSinkLocalState<true>)
869
DECLARE_OPERATOR(SetSinkLocalState<false>)
870
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
871
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
872
DECLARE_OPERATOR(CacheSinkLocalState)
873
DECLARE_OPERATOR(DictSinkLocalState)
874
DECLARE_OPERATOR(RecCTESinkLocalState)
875
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
876
877
#undef DECLARE_OPERATOR
878
879
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
880
DECLARE_OPERATOR(HashJoinProbeLocalState)
881
DECLARE_OPERATOR(OlapScanLocalState)
882
DECLARE_OPERATOR(GroupCommitLocalState)
883
DECLARE_OPERATOR(JDBCScanLocalState)
884
DECLARE_OPERATOR(FileScanLocalState)
885
DECLARE_OPERATOR(AnalyticLocalState)
886
DECLARE_OPERATOR(SortLocalState)
887
DECLARE_OPERATOR(SpillSortLocalState)
888
DECLARE_OPERATOR(LocalMergeSortLocalState)
889
DECLARE_OPERATOR(AggLocalState)
890
DECLARE_OPERATOR(BucketedAggLocalState)
891
DECLARE_OPERATOR(PartitionedAggLocalState)
892
DECLARE_OPERATOR(TableFunctionLocalState)
893
DECLARE_OPERATOR(ExchangeLocalState)
894
DECLARE_OPERATOR(RepeatLocalState)
895
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
896
DECLARE_OPERATOR(AssertNumRowsLocalState)
897
DECLARE_OPERATOR(EmptySetLocalState)
898
DECLARE_OPERATOR(UnionSourceLocalState)
899
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
900
DECLARE_OPERATOR(PartitionSortSourceLocalState)
901
DECLARE_OPERATOR(SetSourceLocalState<true>)
902
DECLARE_OPERATOR(SetSourceLocalState<false>)
903
DECLARE_OPERATOR(DataGenLocalState)
904
DECLARE_OPERATOR(SchemaScanLocalState)
905
DECLARE_OPERATOR(MetaScanLocalState)
906
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
907
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
908
DECLARE_OPERATOR(CacheSourceLocalState)
909
DECLARE_OPERATOR(RecCTESourceLocalState)
910
DECLARE_OPERATOR(RecCTEScanLocalState)
911
912
#ifdef BE_TEST
913
DECLARE_OPERATOR(MockLocalState)
914
DECLARE_OPERATOR(MockScanLocalState)
915
#endif
916
#undef DECLARE_OPERATOR
917
918
template class StreamingOperatorX<AssertNumRowsLocalState>;
919
template class StreamingOperatorX<SelectLocalState>;
920
921
template class StatefulOperatorX<HashJoinProbeLocalState>;
922
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
923
template class StatefulOperatorX<RepeatLocalState>;
924
template class StatefulOperatorX<MaterializationLocalState>;
925
template class StatefulOperatorX<StreamingAggLocalState>;
926
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
927
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
928
template class StatefulOperatorX<TableFunctionLocalState>;
929
930
template class PipelineXSinkLocalState<HashJoinSharedState>;
931
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
932
template class PipelineXSinkLocalState<SortSharedState>;
933
template class PipelineXSinkLocalState<SpillSortSharedState>;
934
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
935
template class PipelineXSinkLocalState<AnalyticSharedState>;
936
template class PipelineXSinkLocalState<AggSharedState>;
937
template class PipelineXSinkLocalState<BucketedAggSharedState>;
938
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
939
template class PipelineXSinkLocalState<FakeSharedState>;
940
template class PipelineXSinkLocalState<UnionSharedState>;
941
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
942
template class PipelineXSinkLocalState<MultiCastSharedState>;
943
template class PipelineXSinkLocalState<SetSharedState>;
944
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
945
template class PipelineXSinkLocalState<BasicSharedState>;
946
template class PipelineXSinkLocalState<DataQueueSharedState>;
947
template class PipelineXSinkLocalState<RecCTESharedState>;
948
949
template class PipelineXLocalState<HashJoinSharedState>;
950
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
951
template class PipelineXLocalState<SortSharedState>;
952
template class PipelineXLocalState<SpillSortSharedState>;
953
template class PipelineXLocalState<NestedLoopJoinSharedState>;
954
template class PipelineXLocalState<AnalyticSharedState>;
955
template class PipelineXLocalState<AggSharedState>;
956
template class PipelineXLocalState<BucketedAggSharedState>;
957
template class PipelineXLocalState<PartitionedAggSharedState>;
958
template class PipelineXLocalState<FakeSharedState>;
959
template class PipelineXLocalState<UnionSharedState>;
960
template class PipelineXLocalState<DataQueueSharedState>;
961
template class PipelineXLocalState<MultiCastSharedState>;
962
template class PipelineXLocalState<PartitionSortNodeSharedState>;
963
template class PipelineXLocalState<SetSharedState>;
964
template class PipelineXLocalState<LocalExchangeSharedState>;
965
template class PipelineXLocalState<BasicSharedState>;
966
template class PipelineXLocalState<RecCTESharedState>;
967
968
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
969
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
970
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
972
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
973
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
977
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
978
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
979
980
#ifdef BE_TEST
981
template class OperatorX<DummyOperatorLocalState>;
982
template class DataSinkOperatorX<DummySinkLocalState>;
983
#endif
984
985
} // namespace doris