Coverage Report

Created: 2026-11-05 19:31

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
769k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
769k
    if (_parent->nereids_id() == -1) {
123
386k
        return fmt::format("(id={})", _parent->node_id());
124
386k
    } else {
125
383k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
383k
    }
127
769k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
60.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
60.4k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
60.4k
    } else {
125
60.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
60.4k
    }
127
60.4k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
3
    } else {
125
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
3
    }
127
4
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
162k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
162k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
162k
    } else {
125
162k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
162k
    }
127
162k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
155
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
155
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
155
    } else {
125
155
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
155
    }
127
155
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4.21k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.21k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
4.21k
    } else {
125
4.21k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
4.21k
    }
127
4.21k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.96k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.96k
    if (_parent->nereids_id() == -1) {
123
60
        return fmt::format("(id={})", _parent->node_id());
124
5.90k
    } else {
125
5.90k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.90k
    }
127
5.96k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
73.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
73.7k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
73.7k
    } else {
125
73.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
73.7k
    }
127
73.7k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
1.11k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.11k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
1.11k
    } else {
125
1.11k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1.11k
    }
127
1.11k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
111
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
111
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
111
    } else {
125
111
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
111
    }
127
111
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
146k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
146k
    if (_parent->nereids_id() == -1) {
123
108k
        return fmt::format("(id={})", _parent->node_id());
124
108k
    } else {
125
38.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
38.3k
    }
127
146k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
35.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
35.2k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
35.2k
    } else {
125
35.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
35.2k
    }
127
35.2k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
12
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
12
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
12
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
12
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
3.43k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
3.43k
    if (_parent->nereids_id() == -1) {
123
3.43k
        return fmt::format("(id={})", _parent->node_id());
124
3.43k
    } else {
125
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1
    }
127
3.43k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
306
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
306
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
204
    } else {
125
204
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
204
    }
127
306
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
654
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
654
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
641
    } else {
125
641
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
641
    }
127
654
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
274k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
274k
    if (_parent->nereids_id() == -1) {
123
274k
        return fmt::format("(id={})", _parent->node_id());
124
274k
    } else {
125
83
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
83
    }
127
274k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
88
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
88
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
88
    } else {
125
88
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
88
    }
127
88
}
128
129
template <typename SharedStateArg>
130
644k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
644k
    if (_parent->nereids_id() == -1) {
132
277k
        return fmt::format("(id={})", _parent->node_id());
133
366k
    } else {
134
366k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
366k
    }
136
644k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
108k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
108k
    if (_parent->nereids_id() == -1) {
132
0
        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_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
4
    } else {
134
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4
    }
136
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
165k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
165k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
165k
    } else {
134
165k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
165k
    }
136
165k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
162
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
162
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
162
    } else {
134
162
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
162
    }
136
162
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
4.22k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
4.22k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
4.22k
    } else {
134
4.22k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
4.22k
    }
136
4.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.95k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.95k
    if (_parent->nereids_id() == -1) {
132
60
        return fmt::format("(id={})", _parent->node_id());
133
5.89k
    } else {
134
5.89k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.89k
    }
136
5.95k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
74.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
74.0k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
73.9k
    } else {
134
73.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
73.9k
    }
136
74.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
1.12k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.12k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
1.11k
    } else {
134
1.11k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
1.11k
    }
136
1.12k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
121
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
121
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
121
    } else {
134
121
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
121
    }
136
121
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
40
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
40
    if (_parent->nereids_id() == -1) {
132
40
        return fmt::format("(id={})", _parent->node_id());
133
40
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
40
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
7.50k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
7.50k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
7.50k
    } else {
134
7.50k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
7.50k
    }
136
7.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
306
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
306
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
204
    } else {
134
204
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
204
    }
136
306
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
1.40k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.40k
    if (_parent->nereids_id() == -1) {
132
1.40k
        return fmt::format("(id={})", _parent->node_id());
133
1.40k
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
1.40k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
101k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
101k
    if (_parent->nereids_id() == -1) {
132
101k
        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
101k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
174k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
174k
    if (_parent->nereids_id() == -1) {
132
174k
        return fmt::format("(id={})", _parent->node_id());
133
174k
    } else {
134
73
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
73
    }
136
174k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
11
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
11
    if (_parent->nereids_id() == -1) {
132
11
        return fmt::format("(id={})", _parent->node_id());
133
11
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
11
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
176
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
176
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
176
    } else {
134
176
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
176
    }
136
176
}
137
138
template <typename SharedStateArg>
139
28.7k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
28.7k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
28.7k
    _terminated = true;
144
28.7k
    return Status::OK();
145
28.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.17k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.17k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.17k
    _terminated = true;
144
2.17k
    return Status::OK();
145
2.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1
    _terminated = true;
144
1
    return Status::OK();
145
1
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.32k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.32k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.32k
    _terminated = true;
144
1.32k
    return Status::OK();
145
1.32k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
302
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
302
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
302
    _terminated = true;
144
302
    return Status::OK();
145
302
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
163
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
163
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
163
    _terminated = true;
144
163
    return Status::OK();
145
163
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
367
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
367
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
367
    _terminated = true;
144
367
    return Status::OK();
145
367
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
67
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
67
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
67
    _terminated = true;
144
67
    return Status::OK();
145
67
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4
    _terminated = true;
144
4
    return Status::OK();
145
4
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
277
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
277
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
277
    _terminated = true;
144
277
    return Status::OK();
145
277
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
70
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
70
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
70
    _terminated = true;
144
70
    return Status::OK();
145
70
}
146
147
93.0k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
93.0k
    return _child && _child->is_serial_operator() && !is_source()
149
93.0k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
93.0k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
93.0k
}
152
153
7.18k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
7.18k
    if (!_child) {
155
6.67k
        return false;
156
6.67k
    }
157
510
    if (_child->is_serial_operator()) {
158
0
        return true;
159
0
    }
160
510
    const auto child_distribution = _child->required_data_distribution(state);
161
510
    return child_distribution.need_local_exchange() &&
162
510
           !is_shuffled_exchange(child_distribution.distribution_type);
163
510
}
164
165
template <typename SharedStateArg>
166
16.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.9k
    fmt::memory_buffer debug_string_buffer;
168
16.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.9k
    return fmt::to_string(debug_string_buffer);
170
16.9k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
6
    fmt::memory_buffer debug_string_buffer;
168
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
6
    return fmt::to_string(debug_string_buffer);
170
6
}
_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
4
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
4
    fmt::memory_buffer debug_string_buffer;
168
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
4
    return fmt::to_string(debug_string_buffer);
170
4
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
19
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
19
    fmt::memory_buffer debug_string_buffer;
168
19
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
19
    return fmt::to_string(debug_string_buffer);
170
19
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
16.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.8k
    fmt::memory_buffer debug_string_buffer;
168
16.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.8k
    return fmt::to_string(debug_string_buffer);
170
16.8k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
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_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
16.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.9k
    fmt::memory_buffer debug_string_buffer;
175
16.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.9k
    return fmt::to_string(debug_string_buffer);
177
16.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
4
    fmt::memory_buffer debug_string_buffer;
175
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
4
    return fmt::to_string(debug_string_buffer);
177
4
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
19
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
19
    fmt::memory_buffer debug_string_buffer;
175
19
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
19
    return fmt::to_string(debug_string_buffer);
177
19
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
20
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
20
    fmt::memory_buffer debug_string_buffer;
175
20
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
20
    return fmt::to_string(debug_string_buffer);
177
20
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
19
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
19
    fmt::memory_buffer debug_string_buffer;
175
19
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
19
    return fmt::to_string(debug_string_buffer);
177
19
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
16.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.8k
    fmt::memory_buffer debug_string_buffer;
175
16.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.8k
    return fmt::to_string(debug_string_buffer);
177
16.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
16.9k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
16.9k
    fmt::memory_buffer debug_string_buffer;
181
16.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
16.9k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
16.9k
                   _is_serial_operator);
184
16.9k
    return fmt::to_string(debug_string_buffer);
185
16.9k
}
186
187
16.9k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
16.9k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
16.9k
}
190
191
388k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
388k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
388k
    _nereids_id = tnode.nereids_id;
194
388k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
3.67k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
3.67k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
3.67k
            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
3.67k
    }
207
388k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
388k
    _op_name = substr + "_OPERATOR";
209
210
388k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
388k
    } else if (tnode.__isset.conjuncts) {
213
232k
        for (const auto& conjunct : tnode.conjuncts) {
214
232k
            VExprContextSPtr context;
215
232k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
232k
            _conjuncts.emplace_back(context);
217
232k
        }
218
81.9k
    }
219
220
    // create the projections expr
221
388k
    if (tnode.__isset.projections) {
222
194k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
194k
    }
224
388k
    if (!tnode.intermediate_projections_list.empty()) {
225
18.4E
        DCHECK(has_projection()) << "no final projections";
226
3.67k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
6.73k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
6.73k
            VExprContextSPtrs projections;
229
6.73k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
6.73k
            _projection->intermediate_projections.push_back(projections);
231
6.73k
        }
232
3.67k
    }
233
388k
    return Status::OK();
234
388k
}
235
236
414k
Status OperatorXBase::prepare(RuntimeState* state) {
237
414k
    for (auto& conjunct : _conjuncts) {
238
232k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
232k
    }
240
414k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
363k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
293k
            return a->execute_cost() < b->execute_cost();
243
293k
        });
244
363k
    };
245
246
414k
    if (has_projection()) {
247
194k
        auto& projection = *_projection;
248
201k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
6.73k
            const auto& input_row_desc =
250
6.73k
                    i == 0 ? operator_row_desc_before_projection()
251
6.73k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
6.73k
            RETURN_IF_ERROR(
253
6.73k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
6.73k
        }
255
194k
        const auto& final_projection_input_row_desc =
256
194k
                projection.intermediate_output_row_descriptors.empty()
257
194k
                        ? operator_row_desc_before_projection()
258
194k
                        : projection.intermediate_output_row_descriptors.back();
259
194k
        RETURN_IF_ERROR(
260
194k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
194k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
194k
                                                      projection.output_row_descriptor));
263
194k
    }
264
265
414k
    for (auto& conjunct : _conjuncts) {
266
232k
        RETURN_IF_ERROR(conjunct->open(state));
267
232k
    }
268
414k
    if (has_projection()) {
269
194k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
194k
        for (auto& projections : _projection->intermediate_projections) {
271
6.73k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
6.73k
        }
273
194k
    }
274
414k
    if (_child && !is_source()) {
275
41.2k
        RETURN_IF_ERROR(_child->prepare(state));
276
41.2k
    }
277
278
414k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
414k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
414k
    return Status::OK();
284
414k
}
285
286
5.49k
Status OperatorXBase::terminate(RuntimeState* state) {
287
5.49k
    if (_child && !is_source()) {
288
702
        RETURN_IF_ERROR(_child->terminate(state));
289
702
    }
290
5.49k
    auto result = state->get_local_state_result(operator_id());
291
5.49k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
5.49k
    return result.value()->terminate(state);
295
5.49k
}
296
297
2.00M
Status OperatorXBase::close(RuntimeState* state) {
298
2.00M
    if (_child && !is_source()) {
299
181k
        RETURN_IF_ERROR(_child->close(state));
300
181k
    }
301
2.00M
    auto result = state->get_local_state_result(operator_id());
302
2.00M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
2.00M
    return result.value()->close(state);
306
2.00M
}
307
308
249k
void PipelineXLocalStateBase::clear_origin_block() {
309
249k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
249k
}
311
312
204k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
204k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
204k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
204k
    return Status::OK();
