Coverage Report

Created: 2026-10-24 11:40

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