Coverage Report

Created: 2026-06-05 04:37

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