317
204k
}
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
249k
                                     Block* output_block) const {
326
249k
    auto* local_state = state->get_local_state(operator_id());
327
249k
    SCOPED_TIMER(local_state->exec_time_counter());
328
249k
    SCOPED_TIMER(local_state->_projection_timer);
329
249k
    const size_t rows = origin_block->rows();
330
249k
    if (rows == 0) {
331
120k
        return Status::OK();
332
120k
    }
333
129k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
129k
    {
336
129k
        Block input_block = *origin_block;
337
338
129k
        ColumnsWithTypeAndName new_columns;
339
129k
        for (const auto& projections : local_state->_intermediate_projections) {
340
4.01k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
4.01k
            new_columns.resize(projections.size());
345
116k
            for (int i = 0; i < projections.size(); i++) {
346
112k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
112k
                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
112k
            }
355
3.99k
            Block tmp_block {new_columns};
356
3.99k
            input_block.swap(tmp_block);
357
3.99k
        }
358
359
129k
        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
129k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
129k
                output_block, _projection->output_row_descriptor);
368
129k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
129k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
129k
        Columns shared_columns(mutable_columns.size());
371
372
750k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
621k
            ColumnPtr column_ptr;
374
621k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
621k
            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
621k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
621k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
621k
            if (column_ptr->is_exclusive()) {
386
227k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
393k
            } else {
388
393k
                shared_columns[i] = std::move(column_ptr);
389
393k
            }
390
621k
        }
391
392
129k
        scoped_mutable_block.restore();
393
750k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
621k
            if (shared_columns[i]) {
395
393k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
393k
            }
397
621k
        }
398
129k
    }
399
400
0
    origin_block->clear_column_data(
401
129k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
129k
    DCHECK_EQ(output_block->rows(), rows);
403
404
129k
    return Status::OK();
405
129k
}
406
407
2.66M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
2.66M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
2.66M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
2.66M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
2.66M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
2.66M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
2.66M
            if (_debug_point_count++ % 2 == 0) {
414
2.66M
                return Status::OK();
415
2.66M
            }
416
2.66M
        }
417
2.66M
    });
418
419
2.66M
    Status status;
420
2.66M
    auto* local_state = state->get_local_state(operator_id());
421
2.66M
    Defer defer([&]() {
422
2.66M
        if (status.ok()) {
423
2.66M
            local_state->update_output_block_counters(*block);
424
2.66M
        }
425
2.66M
    });
426
2.66M
    if (has_projection()) {
427
249k
        local_state->clear_origin_block();
428
249k
        status = get_block(state, &local_state->_origin_block, eos);
429
249k
        if (UNLIKELY(!status.ok())) {
430
21
            return status;
431
21
        }
432
249k
        status = do_projections(state, &local_state->_origin_block, block);
433
249k
        return status;
434
249k
    }
435
2.41M
    status = get_block(state, block, eos);
436
2.41M
    RETURN_IF_ERROR(block->check_type_and_column());
437
2.41M
    return status;
438
2.41M
}
439
440
1.75M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
1.75M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.65k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.65k
        *eos = true;
444
9.65k
    }
445
446
1.75M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
1.75M
        auto op_name = to_lower(_parent->_op_name);
448
1.75M
        auto arg_op_name = dp->param<std::string>("op_name");
449
1.75M
        arg_op_name = to_lower(arg_op_name);
450
451
1.75M
        if (op_name == arg_op_name) {
452
1.75M
            *eos = true;
453
1.75M
        }
454
1.75M
    });
455
456
1.75M
    if (auto rows = block->rows()) {
457
612k
        _num_rows_returned += rows;
458
612k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
612k
    }
460
1.75M
}
461
462
28.7k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
28.7k
    auto result = state->get_sink_local_state_result();
464
28.7k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
28.7k
    return result.value()->terminate(state);
468
28.7k
}
469
470
16.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
16.9k
    fmt::memory_buffer debug_string_buffer;
472
473
16.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
16.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
16.9k
    return fmt::to_string(debug_string_buffer);
476
16.9k
}
477
478
16.9k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
16.9k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
16.9k
}
481
482
221k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
221k
    std::string op_name = "UNKNOWN_SINK";
484
221k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
222k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
222k
        op_name = it->second;
488
222k
    }
489
221k
    _name = op_name + "_OPERATOR";
490
221k
    return Status::OK();
491
221k
}
492
493
198k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
198k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
198k
    _nereids_id = tnode.nereids_id;
496
198k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
198k
    _name = substr + "_SINK_OPERATOR";
498
198k
    return Status::OK();
499
198k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
919k
                                                            LocalSinkStateInfo& info) {
504
919k
    auto local_state = LocalStateType::create_unique(this, state);
505
919k
    RETURN_IF_ERROR(local_state->init(state, info));
506
919k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
919k
    return Status::OK();
508
919k
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
108k
                                                            LocalSinkStateInfo& info) {
504
108k
    auto local_state = LocalStateType::create_unique(this, state);
505
108k
    RETURN_IF_ERROR(local_state->init(state, info));
506
108k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
108k
    return Status::OK();
508
108k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
128k
                                                            LocalSinkStateInfo& info) {
504
128k
    auto local_state = LocalStateType::create_unique(this, state);
505
128k
    RETURN_IF_ERROR(local_state->init(state, info));
506
128k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
128k
    return Status::OK();
508
128k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6
                                                            LocalSinkStateInfo& info) {
504
6
    auto local_state = LocalStateType::create_unique(this, state);
505
6
    RETURN_IF_ERROR(local_state->init(state, info));
506
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6
    return Status::OK();
508
6
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_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_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
45.3k
                                                            LocalSinkStateInfo& info) {
504
45.3k
    auto local_state = LocalStateType::create_unique(this, state);
505
45.3k
    RETURN_IF_ERROR(local_state->init(state, info));
506
45.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
45.3k
    return Status::OK();
508
45.3k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_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
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.87k
                                                            LocalSinkStateInfo& info) {
504
5.87k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.87k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.87k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.87k
    return Status::OK();
508
5.87k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
18
                                                            LocalSinkStateInfo& info) {
504
18
    auto local_state = LocalStateType::create_unique(this, state);
505
18
    RETURN_IF_ERROR(local_state->init(state, info));
506
18
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
18
    return Status::OK();
508
18
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
165k
                                                            LocalSinkStateInfo& info) {
504
165k
    auto local_state = LocalStateType::create_unique(this, state);
505
165k
    RETURN_IF_ERROR(local_state->init(state, info));
506
165k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
165k
    return Status::OK();
508
165k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
162
                                                            LocalSinkStateInfo& info) {
504
162
    auto local_state = LocalStateType::create_unique(this, state);
505
162
    RETURN_IF_ERROR(local_state->init(state, info));
506
162
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
162
    return Status::OK();
508
162
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
101k
                                                            LocalSinkStateInfo& info) {
504
101k
    auto local_state = LocalStateType::create_unique(this, state);
505
101k
    RETURN_IF_ERROR(local_state->init(state, info));
506
101k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
101k
    return Status::OK();
508
101k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
73.9k
                                                            LocalSinkStateInfo& info) {
504
73.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
73.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
73.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
73.9k
    return Status::OK();
508
73.9k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.11k
                                                            LocalSinkStateInfo& info) {
504
1.11k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.11k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.11k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.11k
    return Status::OK();
508
1.11k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
121
                                                            LocalSinkStateInfo& info) {
504
121
    auto local_state = LocalStateType::create_unique(this, state);
505
121
    RETURN_IF_ERROR(local_state->init(state, info));
506
121
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
121
    return Status::OK();
508
121
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
274k
                                                            LocalSinkStateInfo& info) {
504
274k
    auto local_state = LocalStateType::create_unique(this, state);
505
274k
    RETURN_IF_ERROR(local_state->init(state, info));
506
274k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
274k
    return Status::OK();
508
274k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.21k
                                                            LocalSinkStateInfo& info) {
504
4.21k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.21k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.21k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.21k
    return Status::OK();
508
4.21k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
7.50k
                                                            LocalSinkStateInfo& info) {
504
7.50k
    auto local_state = LocalStateType::create_unique(this, state);
505
7.50k
    RETURN_IF_ERROR(local_state->init(state, info));
506
7.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
7.50k
    return Status::OK();
508
7.50k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.38k
                                                            LocalSinkStateInfo& info) {
504
1.38k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.38k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.38k
    return Status::OK();
508
1.38k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
204
                                                            LocalSinkStateInfo& info) {
504
204
    auto local_state = LocalStateType::create_unique(this, state);
505
204
    RETURN_IF_ERROR(local_state->init(state, info));
506
204
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
204
    return Status::OK();
508
204
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
370
                                                            LocalSinkStateInfo& info) {
504
370
    auto local_state = LocalStateType::create_unique(this, state);
505
370
    RETURN_IF_ERROR(local_state->init(state, info));
506
370
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
370
    return Status::OK();
508
370
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
366
                                                            LocalSinkStateInfo& info) {
504
366
    auto local_state = LocalStateType::create_unique(this, state);
505
366
    RETURN_IF_ERROR(local_state->init(state, info));
506
366
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
366
    return Status::OK();
508
366
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
325
                                                            LocalSinkStateInfo& info) {
504
325
    auto local_state = LocalStateType::create_unique(this, state);
505
325
    RETURN_IF_ERROR(local_state->init(state, info));
506
325
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
325
    return Status::OK();
508
325
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
316
                                                            LocalSinkStateInfo& info) {
504
316
    auto local_state = LocalStateType::create_unique(this, state);
505
316
    RETURN_IF_ERROR(local_state->init(state, info));
506
316
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
316
    return Status::OK();
508
316
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4
                                                            LocalSinkStateInfo& info) {
504
4
    auto local_state = LocalStateType::create_unique(this, state);
505
4
    RETURN_IF_ERROR(local_state->init(state, info));
506
4
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4
    return Status::OK();
508
4
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
566
                                                            LocalSinkStateInfo& info) {
504
566
    auto local_state = LocalStateType::create_unique(this, state);
505
566
    RETURN_IF_ERROR(local_state->init(state, info));
506
566
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
566
    return Status::OK();
508
566
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
62
                                                            LocalSinkStateInfo& info) {
504
62
    auto local_state = LocalStateType::create_unique(this, state);
505
62
    RETURN_IF_ERROR(local_state->init(state, info));
506
62
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
62
    return Status::OK();
508
62
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
88
                                                            LocalSinkStateInfo& info) {
504
88
    auto local_state = LocalStateType::create_unique(this, state);
505
88
    RETURN_IF_ERROR(local_state->init(state, info));
506
88
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
88
    return Status::OK();
508
88
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
88
                                                            LocalSinkStateInfo& info) {
504
88
    auto local_state = LocalStateType::create_unique(this, state);
505
88
    RETURN_IF_ERROR(local_state->init(state, info));
506
88
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
88
    return Status::OK();
508
88
}
509
510
template <typename LocalStateType>
511
795k
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
795k
    } else {
519
795k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
795k
        ss->id = operator_id();
521
795k
        for (auto& dest : dests_id()) {
522
793k
            ss->related_op_ids.insert(dest);
523
793k
        }
524
795k
        return ss;
525
795k
    }
526
795k
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
94.5k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
94.5k
    } else {
519
94.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
94.5k
        ss->id = operator_id();
521
94.5k
        for (auto& dest : dests_id()) {
522
94.4k
            ss->related_op_ids.insert(dest);
523
94.4k
        }
524
94.5k
        return ss;
525
94.5k
    }
526
94.5k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
128k
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
128k
    } else {
519
128k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
128k
        ss->id = operator_id();
521
128k
        for (auto& dest : dests_id()) {
522
128k
            ss->related_op_ids.insert(dest);
523
128k
        }
524
128k
        return ss;
525
128k
    }
526
128k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6
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
    } else {
519
6
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6
        ss->id = operator_id();
521
6
        for (auto& dest : dests_id()) {
522
6
            ss->related_op_ids.insert(dest);
523
6
        }
524
6
        return ss;
525
6
    }
526
6
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
36
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
36
    } else {
519
36
        auto ss = LocalStateType::SharedStateType::create_shared();
520
36
        ss->id = operator_id();
521
36
        for (auto& dest : dests_id()) {
522
36
            ss->related_op_ids.insert(dest);
523
36
        }
524
36
        return ss;
525
36
    }
526
36
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
45.4k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
45.4k
    } else {
519
45.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
45.4k
        ss->id = operator_id();
521
45.4k
        for (auto& dest : dests_id()) {
522
45.2k
            ss->related_op_ids.insert(dest);
523
45.2k
        }
524
45.4k
        return ss;
525
45.4k
    }
