Coverage Report

Created: 2026-09-29 05:16

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