526
45.4k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
14
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
14
    } else {
519
14
        auto ss = LocalStateType::SharedStateType::create_shared();
520
14
        ss->id = operator_id();
521
14
        for (auto& dest : dests_id()) {
522
14
            ss->related_op_ids.insert(dest);
523
14
        }
524
14
        return ss;
525
14
    }
526
14
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.97k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
5.97k
    } else {
519
5.97k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.97k
        ss->id = operator_id();
521
5.97k
        for (auto& dest : dests_id()) {
522
5.95k
            ss->related_op_ids.insert(dest);
523
5.95k
        }
524
5.97k
        return ss;
525
5.97k
    }
526
5.97k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
18
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
18
    } else {
519
18
        auto ss = LocalStateType::SharedStateType::create_shared();
520
18
        ss->id = operator_id();
521
18
        for (auto& dest : dests_id()) {
522
18
            ss->related_op_ids.insert(dest);
523
18
        }
524
18
        return ss;
525
18
    }
526
18
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
165k
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
165k
    } else {
519
165k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
165k
        ss->id = operator_id();
521
165k
        for (auto& dest : dests_id()) {
522
165k
            ss->related_op_ids.insert(dest);
523
165k
        }
524
165k
        return ss;
525
165k
    }
526
165k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
164
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
164
    } else {
519
164
        auto ss = LocalStateType::SharedStateType::create_shared();
520
164
        ss->id = operator_id();
521
164
        for (auto& dest : dests_id()) {
522
164
            ss->related_op_ids.insert(dest);
523
164
        }
524
164
        return ss;
525
164
    }
526
164
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
74.2k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
74.2k
    } else {
519
74.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
74.2k
        ss->id = operator_id();
521
74.2k
        for (auto& dest : dests_id()) {
522
74.2k
            ss->related_op_ids.insert(dest);
523
74.2k
        }
524
74.2k
        return ss;
525
74.2k
    }
526
74.2k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
120
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
120
    } else {
519
120
        auto ss = LocalStateType::SharedStateType::create_shared();
520
120
        ss->id = operator_id();
521
120
        for (auto& dest : dests_id()) {
522
120
            ss->related_op_ids.insert(dest);
523
120
        }
524
120
        return ss;
525
120
    }
526
120
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
274k
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
274k
    } else {
519
274k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
274k
        ss->id = operator_id();
521
274k
        for (auto& dest : dests_id()) {
522
272k
            ss->related_op_ids.insert(dest);
523
272k
        }
524
274k
        return ss;
525
274k
    }
526
274k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
4.23k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
4.23k
    } else {
519
4.23k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
4.23k
        ss->id = operator_id();
521
4.23k
        for (auto& dest : dests_id()) {
522
4.22k
            ss->related_op_ids.insert(dest);
523
4.22k
        }
524
4.23k
        return ss;
525
4.23k
    }
526
4.23k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
306
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
306
    } else {
519
306
        auto ss = LocalStateType::SharedStateType::create_shared();
520
306
        ss->id = operator_id();
521
306
        for (auto& dest : dests_id()) {
522
306
            ss->related_op_ids.insert(dest);
523
306
        }
524
306
        return ss;
525
306
    }
526
306
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
332
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
332
    } else {
519
332
        auto ss = LocalStateType::SharedStateType::create_shared();
520
332
        ss->id = operator_id();
521
332
        for (auto& dest : dests_id()) {
522
330
            ss->related_op_ids.insert(dest);
523
330
        }
524
332
        return ss;
525
332
    }
526
332
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
322
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
322
    } else {
519
322
        auto ss = LocalStateType::SharedStateType::create_shared();
520
322
        ss->id = operator_id();
521
322
        for (auto& dest : dests_id()) {
522
322
            ss->related_op_ids.insert(dest);
523
322
        }
524
322
        return ss;
525
322
    }
526
322
}
_ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_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_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
562
            ss->related_op_ids.insert(dest);
523
562
        }
524
568
        return ss;
525
568
    }
526
568
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
62
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
62
    } else {
519
62
        auto ss = LocalStateType::SharedStateType::create_shared();
520
62
        ss->id = operator_id();
521
62
        for (auto& dest : dests_id()) {
522
62
            ss->related_op_ids.insert(dest);
523
62
        }
524
62
        return ss;
525
62
    }
526
62
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
936k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
936k
    auto local_state = LocalStateType::create_unique(state, this);
531
936k
    RETURN_IF_ERROR(local_state->init(state, info));
532
936k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
936k
    return Status::OK();
534
936k
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
60.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
60.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
60.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
60.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
60.4k
    return Status::OK();
534
60.4k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
160k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
160k
    auto local_state = LocalStateType::create_unique(state, this);
531
160k
    RETURN_IF_ERROR(local_state->init(state, info));
532
160k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
160k
    return Status::OK();
534
160k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
121
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
121
    auto local_state = LocalStateType::create_unique(state, this);
531
121
    RETURN_IF_ERROR(local_state->init(state, info));
532
121
    state->emplace_local_state(operator_id(), std::move(local_state));
533
121
    return Status::OK();
534
121
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.64k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.64k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.64k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.64k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.64k
    return Status::OK();
534
2.64k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.90k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.90k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.90k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.90k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.90k
    return Status::OK();
534
5.90k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.87k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.87k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.87k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.87k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.87k
    return Status::OK();
534
5.87k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
155
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
155
    auto local_state = LocalStateType::create_unique(state, this);
531
155
    RETURN_IF_ERROR(local_state->init(state, info));
532
155
    state->emplace_local_state(operator_id(), std::move(local_state));
533
155
    return Status::OK();
534
155
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
158k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
158k
    auto local_state = LocalStateType::create_unique(state, this);
531
158k
    RETURN_IF_ERROR(local_state->init(state, info));
532
158k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
158k
    return Status::OK();
534
158k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
73.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
73.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
73.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
73.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
73.9k
    return Status::OK();
534
73.9k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.11k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.11k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.11k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.11k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.11k
    return Status::OK();
534
1.11k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
111
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
111
    auto local_state = LocalStateType::create_unique(state, this);
531
111
    RETURN_IF_ERROR(local_state->init(state, info));
532
111
    state->emplace_local_state(operator_id(), std::move(local_state));
533
111
    return Status::OK();
534
111
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.70k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.70k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.70k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.70k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.70k
    return Status::OK();
534
2.70k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
108k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
108k
    auto local_state = LocalStateType::create_unique(state, this);
531
108k
    RETURN_IF_ERROR(local_state->init(state, info));
532
108k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
108k
    return Status::OK();
534
108k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
881
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
881
    auto local_state = LocalStateType::create_unique(state, this);
531
881
    RETURN_IF_ERROR(local_state->init(state, info));
532
881
    state->emplace_local_state(operator_id(), std::move(local_state));
533
881
    return Status::OK();
534
881
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.22k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.22k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.22k
    return Status::OK();
534
4.22k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
20
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
20
    auto local_state = LocalStateType::create_unique(state, this);
531
20
    RETURN_IF_ERROR(local_state->init(state, info));
532
20
    state->emplace_local_state(operator_id(), std::move(local_state));
533
20
    return Status::OK();
534
20
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
849
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
849
    auto local_state = LocalStateType::create_unique(state, this);
531
849
    RETURN_IF_ERROR(local_state->init(state, info));
532
849
    state->emplace_local_state(operator_id(), std::move(local_state));
533
849
    return Status::OK();
534
849
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
35.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
35.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
35.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
35.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
35.2k
    return Status::OK();
534
35.2k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.44k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.44k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.44k
    return Status::OK();
534
3.44k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
204
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
204
    auto local_state = LocalStateType::create_unique(state, this);
531
204
    RETURN_IF_ERROR(local_state->init(state, info));
532
204
    state->emplace_local_state(operator_id(), std::move(local_state));
533
204
    return Status::OK();
534
204
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
325
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
325
    auto local_state = LocalStateType::create_unique(state, this);
531
325
    RETURN_IF_ERROR(local_state->init(state, info));
532
325
    state->emplace_local_state(operator_id(), std::move(local_state));
533
325
    return Status::OK();
534
325
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
316
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
316
    auto local_state = LocalStateType::create_unique(state, this);
531
316
    RETURN_IF_ERROR(local_state->init(state, info));
532
316
    state->emplace_local_state(operator_id(), std::move(local_state));
533
316
    return Status::OK();
534
316
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
440
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
440
    auto local_state = LocalStateType::create_unique(state, this);
531
440
    RETURN_IF_ERROR(local_state->init(state, info));
532
440
    state->emplace_local_state(operator_id(), std::move(local_state));
533
440
    return Status::OK();
534
440
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.70k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.70k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.70k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.70k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.70k
    return Status::OK();
534
1.70k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.83k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.83k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.83k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.83k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.83k
    return Status::OK();
534
9.83k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
275k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
275k
    auto local_state = LocalStateType::create_unique(state, this);
531
275k
    RETURN_IF_ERROR(local_state->init(state, info));
532
275k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
275k
    return Status::OK();
534
275k
}
_ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3
    auto local_state = LocalStateType::create_unique(state, this);
531
3
    RETURN_IF_ERROR(local_state->init(state, info));
532
3
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3
    return Status::OK();
534
3
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
88
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
88
    auto local_state = LocalStateType::create_unique(state, this);
531
88
    RETURN_IF_ERROR(local_state->init(state, info));
532
88
    state->emplace_local_state(operator_id(), std::move(local_state));
533
88
    return Status::OK();
534
88
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.15k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.15k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.15k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.15k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.15k
    return Status::OK();
534
1.15k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
597
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
597
    auto local_state = LocalStateType::create_unique(state, this);
531
597
    RETURN_IF_ERROR(local_state->init(state, info));
532
597
    state->emplace_local_state(operator_id(), std::move(local_state));
533
597
    return Status::OK();
534
597
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
683
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
683
    auto local_state = LocalStateType::create_unique(state, this);
531
683
    RETURN_IF_ERROR(local_state->init(state, info));
532
683
    state->emplace_local_state(operator_id(), std::move(local_state));
533
683
    return Status::OK();
534
683
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.85k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.85k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.85k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.85k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.85k
    return Status::OK();
534
5.85k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
14.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
14.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14.1k
    return Status::OK();
534
14.1k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
918k
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
931k
        : _num_rows_returned(0),
542
931k
          _rows_returned_counter(nullptr),
543
931k
          _parent(parent),
544
931k
          _state(state),
545
931k
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
938k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
938k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
938k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
938k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
938k
    _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
938k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
938k
    _operator_profile->add_child(_common_profile.get(), true);
557
938k
    _operator_profile->add_child(_custom_profile.get(), true);
558
938k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
938k
    if constexpr (!is_fake_shared) {
560
628k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
288k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
288k
                                    .first.get()
563
288k
                                    ->template cast<SharedStateArg>();
564
565
288k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
288k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
288k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
340k
        } else if (info.shared_state) {
569
298k
            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
298k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
298k
            _dependency = _shared_state->create_source_dependency(
576
298k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
298k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
298k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
298k
        } else {
580
41.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
3.90k
                DCHECK(false);
582
3.90k
            }
583
41.7k
        }
584
628k
    }
585
586
938k
    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
938k
    _rows_returned_counter =
591
938k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
938k
    _blocks_returned_counter =
593
938k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
938k
    _output_block_bytes_counter =
595
938k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
938k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
938k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
938k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
938k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
938k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
938k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
938k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
938k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
938k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
938k
    _memory_used_counter =
606
938k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
938k
    _common_profile->add_info_string("IsColocate",
608
938k
                                     std::to_string(_parent->is_colocated_operator()));
609
938k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
938k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
938k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
938k
    return Status::OK();
613
938k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
60.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
60.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
60.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
60.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
60.5k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
60.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
60.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
60.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
60.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
60.5k
    if constexpr (!is_fake_shared) {
560
60.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
13.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
13.9k
                                    .first.get()
563
13.9k
                                    ->template cast<SharedStateArg>();
564
565
13.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
13.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
13.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
46.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
46.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
46.2k
            _dependency = _shared_state->create_source_dependency(
576
46.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
46.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
46.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
46.2k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
436
        }
584
60.5k
    }
585
586
60.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
60.5k
    _rows_returned_counter =
591
60.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
60.5k
    _blocks_returned_counter =
593
60.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
60.5k
    _output_block_bytes_counter =
595
60.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
60.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
60.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
60.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
60.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
60.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
60.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
60.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
60.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
60.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
60.5k
    _memory_used_counter =
606
60.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
60.5k
    _common_profile->add_info_string("IsColocate",
608
60.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
60.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
60.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
60.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
60.5k
    return Status::OK();
613
60.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4
    _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
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4
    _operator_profile->add_child(_common_profile.get(), true);
557
4
    _operator_profile->add_child(_custom_profile.get(), true);
558
4
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4
    if constexpr (!is_fake_shared) {
560
4
        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
        } 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
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4
            _dependency = _shared_state->create_source_dependency(
576
4
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
4
    }
585
586
4
    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
    _rows_returned_counter =
591
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4
    _blocks_returned_counter =
593
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4
    _output_block_bytes_counter =
595
4
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4
    _memory_used_counter =
606
4
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4
    _common_profile->add_info_string("IsColocate",
608
4
                                     std::to_string(_parent->is_colocated_operator()));
609
4
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4
    return Status::OK();
613
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
165k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
165k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
165k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
165k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
165k
    _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
165k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
165k
    _operator_profile->add_child(_common_profile.get(), true);
557
165k
    _operator_profile->add_child(_custom_profile.get(), true);
558
165k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
165k
    if constexpr (!is_fake_shared) {
560
165k
        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
165k
        } 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
161k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
161k
            _dependency = _shared_state->create_source_dependency(
576
161k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
161k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
161k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
161k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
3.89k
        }
584
165k
    }
585
586
165k
    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
165k
    _rows_returned_counter =
591
165k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
165k
    _blocks_returned_counter =
593
165k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
165k
    _output_block_bytes_counter =
595
165k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
165k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
165k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
165k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
165k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
165k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
165k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
165k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
165k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
165k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
165k
    _memory_used_counter =
606
165k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
165k
    _common_profile->add_info_string("IsColocate",
608
165k
                                     std::to_string(_parent->is_colocated_operator()));
609
165k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
165k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
165k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
165k
    return Status::OK();
613
165k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
155
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
155
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
155
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
155
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
155
    _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
155
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
155
    _operator_profile->add_child(_common_profile.get(), true);
557
155
    _operator_profile->add_child(_custom_profile.get(), true);
558
155
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
155
    if constexpr (!is_fake_shared) {
560
155
        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
155
        } 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
155
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
155
            _dependency = _shared_state->create_source_dependency(
576
155
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
155
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
155
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
155
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
155
    }
585
586
155
    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
155
    _rows_returned_counter =
591
155
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
155
    _blocks_returned_counter =
593
155
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
155
    _output_block_bytes_counter =
595
155
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
155
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
155
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
155
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
155
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
155
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
155
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
155
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
155
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
155
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
155
    _memory_used_counter =
606
155
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
155
    _common_profile->add_info_string("IsColocate",
608
155
                                     std::to_string(_parent->is_colocated_operator()));
609
155
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
155
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
155
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
155
    return Status::OK();
613
155
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.24k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.24k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.24k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.24k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.24k
    _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.24k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.24k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.24k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.24k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.24k
    if constexpr (!is_fake_shared) {
560
4.24k
        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.24k
        } 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.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.19k
            _dependency = _shared_state->create_source_dependency(
576
4.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.19k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
50
        }
584
4.24k
    }
585
586
4.24k
    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.24k
    _rows_returned_counter =
591
4.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.24k
    _blocks_returned_counter =
593
4.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.24k
    _output_block_bytes_counter =
595
4.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.24k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.24k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.24k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.24k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.24k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.24k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.24k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.24k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.24k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.24k
    _memory_used_counter =
606
4.24k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.24k
    _common_profile->add_info_string("IsColocate",
608
4.24k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.24k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.24k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.24k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.24k
    return Status::OK();
613
4.24k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.97k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.97k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.97k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.97k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.97k
    _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.97k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.97k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.97k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.97k
    if constexpr (!is_fake_shared) {
560
5.97k
        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.97k
        } 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.95k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.95k
            _dependency = _shared_state->create_source_dependency(
576
5.95k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.95k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.95k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.95k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18
        }
584
5.97k
    }
585
586
5.97k
    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.97k
    _rows_returned_counter =
591
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.97k
    _blocks_returned_counter =
593
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.97k
    _output_block_bytes_counter =
595
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.97k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.97k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.97k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.97k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.97k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.97k
    _memory_used_counter =
606
5.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.97k
    _common_profile->add_info_string("IsColocate",
608
5.97k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.97k
    return Status::OK();
613
5.97k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
74.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
74.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
74.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
74.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
74.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
74.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
74.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
74.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
74.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
74.1k
    if constexpr (!is_fake_shared) {
560
74.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
74.1k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
72.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
72.9k
            _dependency = _shared_state->create_source_dependency(
576
72.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
72.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
72.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
72.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.29k
        }
584
74.1k
    }
585
586
74.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
74.1k
    _rows_returned_counter =
591
74.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
74.1k
    _blocks_returned_counter =
593
74.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
74.1k
    _output_block_bytes_counter =
595
74.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
74.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
74.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
74.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
74.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
74.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
74.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
74.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
74.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
74.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
74.1k
    _memory_used_counter =
606
74.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
74.1k
    _common_profile->add_info_string("IsColocate",
608
74.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
74.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
74.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
74.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
74.1k
    return Status::OK();
613
74.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.12k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.12k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.12k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.12k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.12k
    _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.12k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.12k
    _operator_profile->add_child(_common_profile.get(), true);
557
1.12k
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.12k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.12k
    if constexpr (!is_fake_shared) {
560
1.12k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
1.10k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
1.10k
                                    .first.get()
563
1.10k
                                    ->template cast<SharedStateArg>();
564
565
1.10k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
1.10k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
1.10k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
1.10k
        } 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
19
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
19
        }
584
1.12k
    }
585
586
1.12k
    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.12k
    _rows_returned_counter =
591
1.12k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.12k
    _blocks_returned_counter =
593
1.12k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.12k
    _output_block_bytes_counter =
595
1.12k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.12k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.12k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.12k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.12k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.12k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.12k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.12k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.12k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.12k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.12k
    _memory_used_counter =
606
1.12k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.12k
    _common_profile->add_info_string("IsColocate",
608
1.12k
                                     std::to_string(_parent->is_colocated_operator()));
609
1.12k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.12k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.12k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.12k
    return Status::OK();
613
1.12k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
111
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
111
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
111
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
111
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
111
    _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
111
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
111
    _operator_profile->add_child(_common_profile.get(), true);
557
111
    _operator_profile->add_child(_custom_profile.get(), true);
558
111
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
111
    if constexpr (!is_fake_shared) {
560
111
        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
111
        } 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
111
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
111
            _dependency = _shared_state->create_source_dependency(
576
111
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
111
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
111
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
111
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
111
    }
585
586
111
    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
111
    _rows_returned_counter =
591
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
111
    _blocks_returned_counter =
593
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
111
    _output_block_bytes_counter =
595
111
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
111
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
111
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
111
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
111
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
111
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
111
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
111
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
111
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
111
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
111
    _memory_used_counter =
606
111
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
111
    _common_profile->add_info_string("IsColocate",
608
111
                                     std::to_string(_parent->is_colocated_operator()));
609
111
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
111
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
111
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
111
    return Status::OK();
613
111
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
309k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
309k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
309k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
309k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
309k
    _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
309k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
309k
    _operator_profile->add_child(_common_profile.get(), true);
557
309k
    _operator_profile->add_child(_custom_profile.get(), true);
558
309k
    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
309k
    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
309k
    _rows_returned_counter =
591
309k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
309k
    _blocks_returned_counter =
593
309k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
309k
    _output_block_bytes_counter =
595
309k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
309k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
309k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
309k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
309k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
309k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
309k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
309k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
309k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
309k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
309k
    _memory_used_counter =
606
309k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
309k
    _common_profile->add_info_string("IsColocate",
608
309k
                                     std::to_string(_parent->is_colocated_operator()));
609
309k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
309k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
309k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
309k
    return Status::OK();
613
309k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
35.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
35.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
35.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
35.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
35.2k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
35.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
35.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
35.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
35.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
35.2k
    if constexpr (!is_fake_shared) {
560
35.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
35.2k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
3.24k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.24k
            _dependency = _shared_state->create_source_dependency(
576
3.24k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.24k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.24k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
32.0k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
32.0k
        }
584
35.2k
    }
585
586
35.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
35.2k
    _rows_returned_counter =
591
35.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
35.2k
    _blocks_returned_counter =
593
35.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
35.2k
    _output_block_bytes_counter =
595
35.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
35.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
35.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
35.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
35.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
35.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
35.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
35.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
35.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
35.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
35.2k
    _memory_used_counter =
606
35.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
35.2k
    _common_profile->add_info_string("IsColocate",
608
35.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
35.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
35.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
35.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
35.2k
    return Status::OK();
613
35.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
12
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
12
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
12
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
12
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
12
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
12
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
12
    _operator_profile->add_child(_common_profile.get(), true);
557
12
    _operator_profile->add_child(_custom_profile.get(), true);
558
12
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
12
    if constexpr (!is_fake_shared) {
560
12
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
12
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
12
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
12
            _dependency = _shared_state->create_source_dependency(
576
12
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
12
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
12
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
12
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
12
    }
585
586
12
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
12
    _rows_returned_counter =
591
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
12
    _blocks_returned_counter =
593
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
12
    _output_block_bytes_counter =
595
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
12
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
12
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
12
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
12
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
12
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
12
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
12
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
12
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
12
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
12
    _memory_used_counter =
606
12
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
12
    _common_profile->add_info_string("IsColocate",
608
12
                                     std::to_string(_parent->is_colocated_operator()));
609
12
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
12
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
12
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
12
    return Status::OK();
613
12
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
3.44k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
3.44k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
3.44k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
3.44k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
3.44k
    _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
3.44k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
3.44k
    _operator_profile->add_child(_common_profile.get(), true);
557
3.44k
    _operator_profile->add_child(_custom_profile.get(), true);
558
3.44k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
3.44k
    if constexpr (!is_fake_shared) {
560
3.44k
        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
3.44k
        } 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.41k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.41k
            _dependency = _shared_state->create_source_dependency(
576
3.41k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.41k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.41k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
3.41k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
36
        }
584
3.44k
    }
585
586
3.44k
    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
3.44k
    _rows_returned_counter =
591
3.44k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
3.44k
    _blocks_returned_counter =
593
3.44k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
3.44k
    _output_block_bytes_counter =
595
3.44k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
3.44k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
3.44k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
3.44k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
3.44k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
3.44k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
3.44k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
3.44k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
3.44k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
3.44k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
3.44k
    _memory_used_counter =
606
3.44k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
3.44k
    _common_profile->add_info_string("IsColocate",
608
3.44k
                                     std::to_string(_parent->is_colocated_operator()));
609
3.44k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
3.44k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
3.44k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
3.44k
    return Status::OK();
613
3.44k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
306
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
306
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
306
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
306
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
306
    _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
306
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
306
    _operator_profile->add_child(_common_profile.get(), true);
557
306
    _operator_profile->add_child(_custom_profile.get(), true);
558
306
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
306
    if constexpr (!is_fake_shared) {
560
306
        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
306
        } 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
306
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
306
            _dependency = _shared_state->create_source_dependency(
576
306
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
306
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
306
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
306
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
306
    }
585
586
306
    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
306
    _rows_returned_counter =
591
306
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
306
    _blocks_returned_counter =
593
306
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
306
    _output_block_bytes_counter =
595
306
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
306
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
306
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
306
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
306
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
306
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
306
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
306
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
306
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
306
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
306
    _memory_used_counter =
606
306
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
306
    _common_profile->add_info_string("IsColocate",
608
306
                                     std::to_string(_parent->is_colocated_operator()));
609
306
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
306
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
306
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
306
    return Status::OK();
613
306
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
654
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
654
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
654
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
654
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
654
    _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
654
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
654
    _operator_profile->add_child(_common_profile.get(), true);
557
654
    _operator_profile->add_child(_custom_profile.get(), true);
558
654
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
654
    if constexpr (!is_fake_shared) {
560
654
        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
654
        } 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
653
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
653
            _dependency = _shared_state->create_source_dependency(
576
653
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
653
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
653
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
653
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1
        }
584
654
    }
585
586
654
    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
654
    _rows_returned_counter =
591
654
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
654
    _blocks_returned_counter =
593
654
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
654
    _output_block_bytes_counter =
595
654
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
654
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
654
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
654
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
654
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
654
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
654
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
654
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
654
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
654
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
654
    _memory_used_counter =
606
654
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
654
    _common_profile->add_info_string("IsColocate",
608
654
                                     std::to_string(_parent->is_colocated_operator()));
609
654
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
654
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
654
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
654
    return Status::OK();
613
654
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
277k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
277k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
277k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
277k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
277k
    _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
277k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
277k
    _operator_profile->add_child(_common_profile.get(), true);
557
277k
    _operator_profile->add_child(_custom_profile.get(), true);
558
277k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
277k
    if constexpr (!is_fake_shared) {
560
277k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
273k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
273k
                                    .first.get()
563
273k
                                    ->template cast<SharedStateArg>();
564
565
273k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
273k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
273k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
273k
        } 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
3.90k
        } else {
580
3.90k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
3.90k
                DCHECK(false);
582
3.90k
            }
583
3.90k
        }
584
277k
    }
585
586
277k
    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
277k
    _rows_returned_counter =
591
277k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
277k
    _blocks_returned_counter =
593
277k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
277k
    _output_block_bytes_counter =
595
277k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
277k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
277k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
277k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
277k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
277k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
277k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
277k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
277k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
277k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
277k
    _memory_used_counter =
606
277k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
277k
    _common_profile->add_info_string("IsColocate",
608
277k
                                     std::to_string(_parent->is_colocated_operator()));
609
277k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
277k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
277k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
277k
    return Status::OK();
613
277k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
88
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
88
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
88
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
88
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
88
    _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
88
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
88
    _operator_profile->add_child(_common_profile.get(), true);
557
88
    _operator_profile->add_child(_custom_profile.get(), true);
558
88
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
88
    if constexpr (!is_fake_shared) {
560
88
        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
88
        } 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
88
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
88
            _dependency = _shared_state->create_source_dependency(
576
88
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
88
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
88
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
88
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
88
    }
585
586
88
    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
88
    _rows_returned_counter =
591
88
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
88
    _blocks_returned_counter =
593
88
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
88
    _output_block_bytes_counter =
595
88
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
88
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
88
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
88
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
88
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
88
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
88
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
88
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
88
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
88
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
88
    _memory_used_counter =
606
88
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
88
    _common_profile->add_info_string("IsColocate",
608
88
                                     std::to_string(_parent->is_colocated_operator()));
609
88
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
88
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
88
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
88
    return Status::OK();
613
88
}
614
615
template <typename SharedStateArg>
616
941k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
941k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.19M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
257k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
257k
    }
621
941k
    if (_parent->has_projection()) {
622
283k
        const auto& projection = *_parent->_projection;
623
283k
        _projections.resize(projection.projections.size());
624
1.94M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.65M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.65M
        }
627
283k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
298k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
15.6k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
337k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
322k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
322k
                        state, _intermediate_projections[i][j]));
633
322k
            }
634
15.6k
        }
635
283k
    }
636
941k
    return Status::OK();
637
941k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
60.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
60.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
61.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.32k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.32k
    }
621
60.6k
    if (_parent->has_projection()) {
622
60.6k
        const auto& projection = *_parent->_projection;
623
60.6k
        _projections.resize(projection.projections.size());
624
296k
        for (size_t i = 0; i < _projections.size(); i++) {
625
235k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
235k
        }
627
60.6k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
70.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.91k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
303k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
293k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
293k
                        state, _intermediate_projections[i][j]));
633
293k
            }
634
9.91k
        }
635
60.6k
    }
636
60.6k
    return Status::OK();
637
60.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6
    _conjuncts.resize(_parent->_conjuncts.size());
618
6
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
6
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
9
        for (size_t i = 0; i < _projections.size(); i++) {
625
6
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
6
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        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
3
    }
636
6
    return Status::OK();
637
6
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
166k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
166k
    _conjuncts.resize(_parent->_conjuncts.size());
618
166k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
166k
    if (_parent->has_projection()) {
622
121
        const auto& projection = *_parent->_projection;
623
121
        _projections.resize(projection.projections.size());
624
594
        for (size_t i = 0; i < _projections.size(); i++) {
625
473
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
473
        }
627
121
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
121
        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
121
    }
636
166k
    return Status::OK();
637
166k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
152
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
152
    _conjuncts.resize(_parent->_conjuncts.size());
618
152
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
152
    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
152
    return Status::OK();
637
152
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.24k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.24k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.31k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
70
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
70
    }
621
4.24k
    if (_parent->has_projection()) {
622
4.23k
        const auto& projection = *_parent->_projection;
623
4.23k
        _projections.resize(projection.projections.size());
624
16.8k
        for (size_t i = 0; i < _projections.size(); i++) {
625
12.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
12.6k
        }
627
4.23k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.25k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
18
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
145
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
127
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
127
                        state, _intermediate_projections[i][j]));
633
127
            }
634
18
        }
635
4.23k
    }
636
4.24k
    return Status::OK();
637
4.24k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.97k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.97k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.53k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
562
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
562
    }
621
5.97k
    if (_parent->has_projection()) {
622
3.22k
        const auto& projection = *_parent->_projection;
623
3.22k
        _projections.resize(projection.projections.size());
624
13.4k
        for (size_t i = 0; i < _projections.size(); i++) {
625
10.2k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
10.2k
        }
627
3.22k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3.31k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
83
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
613
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
530
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
530
                        state, _intermediate_projections[i][j]));
633
530
            }
634
83
        }
635
3.22k
    }
636
5.97k
    return Status::OK();
637
5.97k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
74.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
74.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
75.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
844
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
844
    }
621
74.3k
    if (_parent->has_projection()) {
622
28.5k
        const auto& projection = *_parent->_projection;
623
28.5k
        _projections.resize(projection.projections.size());
624
271k
        for (size_t i = 0; i < _projections.size(); i++) {
625
243k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
243k
        }
627
28.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
28.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
64
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
346
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
282
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
282
                        state, _intermediate_projections[i][j]));
633
282
            }
634
64
        }
635
28.5k
    }
636
74.3k
    return Status::OK();
637
74.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
1.12k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.12k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.13k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
14
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
14
    }
621
1.12k
    if (_parent->has_projection()) {
622
358
        const auto& projection = *_parent->_projection;
623
358
        _projections.resize(projection.projections.size());
624
1.64k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.28k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.28k
        }
627
358
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
359
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
1
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3
                        state, _intermediate_projections[i][j]));
633
3
            }
634
1
        }
635
358
    }
636
1.12k
    return Status::OK();
637
1.12k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
114
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
114
    _conjuncts.resize(_parent->_conjuncts.size());
618
114
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
114
    if (_parent->has_projection()) {
622
3
        const auto& projection = *_parent->_projection;
623
3
        _projections.resize(projection.projections.size());
624
11
        for (size_t i = 0; i < _projections.size(); i++) {
625
8
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
8
        }
627
3
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
3
        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
3
    }
636
114
    return Status::OK();
637
114
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
310k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
310k
    _conjuncts.resize(_parent->_conjuncts.size());
618
564k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
254k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
254k
    }
621
310k
    if (_parent->has_projection()) {
622
175k
        const auto& projection = *_parent->_projection;
623
175k
        _projections.resize(projection.projections.size());
624
1.23M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.05M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.05M
        }
627
175k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
181k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
5.54k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
32.3k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
26.8k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
26.8k
                        state, _intermediate_projections[i][j]));
633
26.8k
            }
634
5.54k
        }
635
175k
    }
636
310k
    return Status::OK();
637
310k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
35.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
35.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
35.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
35.3k
    if (_parent->has_projection()) {
622
10.4k
        const auto& projection = *_parent->_projection;
623
10.4k
        _projections.resize(projection.projections.size());
624
107k
        for (size_t i = 0; i < _projections.size(); i++) {
625
97.4k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
97.4k
        }
627
10.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
10.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
69
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.34k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.27k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.27k
                        state, _intermediate_projections[i][j]));
633
1.27k
            }
634
69
        }
635
10.4k
    }
636
35.3k
    return Status::OK();
637
35.3k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
11
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
11
    _conjuncts.resize(_parent->_conjuncts.size());
618
11
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
11
    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
11
    return Status::OK();
637
11
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3.44k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3.44k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.24k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
801
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
801
    }
621
3.44k
    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.44k
    return Status::OK();
637
3.44k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
306
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
306
    _conjuncts.resize(_parent->_conjuncts.size());
618
306
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
306
    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
306
    return Status::OK();
637
306
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
654
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
654
    _conjuncts.resize(_parent->_conjuncts.size());
618
654
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
654
    if (_parent->has_projection()) {
622
95
        const auto& projection = *_parent->_projection;
623
95
        _projections.resize(projection.projections.size());
624
298
        for (size_t i = 0; i < _projections.size(); i++) {
625
203
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
203
        }
627
95
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
95
        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
95
    }
636
654
    return Status::OK();
637
654
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
278k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
278k
    _conjuncts.resize(_parent->_conjuncts.size());
618
278k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
278k
    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
278k
    return Status::OK();
637
278k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
88
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
88
    _conjuncts.resize(_parent->_conjuncts.size());
618
89
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1
    }
621
88
    if (_parent->has_projection()) {
622
87
        const auto& projection = *_parent->_projection;
623
87
        _projections.resize(projection.projections.size());
624
228
        for (size_t i = 0; i < _projections.size(); i++) {
625
141
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
141
        }
627
87
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
87
        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
87
    }
636
88
    return Status::OK();
637
88
}
638
639
template <typename SharedStateArg>
640
5.49k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5.49k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5.49k
    _terminated = true;
645
5.49k
    return Status::OK();
646
5.49k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
432
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
432
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
432
    _terminated = true;
645
432
    return Status::OK();
646
432
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
16
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
16
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
16
    _terminated = true;
645
16
    return Status::OK();
646
16
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
89
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
89
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
89
    _terminated = true;
645
89
    return Status::OK();
646
89
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
21
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
21
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
21
    _terminated = true;
645
21
    return Status::OK();
646
21
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4.26k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4.26k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4.26k
    _terminated = true;
645
4.26k
    return Status::OK();
646
4.26k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
38
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
38
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
38
    _terminated = true;
645
38
    return Status::OK();
646
38
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
618
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
618
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
618
    _terminated = true;
645
618
    return Status::OK();
646
618
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
16
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
16
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
16
    _terminated = true;
645
16
    return Status::OK();
646
16
}
647
648
template <typename SharedStateArg>
649
1.11M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.11M
    if (_closed) {
651
175k
        return Status::OK();
652
175k
    }
653
939k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
628k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
628k
    }
656
939k
    _closed = true;
657
939k
    return Status::OK();
658
1.11M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
60.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
60.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
60.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
60.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
60.5k
    }
656
60.5k
    _closed = true;
657
60.5k
    return Status::OK();
658
60.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
7
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
7
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
7
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7
    }
656
7
    _closed = true;
657
7
    return Status::OK();
658
7
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
328k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
328k
    if (_closed) {
651
164k
        return Status::OK();
652
164k
    }
653
163k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
163k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
163k
    }
656
163k
    _closed = true;
657
163k
    return Status::OK();
658
328k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
155
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
155
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
155
    }
656
155
    _closed = true;
657
155
    return Status::OK();
658
155
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.24k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.24k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.24k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.24k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.24k
    }
656
4.24k
    _closed = true;
657
4.24k
    return Status::OK();
658
4.24k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.91k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.91k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.91k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.91k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.91k
    }
656
5.91k
    _closed = true;
657
5.91k
    return Status::OK();
658
5.91k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
74.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
74.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
74.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
74.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
74.1k
    }
656
74.1k
    _closed = true;
657
74.1k
    return Status::OK();
658
74.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.11k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.11k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
1.11k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.11k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.11k
    }
656
1.11k
    _closed = true;
657
1.11k
    return Status::OK();
658
1.11k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
110
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
110
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
110
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
110
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
110
    }
656
110
    _closed = true;
657
110
    return Status::OK();
658
110
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
320k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
320k
    if (_closed) {
651
9.65k
        return Status::OK();
652
9.65k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
311k
    _closed = true;
657
311k
    return Status::OK();
658
320k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
35.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
35.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
35.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
35.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
35.3k
    }
656
35.3k
    _closed = true;
657
35.3k
    return Status::OK();
658
35.3k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
3.45k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
3.45k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
3.45k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
3.45k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
3.45k
    }
656
3.45k
    _closed = true;
657
3.45k
    return Status::OK();
658
3.45k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
405
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
405
    if (_closed) {
651
203
        return Status::OK();
652
203
    }
653
202
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
202
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
202
    }
656
202
    _closed = true;
657
202
    return Status::OK();
658
405
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.52k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.52k
    if (_closed) {
651
879
        return Status::OK();
652
879
    }
653
641
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
641
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
641
    }
656
641
    _closed = true;
657
641
    return Status::OK();
658
1.52k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
279k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
279k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
279k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
279k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
279k
    }
656
279k
    _closed = true;
657
279k
    return Status::OK();
658
279k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
154
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
154
    if (_closed) {
651
72
        return Status::OK();
652
72
    }
653
82
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
82
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
82
    }
656
82
    _closed = true;
657
82
    return Status::OK();
658
154
}
659
660
template <typename SharedState>
661
921k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
921k
    _operator_profile =
664
921k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
921k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
921k
    _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
921k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
921k
    _operator_profile->add_child(_common_profile, true);
673
921k
    _operator_profile->add_child(_custom_profile, true);
674
675
921k
    _operator_profile->set_metadata(_parent->node_id());
676
921k
    _wait_for_finish_dependency_timer =
677
921k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
921k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
921k
    if constexpr (!is_fake_shared) {
680
646k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
646k
            info.shared_state_map.end()) {
682
116k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
101k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
101k
            }
685
116k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
116k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
116k
                                                  ? 0
688
116k
                                                  : info.task_idx]
689
116k
                                  .get();
690
116k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
530k
        } else {
692
530k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
51
                DCHECK(false);
694
51
            }
695
530k
            _shared_state = info.shared_state->template cast<SharedState>();
696
530k
            _dependency = _shared_state->create_sink_dependency(
697
530k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
530k
        }
699
646k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
646k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
646k
    }
702
703
921k
    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
921k
    _rows_input_counter =
708
921k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
921k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
921k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
921k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
921k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
921k
    _memory_used_counter =
714
921k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
921k
    _common_profile->add_info_string("IsColocate",
716
921k
                                     std::to_string(_parent->is_colocated_operator()));
717
921k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
921k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
921k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
921k
    return Status::OK();
721
921k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
108k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
108k
    _operator_profile =
664
108k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
108k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
108k
    _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
108k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
108k
    _operator_profile->add_child(_common_profile, true);
673
108k
    _operator_profile->add_child(_custom_profile, true);
674
675
108k
    _operator_profile->set_metadata(_parent->node_id());
676
108k
    _wait_for_finish_dependency_timer =
677
108k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
108k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
108k
    if constexpr (!is_fake_shared) {
680
108k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
108k
            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
14.0k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
14.0k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
14.0k
                                                  ? 0
688
14.0k
                                                  : info.task_idx]
689
14.0k
                                  .get();
690
14.0k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
94.5k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
94.5k
            _shared_state = info.shared_state->template cast<SharedState>();
696
94.5k
            _dependency = _shared_state->create_sink_dependency(
697
94.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
94.5k
        }
699
108k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
108k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
108k
    }
702
703
108k
    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
108k
    _rows_input_counter =
708
108k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
108k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
108k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
108k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
108k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
108k
    _memory_used_counter =
714
108k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
108k
    _common_profile->add_info_string("IsColocate",
716
108k
                                     std::to_string(_parent->is_colocated_operator()));
717
108k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
108k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
108k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
108k
    return Status::OK();
721
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5
    _operator_profile =
664
5
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5
    _operator_profile->add_child(_common_profile, true);
673
5
    _operator_profile->add_child(_custom_profile, true);
674
675
5
    _operator_profile->set_metadata(_parent->node_id());
676
5
    _wait_for_finish_dependency_timer =
677
5
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5
    if constexpr (!is_fake_shared) {
680
5
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5
            _shared_state = info.shared_state->template cast<SharedState>();
696
5
            _dependency = _shared_state->create_sink_dependency(
697
5
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5
        }
699
5
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5
    }
702
703
5
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5
    _rows_input_counter =
708
5
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5
    _memory_used_counter =
714
5
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5
    _common_profile->add_info_string("IsColocate",
716
5
                                     std::to_string(_parent->is_colocated_operator()));
717
5
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5
    return Status::OK();
721
5
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
165k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
165k
    _operator_profile =
664
165k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
165k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
165k
    _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
165k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
165k
    _operator_profile->add_child(_common_profile, true);
673
165k
    _operator_profile->add_child(_custom_profile, true);
674
675
165k
    _operator_profile->set_metadata(_parent->node_id());
676
165k
    _wait_for_finish_dependency_timer =
677
165k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
165k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
165k
    if constexpr (!is_fake_shared) {
680
165k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
165k
            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
165k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
165k
            _shared_state = info.shared_state->template cast<SharedState>();
696
165k
            _dependency = _shared_state->create_sink_dependency(
697
165k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
165k
        }
699
165k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
165k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
165k
    }
702
703
165k
    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
165k
    _rows_input_counter =
708
165k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
165k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
165k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
165k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
165k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
165k
    _memory_used_counter =
714
165k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
165k
    _common_profile->add_info_string("IsColocate",
716
165k
                                     std::to_string(_parent->is_colocated_operator()));
717
165k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
165k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
165k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
165k
    return Status::OK();
721
165k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
162
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
162
    _operator_profile =
664
162
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
162
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
162
    _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
162
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
162
    _operator_profile->add_child(_common_profile, true);
673
162
    _operator_profile->add_child(_custom_profile, true);
674
675
162
    _operator_profile->set_metadata(_parent->node_id());
676
162
    _wait_for_finish_dependency_timer =
677
162
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
162
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
162
    if constexpr (!is_fake_shared) {
680
162
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
162
            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
162
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
162
            _shared_state = info.shared_state->template cast<SharedState>();
696
162
            _dependency = _shared_state->create_sink_dependency(
697
162
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
162
        }
699
162
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
162
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
162
    }
702
703
162
    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
162
    _rows_input_counter =
708
162
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
162
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
162
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
162
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
162
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
162
    _memory_used_counter =
714
162
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
162
    _common_profile->add_info_string("IsColocate",
716
162
                                     std::to_string(_parent->is_colocated_operator()));
717
162
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
162
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
162
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
162
    return Status::OK();
721
162
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
4.22k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
4.22k
    _operator_profile =
664
4.22k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
4.22k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
4.22k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
4.22k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
4.22k
    _operator_profile->add_child(_common_profile, true);
673
4.22k
    _operator_profile->add_child(_custom_profile, true);
674
675
4.22k
    _operator_profile->set_metadata(_parent->node_id());
676
4.22k
    _wait_for_finish_dependency_timer =
677
4.22k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
4.22k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
4.22k
    if constexpr (!is_fake_shared) {
680
4.22k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
4.22k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
4.22k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
4.22k
            _shared_state = info.shared_state->template cast<SharedState>();
696
4.22k
            _dependency = _shared_state->create_sink_dependency(
697
4.22k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
4.22k
        }
699
4.22k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
4.22k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
4.22k
    }
702
703
4.22k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
4.22k
    _rows_input_counter =
708
4.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
4.22k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
4.22k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
4.22k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
4.22k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
4.22k
    _memory_used_counter =
714
4.22k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
4.22k
    _common_profile->add_info_string("IsColocate",
716
4.22k
                                     std::to_string(_parent->is_colocated_operator()));
717
4.22k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
4.22k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
4.22k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
4.22k
    return Status::OK();
721
4.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.97k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.97k
    _operator_profile =
664
5.97k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.97k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.97k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5.97k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.97k
    _operator_profile->add_child(_common_profile, true);
673
5.97k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.97k
    _operator_profile->set_metadata(_parent->node_id());
676
5.97k
    _wait_for_finish_dependency_timer =
677
5.97k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.97k
    if constexpr (!is_fake_shared) {
680
5.97k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.97k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5.97k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.97k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.97k
            _dependency = _shared_state->create_sink_dependency(
697
5.97k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.97k
        }
699
5.97k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.97k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.97k
    }
702
703
5.97k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5.97k
    _rows_input_counter =
708
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.97k
    _memory_used_counter =
714
5.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.97k
    _common_profile->add_info_string("IsColocate",
716
5.97k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.97k
    return Status::OK();
721
5.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
74.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
74.2k
    _operator_profile =
664
74.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
74.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
74.2k
    _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
74.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
74.2k
    _operator_profile->add_child(_common_profile, true);
673
74.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
74.2k
    _operator_profile->set_metadata(_parent->node_id());
676
74.2k
    _wait_for_finish_dependency_timer =
677
74.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
74.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
74.2k
    if constexpr (!is_fake_shared) {
680
74.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
74.2k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
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
74.2k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
74.2k
            _shared_state = info.shared_state->template cast<SharedState>();
696
74.2k
            _dependency = _shared_state->create_sink_dependency(
697
74.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
74.2k
        }
699
74.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
74.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
74.2k
    }
702
703
74.2k
    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
74.2k
    _rows_input_counter =
708
74.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
74.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
74.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
74.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
74.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
74.2k
    _memory_used_counter =
714
74.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
74.2k
    _common_profile->add_info_string("IsColocate",
716
74.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
74.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
74.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
74.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
74.2k
    return Status::OK();
721
74.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.12k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.12k
    _operator_profile =
664
1.12k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.12k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.12k
    _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.12k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.12k
    _operator_profile->add_child(_common_profile, true);
673
1.12k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.12k
    _operator_profile->set_metadata(_parent->node_id());
676
1.12k
    _wait_for_finish_dependency_timer =
677
1.12k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.12k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.12k
    if constexpr (!is_fake_shared) {
680
1.12k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.12k
            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
1.12k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
1.12k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
1.12k
                                                  ? 0
688
1.12k
                                                  : info.task_idx]
689
1.12k
                                  .get();
690
1.12k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.12k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
3
            _shared_state = info.shared_state->template cast<SharedState>();
696
3
            _dependency = _shared_state->create_sink_dependency(
697
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
3
        }
699
1.12k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.12k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.12k
    }
702
703
1.12k
    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.12k
    _rows_input_counter =
708
1.12k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.12k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.12k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.12k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.12k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.12k
    _memory_used_counter =
714
1.12k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.12k
    _common_profile->add_info_string("IsColocate",
716
1.12k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.12k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.12k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.12k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.12k
    return Status::OK();
721
1.12k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
121
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
121
    _operator_profile =
664
121
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
121
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
121
    _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
121
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
121
    _operator_profile->add_child(_common_profile, true);
673
121
    _operator_profile->add_child(_custom_profile, true);
674
675
121
    _operator_profile->set_metadata(_parent->node_id());
676
121
    _wait_for_finish_dependency_timer =
677
121
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
121
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
121
    if constexpr (!is_fake_shared) {
680
121
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
121
            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
121
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
121
            _shared_state = info.shared_state->template cast<SharedState>();
696
121
            _dependency = _shared_state->create_sink_dependency(
697
121
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
121
        }
699
121
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
121
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
121
    }
702
703
121
    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
121
    _rows_input_counter =
708
121
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
121
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
121
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
121
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
121
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
121
    _memory_used_counter =
714
121
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
121
    _common_profile->add_info_string("IsColocate",
716
121
                                     std::to_string(_parent->is_colocated_operator()));
717
121
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
121
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
121
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
121
    return Status::OK();
721
121
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
274k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
274k
    _operator_profile =
664
274k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
274k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
274k
    _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
274k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
274k
    _operator_profile->add_child(_common_profile, true);
673
274k
    _operator_profile->add_child(_custom_profile, true);
674
675
274k
    _operator_profile->set_metadata(_parent->node_id());
676
274k
    _wait_for_finish_dependency_timer =
677
274k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
274k
    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
274k
    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
274k
    _rows_input_counter =
708
274k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
274k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
274k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
274k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
274k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
274k
    _memory_used_counter =
714
274k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
274k
    _common_profile->add_info_string("IsColocate",
716
274k
                                     std::to_string(_parent->is_colocated_operator()));
717
274k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
274k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
274k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
274k
    return Status::OK();
721
274k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
7.53k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
7.53k
    _operator_profile =
664
7.53k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
7.53k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
7.53k
    _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
7.53k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
7.53k
    _operator_profile->add_child(_common_profile, true);
673
7.53k
    _operator_profile->add_child(_custom_profile, true);
674
675
7.53k
    _operator_profile->set_metadata(_parent->node_id());
676
7.53k
    _wait_for_finish_dependency_timer =
677
7.53k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
7.53k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
7.53k
    if constexpr (!is_fake_shared) {
680
7.53k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
7.53k
            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
7.53k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
7.53k
            _shared_state = info.shared_state->template cast<SharedState>();
696
7.53k
            _dependency = _shared_state->create_sink_dependency(
697
7.53k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
7.53k
        }
699
7.53k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
7.53k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
7.53k
    }
702
703
7.53k
    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
7.53k
    _rows_input_counter =
708
7.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
7.53k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
7.53k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
7.53k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
7.53k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
7.53k
    _memory_used_counter =
714
7.53k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
7.53k
    _common_profile->add_info_string("IsColocate",
716
7.53k
                                     std::to_string(_parent->is_colocated_operator()));
717
7.53k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
7.53k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
7.53k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
7.53k
    return Status::OK();
721
7.53k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
306
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
306
    _operator_profile =
664
306
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
306
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
306
    _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
306
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
306
    _operator_profile->add_child(_common_profile, true);
673
306
    _operator_profile->add_child(_custom_profile, true);
674
675
306
    _operator_profile->set_metadata(_parent->node_id());
676
306
    _wait_for_finish_dependency_timer =
677
306
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
306
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
306
    if constexpr (!is_fake_shared) {
680
306
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
306
            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
306
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
306
            _shared_state = info.shared_state->template cast<SharedState>();
696
306
            _dependency = _shared_state->create_sink_dependency(
697
306
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
306
        }
699
306
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
306
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
306
    }
702
703
306
    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
306
    _rows_input_counter =
708
306
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
306
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
306
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
306
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
306
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
306
    _memory_used_counter =
714
306
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
306
    _common_profile->add_info_string("IsColocate",
716
306
                                     std::to_string(_parent->is_colocated_operator()));
717
306
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
306
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
306
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
306
    return Status::OK();
721
306
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.38k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.38k
    _operator_profile =
664
1.38k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.38k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.38k
    _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.38k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.38k
    _operator_profile->add_child(_common_profile, true);
673
1.38k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.38k
    _operator_profile->set_metadata(_parent->node_id());
676
1.38k
    _wait_for_finish_dependency_timer =
677
1.38k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.38k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.38k
    if constexpr (!is_fake_shared) {
680
1.38k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.38k
            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.38k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.38k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.38k
            _dependency = _shared_state->create_sink_dependency(
697
1.38k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.38k
        }
699
1.38k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.38k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.38k
    }
702
703
1.38k
    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.38k
    _rows_input_counter =
708
1.38k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.38k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.38k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.38k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.38k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.38k
    _memory_used_counter =
714
1.38k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.38k
    _common_profile->add_info_string("IsColocate",
716
1.38k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.38k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.38k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.38k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.38k
    return Status::OK();
721
1.38k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.40k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.40k
    _operator_profile =
664
1.40k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.40k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.40k
    _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.40k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.40k
    _operator_profile->add_child(_common_profile, true);
673
1.40k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.40k
    _operator_profile->set_metadata(_parent->node_id());
676
1.40k
    _wait_for_finish_dependency_timer =
677
1.40k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.40k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.40k
    if constexpr (!is_fake_shared) {
680
1.40k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.40k
            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.40k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.40k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.40k
            _dependency = _shared_state->create_sink_dependency(
697
1.40k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.40k
        }
699
1.40k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.40k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.40k
    }
702
703
1.40k
    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.40k
    _rows_input_counter =
708
1.40k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.40k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.40k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.40k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.40k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.40k
    _memory_used_counter =
714
1.40k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.40k
    _common_profile->add_info_string("IsColocate",
716
1.40k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.40k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.40k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.40k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.40k
    return Status::OK();
721
1.40k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
101k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
101k
    _operator_profile =
664
101k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
101k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
101k
    _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
101k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
101k
    _operator_profile->add_child(_common_profile, true);
673
101k
    _operator_profile->add_child(_custom_profile, true);
674
675
101k
    _operator_profile->set_metadata(_parent->node_id());
676
101k
    _wait_for_finish_dependency_timer =
677
101k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
101k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
101k
    if constexpr (!is_fake_shared) {
680
101k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
101k
            info.shared_state_map.end()) {
682
101k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
101k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
101k
            }
685
101k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
101k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
101k
                                                  ? 0
688
101k
                                                  : info.task_idx]
689
101k
                                  .get();
690
101k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
101k
        } else {
692
51
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
51
                DCHECK(false);
694
51
            }
695
51
            _shared_state = info.shared_state->template cast<SharedState>();
696
51
            _dependency = _shared_state->create_sink_dependency(
697
51
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
51
        }
699
101k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
101k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
101k
    }
702
703
101k
    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
101k
    _rows_input_counter =
708
101k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
101k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
101k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
101k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
101k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
101k
    _memory_used_counter =
714
101k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
101k
    _common_profile->add_info_string("IsColocate",
716
101k
                                     std::to_string(_parent->is_colocated_operator()));
717
101k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
101k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
101k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
101k
    return Status::OK();
721
101k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
174k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
174k
    _operator_profile =
664
174k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
174k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
174k
    _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
174k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
174k
    _operator_profile->add_child(_common_profile, true);
673
174k
    _operator_profile->add_child(_custom_profile, true);
674
675
174k
    _operator_profile->set_metadata(_parent->node_id());
676
174k
    _wait_for_finish_dependency_timer =
677
174k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
174k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
174k
    if constexpr (!is_fake_shared) {
680
174k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
174k
            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
174k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
174k
            _shared_state = info.shared_state->template cast<SharedState>();
696
174k
            _dependency = _shared_state->create_sink_dependency(
697
174k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
174k
        }
699
174k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
174k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
174k
    }
702
703
174k
    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
174k
    _rows_input_counter =
708
174k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
174k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
174k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
174k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
174k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
174k
    _memory_used_counter =
714
174k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
174k
    _common_profile->add_info_string("IsColocate",
716
174k
                                     std::to_string(_parent->is_colocated_operator()));
717
174k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
174k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
174k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
174k
    return Status::OK();
721
174k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11
    _operator_profile =
664
11
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
11
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11
    _operator_profile->add_child(_common_profile, true);
673
11
    _operator_profile->add_child(_custom_profile, true);
674
675
11
    _operator_profile->set_metadata(_parent->node_id());
676
11
    _wait_for_finish_dependency_timer =
677
11
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11
    if constexpr (!is_fake_shared) {
680
11
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
11
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11
            _shared_state = info.shared_state->template cast<SharedState>();
696
11
            _dependency = _shared_state->create_sink_dependency(
697
11
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11
        }
699
11
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11
    }
702
703
11
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
11
    _rows_input_counter =
708
11
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11
    _memory_used_counter =
714
11
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11
    _common_profile->add_info_string("IsColocate",
716
11
                                     std::to_string(_parent->is_colocated_operator()));
717
11
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11
    return Status::OK();
721
11
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
176
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
176
    _operator_profile =
664
176
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
176
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
176
    _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
176
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
176
    _operator_profile->add_child(_common_profile, true);
673
176
    _operator_profile->add_child(_custom_profile, true);
674
675
176
    _operator_profile->set_metadata(_parent->node_id());
676
176
    _wait_for_finish_dependency_timer =
677
176
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
176
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
176
    if constexpr (!is_fake_shared) {
680
176
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
176
            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
176
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
176
            _shared_state = info.shared_state->template cast<SharedState>();
696
176
            _dependency = _shared_state->create_sink_dependency(
697
176
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
176
        }
699
176
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
176
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
176
    }
702
703
176
    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
176
    _rows_input_counter =
708
176
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
176
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
176
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
176
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
176
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
176
    _memory_used_counter =
714
176
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
176
    _common_profile->add_info_string("IsColocate",
716
176
                                     std::to_string(_parent->is_colocated_operator()));
717
176
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
176
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
176
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
176
    return Status::OK();
721
176
}
722
723
template <typename SharedState>
724
921k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
921k
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
921k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
645k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
645k
    }
731
921k
    _closed = true;
732
921k
    return Status::OK();
733
921k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
108k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
108k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
108k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
108k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
108k
    }
731
108k
    _closed = true;
732
108k
    return Status::OK();
733
108k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4
    }
731
4
    _closed = true;
732
4
    return Status::OK();
733
4
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
165k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
165k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
165k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
165k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
165k
    }
731
165k
    _closed = true;
732
165k
    return Status::OK();
733
165k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
153
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
153
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
151
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
151
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
151
    }
731
151
    _closed = true;
732
151
    return Status::OK();
733
153
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4.22k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4.22k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4.22k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4.22k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4.22k
    }
731
4.22k
    _closed = true;
732
4.22k
    return Status::OK();
733
4.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.90k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.90k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.90k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.90k
    }
731
5.90k
    _closed = true;
732
5.90k
    return Status::OK();
733
5.90k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
73.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
73.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
73.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
73.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
73.9k
    }
731
73.9k
    _closed = true;
732
73.9k
    return Status::OK();
733
73.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.11k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.11k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.11k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.11k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.11k
    }
731
1.11k
    _closed = true;
732
1.11k
    return Status::OK();
733
1.11k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
110
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
110
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
110
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
110
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
110
    }
731
110
    _closed = true;
732
110
    return Status::OK();
733
110
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
275k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
275k
    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
275k
    _closed = true;
732
275k
    return Status::OK();
733
275k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
7.54k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
7.54k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
7.54k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
7.54k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
7.54k
    }
731
7.54k
    _closed = true;
732
7.54k
    return Status::OK();
733
7.54k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
203
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
203
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
203
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
203
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
203
    }
731
203
    _closed = true;
732
203
    return Status::OK();
733
203
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.39k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.39k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.39k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.39k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.39k
    }
731
1.39k
    _closed = true;
732
1.39k
    return Status::OK();
733
1.39k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.37k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.37k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.37k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.37k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.37k
    }
731
1.37k
    _closed = true;
732
1.37k
    return Status::OK();
733
1.37k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
101k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
101k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
101k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
101k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
101k
    }
731
101k
    _closed = true;
732
101k
    return Status::OK();
733
101k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
174k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
174k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
174k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
174k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
174k
    }
731
174k
    _closed = true;
732
174k
    return Status::OK();
733
174k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
176
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
176
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
176
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
176
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
176
    }
731
176
    _closed = true;
732
176
    return Status::OK();
733
176
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
994
                                                          bool* eos) {
738
994
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
989
    return pull(state, block, eos);
740
994
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
26
                                                          bool* eos) {
738
26
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
26
    return pull(state, block, eos);
740
26
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
968
                                                          bool* eos) {
738
968
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
963
    return pull(state, block, eos);
740
968
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
194k
                                                         bool* eos) {
745
194k
    auto& local_state = get_local_state(state);
746
194k
    if (need_more_input_data(state)) {
747
165k
        local_state._child_block->clear_column_data(
748
165k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
165k
                        .num_slots());
750
165k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
165k
                state, local_state._child_block.get(), &local_state._child_eos));
752
165k
        *eos = local_state._child_eos;
753
165k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
48.5k
            return Status::OK();
755
48.5k
        }
756
117k
        {
757
117k
            SCOPED_TIMER(local_state.exec_time_counter());
758
117k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
117k
        }
760
117k
    }
761
762
145k
    if (!need_more_input_data(state)) {
763
133k
        SCOPED_TIMER(local_state.exec_time_counter());
764
133k
        bool new_eos = false;
765
133k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
133k
        if (new_eos) {
767
64.1k
            *eos = true;
768
69.5k
        } else if (!need_more_input_data(state)) {
769
23.0k
            *eos = false;
770
23.0k
        }
771
133k
    }
772
145k
    return Status::OK();
773
145k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
118k
                                                         bool* eos) {
745
118k
    auto& local_state = get_local_state(state);
746
118k
    if (need_more_input_data(state)) {
747
102k
        local_state._child_block->clear_column_data(
748
102k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
102k
                        .num_slots());
750
102k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
102k
                state, local_state._child_block.get(), &local_state._child_eos));
752
102k
        *eos = local_state._child_eos;
753
102k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
29.8k
            return Status::OK();
755
29.8k
        }
756
72.1k
        {
757
72.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
72.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
72.1k
        }
760
72.1k
    }
761
762
88.8k
    if (!need_more_input_data(state)) {
763
88.8k
        SCOPED_TIMER(local_state.exec_time_counter());
764
88.8k
        bool new_eos = false;
765
88.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
88.8k
        if (new_eos) {
767
36.3k
            *eos = true;
768
52.4k
        } else if (!need_more_input_data(state)) {
769
11.2k
            *eos = false;
770
11.2k
        }
771
88.8k
    }
772
88.7k
    return Status::OK();
773
88.7k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
3.13k
                                                         bool* eos) {
745
3.13k
    auto& local_state = get_local_state(state);
746
3.13k
    if (need_more_input_data(state)) {
747
1.97k
        local_state._child_block->clear_column_data(
748
1.97k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.97k
                        .num_slots());
750
1.97k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.97k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.97k
        *eos = local_state._child_eos;
753
1.97k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
680
            return Status::OK();
755
680
        }
756
1.29k
        {
757
1.29k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.29k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.29k
        }
760
1.29k
    }
761
762
2.46k
    if (!need_more_input_data(state)) {
763
2.46k
        SCOPED_TIMER(local_state.exec_time_counter());
764
2.46k
        bool new_eos = false;
765
2.46k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
2.46k
        if (new_eos) {
767
884
            *eos = true;
768
1.58k
        } else if (!need_more_input_data(state)) {
769
1.17k
            *eos = false;
770
1.17k
        }
771
2.46k
    }
772
2.45k
    return Status::OK();
773
2.45k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.50k
                                                         bool* eos) {
745
1.50k
    auto& local_state = get_local_state(state);
746
1.50k
    if (need_more_input_data(state)) {
747
1.50k
        local_state._child_block->clear_column_data(
748
1.50k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.50k
                        .num_slots());
750
1.50k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.50k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.50k
        *eos = local_state._child_eos;
753
1.50k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
579
            return Status::OK();
755
579
        }
756
922
        {
757
922
            SCOPED_TIMER(local_state.exec_time_counter());
758
922
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
922
        }
760
922
    }
761
762
922
    if (!need_more_input_data(state)) {
763
922
        SCOPED_TIMER(local_state.exec_time_counter());
764
922
        bool new_eos = false;
765
922
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
922
        if (new_eos) {
767
597
            *eos = true;
768
597
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
922
    }
772
922
    return Status::OK();
773
922
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
15.9k
                                                         bool* eos) {
745
15.9k
    auto& local_state = get_local_state(state);
746
15.9k
    if (need_more_input_data(state)) {
747
15.9k
        local_state._child_block->clear_column_data(
748
15.9k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
15.9k
                        .num_slots());
750
15.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
15.9k
                state, local_state._child_block.get(), &local_state._child_eos));
752
15.9k
        *eos = local_state._child_eos;
753
15.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
4.39k
            return Status::OK();
755
4.39k
        }
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
11.5k
    if (!need_more_input_data(state)) {
763
5.93k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.93k
        bool new_eos = false;
765
5.93k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.93k
        if (new_eos) {
767
5.81k
            *eos = true;
768
5.81k
        } else if (!need_more_input_data(state)) {
769
1
            *eos = false;
770
1
        }
771
5.93k
    }
772
11.5k
    return Status::OK();
773
11.5k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
32.1k
                                                         bool* eos) {
745
32.1k
    auto& local_state = get_local_state(state);
746
32.2k
    if (need_more_input_data(state)) {
747
32.2k
        local_state._child_block->clear_column_data(
748
32.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
32.2k
                        .num_slots());
750
32.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
32.2k
                state, local_state._child_block.get(), &local_state._child_eos));
752
32.2k
        *eos = local_state._child_eos;
753
32.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
12.1k
            return Status::OK();
755
12.1k
        }
756
20.0k
        {
757
20.0k
            SCOPED_TIMER(local_state.exec_time_counter());
758
20.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
20.0k
        }
760
20.0k
    }
761
762
19.9k
    if (!need_more_input_data(state)) {
763
14.0k
        SCOPED_TIMER(local_state.exec_time_counter());
764
14.0k
        bool new_eos = false;
765
14.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
14.0k
        if (new_eos) {
767
13.6k
            *eos = true;
768
13.6k
        } else if (!need_more_input_data(state)) {
769
5
            *eos = false;
770
5
        }
771
14.0k
    }
772
19.9k
    return Status::OK();
773
19.9k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
18.3k
                                                         bool* eos) {
745
18.3k
    auto& local_state = get_local_state(state);
746
18.3k
    if (need_more_input_data(state)) {
747
7.97k
        local_state._child_block->clear_column_data(
748
7.97k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.97k
                        .num_slots());
750
7.97k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.97k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.97k
        *eos = local_state._child_eos;
753
7.97k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
693
            return Status::OK();
755
693
        }
756
7.27k
        {
757
7.27k
            SCOPED_TIMER(local_state.exec_time_counter());
758
7.27k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
7.27k
        }
760
7.27k
    }
761
762
17.6k
    if (!need_more_input_data(state)) {
763
17.1k
        SCOPED_TIMER(local_state.exec_time_counter());
764
17.1k
        bool new_eos = false;
765
17.1k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
17.1k
        if (new_eos) {
767
4.21k
            *eos = true;
768
12.9k
        } else if (!need_more_input_data(state)) {
769
10.3k
            *eos = false;
770
10.3k
        }
771
17.1k
    }
772
17.6k
    return Status::OK();
773
17.6k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.57k
                                                         bool* eos) {
745
4.57k
    auto& local_state = get_local_state(state);
746
4.57k
    if (need_more_input_data(state)) {
747
4.26k
        local_state._child_block->clear_column_data(
748
4.26k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
4.26k
                        .num_slots());
750
4.26k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
4.26k
                state, local_state._child_block.get(), &local_state._child_eos));
752
4.26k
        *eos = local_state._child_eos;
753
4.26k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
227
            return Status::OK();
755
227
        }
756
4.03k
        {
757
4.03k
            SCOPED_TIMER(local_state.exec_time_counter());
758
4.03k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
4.03k
        }
760
4.03k
    }
761
762
4.34k
    if (!need_more_input_data(state)) {
763
4.34k
        SCOPED_TIMER(local_state.exec_time_counter());
764
4.34k
        bool new_eos = false;
765
4.34k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
4.34k
        if (new_eos) {
767
2.67k
            *eos = true;
768
2.67k
        } else if (!need_more_input_data(state)) {
769
318
            *eos = false;
770
318
        }
771
4.34k
    }
772
4.34k
    return Status::OK();
773
4.34k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
45.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
45.0k
    RETURN_IF_ERROR(Base::init(state, info));
779
45.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
45.0k
                                                         "AsyncWriterDependency", true);
781
45.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
45.0k
                             _finish_dependency));
783
784
45.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
45.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
45.0k
    return Status::OK();
787
45.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
36
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
36
    RETURN_IF_ERROR(Base::init(state, info));
779
36
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
36
                                                         "AsyncWriterDependency", true);
781
36
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
36
                             _finish_dependency));
783
784
36
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
36
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
36
    return Status::OK();
787
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
45.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
45.0k
    RETURN_IF_ERROR(Base::init(state, info));
779
45.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
45.0k
                                                         "AsyncWriterDependency", true);
781
45.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
45.0k
                             _finish_dependency));
783
784
45.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
45.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
45.0k
    return Status::OK();
787
45.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
14
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
14
    RETURN_IF_ERROR(Base::init(state, info));
779
14
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
14
                                                         "AsyncWriterDependency", true);
781
14
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
14
                             _finish_dependency));
783
784
14
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
14
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
14
    return Status::OK();
787
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
45.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
45.5k
    RETURN_IF_ERROR(Base::open(state));
793
45.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
374k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
329k
        RETURN_IF_ERROR(
796
329k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
329k
    }
798
45.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
45.5k
    return Status::OK();
800
45.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
36
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
36
    RETURN_IF_ERROR(Base::open(state));
793
36
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
255
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
219
        RETURN_IF_ERROR(
796
219
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
219
    }
798
36
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
36
    return Status::OK();
800
36
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
45.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
45.4k
    RETURN_IF_ERROR(Base::open(state));
793
45.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
374k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
328k
        RETURN_IF_ERROR(
796
328k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
328k
    }
798
45.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
45.4k
    return Status::OK();
800
45.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
14
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
14
    RETURN_IF_ERROR(Base::open(state));
793
14
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
252
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
238
        RETURN_IF_ERROR(
796
238
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
238
    }
798
14
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
14
    return Status::OK();
800
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
59.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
59.0k
    return _writer->sink(block, eos);
806
59.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
112
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
112
    return _writer->sink(block, eos);
806
112
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
58.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
58.9k
    return _writer->sink(block, eos);
806
58.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
14
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
14
    return _writer->sink(block, eos);
806
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
45.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
45.5k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
45.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
45.5k
    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
45.6k
    if (_writer) {
818
45.6k
        Status st = _writer->get_writer_status();
819
45.6k
        if (exec_status.ok()) {
820
45.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
45.4k
                                                       : Status::Cancelled("force close"));
822
45.4k
        } else {
823
147
            _writer->force_close(exec_status);
824
147
        }
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
45.6k
        RETURN_IF_ERROR(st);
829
45.6k
    }
830
45.5k
    return Base::close(state, exec_status);
831
45.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
25
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
25
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
25
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
25
    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
25
    if (_writer) {
818
25
        Status st = _writer->get_writer_status();
819
25
        if (exec_status.ok()) {
820
25
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
25
                                                       : Status::Cancelled("force close"));
822
25
        } 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
25
        RETURN_IF_ERROR(st);
829
25
    }
830
25
    return Base::close(state, exec_status);
831
25
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
45.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
45.5k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
45.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
45.5k
    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
45.5k
    if (_writer) {
818
45.5k
        Status st = _writer->get_writer_status();
819
45.5k
        if (exec_status.ok()) {
820
45.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
45.4k
                                                       : Status::Cancelled("force close"));
822
45.4k
        } else {
823
147
            _writer->force_close(exec_status);
824
147
        }
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
45.5k
        RETURN_IF_ERROR(st);
829
45.5k
    }
830
45.4k
    return Base::close(state, exec_status);
831
45.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
14
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
14
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
14
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
14
    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
14
    if (_writer) {
818
14
        Status st = _writer->get_writer_status();
819
14
        if (exec_status.ok()) {
820
14
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
14
                                                       : Status::Cancelled("force close"));
822
14
        } 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
14
        RETURN_IF_ERROR(st);
829
14
    }
830
14
    return Base::close(state, exec_status);
831
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
976
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
977
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
978
979
#ifdef BE_TEST
980
template class OperatorX<DummyOperatorLocalState>;
981
template class DataSinkOperatorX<DummySinkLocalState>;
982
#endif
983
984
} // namespace doris