Coverage Report

Created: 2026-09-20 10:49

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
1.66M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.66M
    if (_parent->nereids_id() == -1) {
122
864k
        return fmt::format("(id={})", _parent->node_id());
123
864k
    } else {
124
796k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
796k
    }
126
1.66M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
66.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
66.4k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
66.4k
    } else {
124
66.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
66.4k
    }
126
66.4k
}
_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
203k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
203k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
203k
    } else {
124
203k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
203k
    }
126
203k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
22
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
22
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
22
    } else {
124
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
22
    }
126
22
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.45k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.45k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
5.45k
    } else {
124
5.45k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.45k
    }
126
5.45k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.85k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.85k
    if (_parent->nereids_id() == -1) {
122
14
        return fmt::format("(id={})", _parent->node_id());
123
8.83k
    } else {
124
8.83k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
8.83k
    }
126
8.85k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
92.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
92.2k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
92.1k
    } else {
124
92.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
92.1k
    }
126
92.2k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
87.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
87.2k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
87.2k
    } else {
124
87.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
87.2k
    }
126
87.2k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
262
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
262
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
262
    } else {
124
262
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
262
    }
126
262
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
520k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
520k
    if (_parent->nereids_id() == -1) {
122
248k
        return fmt::format("(id={})", _parent->node_id());
123
271k
    } else {
124
271k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
271k
    }
126
520k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
54.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
54.2k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
54.2k
    } else {
124
54.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
54.2k
    }
126
54.2k
}
_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.40k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.40k
    if (_parent->nereids_id() == -1) {
122
5.40k
        return fmt::format("(id={})", _parent->node_id());
123
5.40k
    } else {
124
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
1
    }
126
5.40k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
707
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
707
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
605
    } else {
124
605
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
605
    }
126
707
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.62k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.62k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
4.61k
    } else {
124
4.61k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.61k
    }
126
4.62k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
611k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
611k
    if (_parent->nereids_id() == -1) {
122
610k
        return fmt::format("(id={})", _parent->node_id());
123
610k
    } else {
124
1.06k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
1.06k
    }
126
611k
}
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.18M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.18M
    if (_parent->nereids_id() == -1) {
131
662k
        return fmt::format("(id={})", _parent->node_id());
132
662k
    } else {
133
522k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
522k
    }
135
1.18M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
114k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
114k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
114k
    } else {
133
114k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
114k
    }
135
114k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
204k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
204k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
204k
    } else {
133
204k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
204k
    }
135
204k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
29
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
29
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
29
    } else {
133
29
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
29
    }
135
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
5.44k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
5.44k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
5.44k
    } else {
133
5.44k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
5.44k
    }
135
5.44k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.93k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.93k
    if (_parent->nereids_id() == -1) {
131
14
        return fmt::format("(id={})", _parent->node_id());
132
8.92k
    } else {
133
8.92k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.92k
    }
135
8.93k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
92.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
92.7k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
92.6k
    } else {
133
92.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
92.6k
    }
135
92.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
86.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
86.9k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
86.9k
    } else {
133
86.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
86.9k
    }
135
86.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
272
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
272
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
272
    } else {
133
272
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
272
    }
135
272
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
51
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
51
    if (_parent->nereids_id() == -1) {
131
51
        return fmt::format("(id={})", _parent->node_id());
132
51
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
51
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.11k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.11k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
8.11k
    } else {
133
8.11k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.11k
    }
135
8.11k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
710
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
710
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
608
    } else {
133
608
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
608
    }
135
710
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.2k
    if (_parent->nereids_id() == -1) {
131
12.2k
        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.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
242k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
243k
    if (_parent->nereids_id() == -1) {
131
243k
        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
242k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
406k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
406k
    if (_parent->nereids_id() == -1) {
131
406k
        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
406k
}
_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
32.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
32.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
32.0k
    _terminated = true;
143
32.0k
    return Status::OK();
144
32.0k
}
_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
3.44k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3.44k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3.44k
    _terminated = true;
143
3.44k
    return Status::OK();
144
3.44k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
5
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
5
    _terminated = true;
143
5
    return Status::OK();
144
5
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.81k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.81k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.81k
    _terminated = true;
143
1.81k
    return Status::OK();
144
1.81k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.34k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.34k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.34k
    _terminated = true;
143
1.34k
    return Status::OK();
144
1.34k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
550
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
550
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
550
    _terminated = true;
143
550
    return Status::OK();
144
550
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
154
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
154
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
154
    _terminated = true;
143
154
    return Status::OK();
144
154
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
6
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
6
    _terminated = true;
143
6
    return Status::OK();
144
6
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
282
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
282
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
282
    _terminated = true;
143
282
    return Status::OK();
144
282
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
31
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
31
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
31
    _terminated = true;
143
31
    return Status::OK();
144
31
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
227
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
227
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
227
    _terminated = true;
143
227
    return Status::OK();
144
227
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
129
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
129
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
129
    _terminated = true;
143
129
    return Status::OK();
144
129
}
145
146
298k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
298k
    return _child && _child->is_serial_operator() && !is_source()
148
298k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
298k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
298k
}
151
152
20.2k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
20.2k
    if (!_child) {
154
18.6k
        return false;
155
18.6k
    }
156
1.54k
    if (_child->is_serial_operator()) {
157
218
        return true;
158
218
    }
159
1.32k
    const auto child_distribution = _child->required_data_distribution(state);
160
1.32k
    return child_distribution.need_local_exchange() &&
161
1.32k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.54k
}
163
164
template <typename SharedStateArg>
165
13.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
13.9k
    fmt::memory_buffer debug_string_buffer;
167
13.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
13.9k
    return fmt::to_string(debug_string_buffer);
169
13.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
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
7
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
7
    fmt::memory_buffer debug_string_buffer;
167
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
7
    return fmt::to_string(debug_string_buffer);
169
7
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
13.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
13.9k
    fmt::memory_buffer debug_string_buffer;
167
13.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
13.9k
    return fmt::to_string(debug_string_buffer);
169
13.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
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
6
    fmt::memory_buffer debug_string_buffer;
167
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
6
    return fmt::to_string(debug_string_buffer);
169
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
13.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
13.9k
    fmt::memory_buffer debug_string_buffer;
174
13.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
13.9k
    return fmt::to_string(debug_string_buffer);
176
13.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
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
7
    fmt::memory_buffer debug_string_buffer;
174
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
7
    return fmt::to_string(debug_string_buffer);
176
7
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
6
    fmt::memory_buffer debug_string_buffer;
174
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
6
    return fmt::to_string(debug_string_buffer);
176
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
1
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
1
    fmt::memory_buffer debug_string_buffer;
174
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
1
    return fmt::to_string(debug_string_buffer);
176
1
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
13.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
13.9k
    fmt::memory_buffer debug_string_buffer;
174
13.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
13.9k
    return fmt::to_string(debug_string_buffer);
176
13.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
13.9k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
13.9k
    fmt::memory_buffer debug_string_buffer;
180
13.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
13.9k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
13.9k
                   _is_serial_operator);
183
13.9k
    return fmt::to_string(debug_string_buffer);
184
13.9k
}
185
186
13.9k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
13.9k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
13.9k
}
189
190
640k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
640k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
640k
    _nereids_id = tnode.nereids_id;
193
640k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.88k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.88k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.88k
            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.88k
    }
206
640k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
640k
    _op_name = substr + "_OPERATOR";
208
209
640k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
640k
    } 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.0k
    }
218
219
    // create the projections expr
220
640k
    if (tnode.__isset.projections) {
221
262k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
262k
    }
223
640k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.88k
        DCHECK(has_projection()) << "no final projections";
225
3.88k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
6.62k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
6.62k
            VExprContextSPtrs projections;
228
6.62k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
6.62k
            _projection->intermediate_projections.push_back(projections);
230
6.62k
        }
231
3.88k
    }
232
640k
    return Status::OK();
233
640k
}
234
235
668k
Status OperatorXBase::prepare(RuntimeState* state) {
236
668k
    for (auto& conjunct : _conjuncts) {
237
272k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
272k
    }
239
668k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
618k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
339k
            return a->execute_cost() < b->execute_cost();
242
339k
        });
243
618k
    };
244
245
668k
    if (has_projection()) {
246
261k
        auto& projection = *_projection;
247
268k
        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
668k
    for (auto& conjunct : _conjuncts) {
265
272k
        RETURN_IF_ERROR(conjunct->open(state));
266
272k
    }
267
668k
    if (has_projection()) {
268
261k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
261k
        for (auto& projections : _projection->intermediate_projections) {
270
6.62k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
6.62k
        }
272
261k
    }
273
668k
    if (_child && !is_source()) {
274
87.4k
        RETURN_IF_ERROR(_child->prepare(state));
275
87.4k
    }
276
277
668k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
668k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
668k
    return Status::OK();
283
668k
}
284
285
9.12k
Status OperatorXBase::terminate(RuntimeState* state) {
286
9.12k
    if (_child && !is_source()) {
287
1.07k
        RETURN_IF_ERROR(_child->terminate(state));
288
1.07k
    }
289
9.12k
    auto result = state->get_local_state_result(operator_id());
290
9.12k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
9.12k
    return result.value()->terminate(state);
294
9.12k
}
295
296
4.45M
Status OperatorXBase::close(RuntimeState* state) {
297
4.45M
    if (_child && !is_source()) {
298
665k
        RETURN_IF_ERROR(_child->close(state));
299
665k
    }
300
4.45M
    auto result = state->get_local_state_result(operator_id());
301
4.45M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
4.45M
    return result.value()->close(state);
305
4.45M
}
306
307
279k
void PipelineXLocalStateBase::clear_origin_block() {
308
279k
    _origin_block.clear_column_data(
309
279k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
279k
}
311
312
850k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
850k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
850k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
850k
    return Status::OK();
317
850k
}
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
279k
                                     Block* output_block) const {
326
279k
    auto* local_state = state->get_local_state(operator_id());
327
279k
    SCOPED_TIMER(local_state->exec_time_counter());
328
279k
    SCOPED_TIMER(local_state->_projection_timer);
329
279k
    const size_t rows = origin_block->rows();
330
279k
    if (rows == 0) {
331
144k
        return Status::OK();
332
144k
    }
333
134k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
134k
    {
336
134k
        Block input_block = *origin_block;
337
338
134k
        ColumnsWithTypeAndName new_columns;
339
134k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.93k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.93k
            new_columns.resize(projections.size());
345
76.2k
            for (int i = 0; i < projections.size(); i++) {
346
72.3k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
72.3k
                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
72.3k
            }
355
3.92k
            Block tmp_block {new_columns};
356
3.92k
            input_block.swap(tmp_block);
357
3.92k
        }
358
359
134k
        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
134k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
134k
                output_block, _projection->output_row_descriptor);
368
134k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
134k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
134k
        Columns shared_columns(mutable_columns.size());
371
372
761k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
626k
            ColumnPtr column_ptr;
374
626k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
626k
            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
626k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
626k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
626k
            if (column_ptr->is_exclusive()) {
386
230k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
395k
            } else {
388
395k
                shared_columns[i] = std::move(column_ptr);
389
395k
            }
390
626k
        }
391
392
134k
        scoped_mutable_block.restore();
393
761k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
626k
            if (shared_columns[i]) {
395
396k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
396k
            }
397
626k
        }
398
134k
    }
399
400
0
    origin_block->clear_column_data(
401
134k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
134k
    DCHECK_EQ(output_block->rows(), rows);
403
404
134k
    return Status::OK();
405
134k
}
406
407
4.06M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.06M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.06M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.06M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.06M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.06M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.06M
            if (_debug_point_count++ % 2 == 0) {
414
4.06M
                return Status::OK();
415
4.06M
            }
416
4.06M
        }
417
4.06M
    });
418
419
4.06M
    Status status;
420
4.06M
    auto* local_state = state->get_local_state(operator_id());
421
4.06M
    Defer defer([&]() {
422
4.06M
        if (status.ok()) {
423
4.06M
            local_state->update_output_block_counters(*block);
424
4.06M
        }
425
4.06M
    });
426
4.06M
    if (has_projection()) {
427
279k
        local_state->clear_origin_block();
428
279k
        status = get_block(state, &local_state->_origin_block, eos);
429
279k
        if (UNLIKELY(!status.ok())) {
430
24
            return status;
431
24
        }
432
279k
        status = do_projections(state, &local_state->_origin_block, block);
433
279k
        return status;
434
279k
    }
435
3.78M
    status = get_block(state, block, eos);
436
3.78M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.78M
    return status;
438
3.78M
}
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.52k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.52k
        *eos = true;
444
9.52k
    }
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
725k
        _num_rows_returned += rows;
458
725k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
725k
    }
460
2.76M
}
461
462
32.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.0k
    auto result = state->get_sink_local_state_result();
464
32.0k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.0k
    return result.value()->terminate(state);
468
32.0k
}
469
470
13.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
13.9k
    fmt::memory_buffer debug_string_buffer;
472
473
13.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
13.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
13.9k
    return fmt::to_string(debug_string_buffer);
476
13.9k
}
477
478
13.9k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
13.9k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
13.9k
}
481
482
337k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
337k
    std::string op_name = "UNKNOWN_SINK";
484
337k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
338k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
338k
        op_name = it->second;
488
338k
    }
489
337k
    _name = op_name + "_OPERATOR";
490
337k
    return Status::OK();
491
337k
}
492
493
290k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
290k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
290k
    _nereids_id = tnode.nereids_id;
496
290k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
290k
    _name = substr + "_SINK_OPERATOR";
498
290k
    return Status::OK();
499
290k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.65M
                                                            LocalSinkStateInfo& info) {
504
1.65M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.65M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.65M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.65M
    return Status::OK();
508
1.65M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
115k
                                                            LocalSinkStateInfo& info) {
504
115k
    auto local_state = LocalStateType::create_unique(this, state);
505
115k
    RETURN_IF_ERROR(local_state->init(state, info));
506
115k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
115k
    return Status::OK();
508
115k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
361k
                                                            LocalSinkStateInfo& info) {
504
361k
    auto local_state = LocalStateType::create_unique(this, state);
505
361k
    RETURN_IF_ERROR(local_state->init(state, info));
506
361k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
361k
    return Status::OK();
508
361k
}
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
353
                                                            LocalSinkStateInfo& info) {
504
353
    auto local_state = LocalStateType::create_unique(this, state);
505
353
    RETURN_IF_ERROR(local_state->init(state, info));
506
353
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
353
    return Status::OK();
508
353
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
46.2k
                                                            LocalSinkStateInfo& info) {
504
46.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
46.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
46.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
46.2k
    return Status::OK();
508
46.2k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
90
                                                            LocalSinkStateInfo& info) {
504
90
    auto local_state = LocalStateType::create_unique(this, state);
505
90
    RETURN_IF_ERROR(local_state->init(state, info));
506
90
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
90
    return Status::OK();
508
90
}
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
8.94k
                                                            LocalSinkStateInfo& info) {
504
8.94k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.94k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.94k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.94k
    return Status::OK();
508
8.94k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
48
                                                            LocalSinkStateInfo& info) {
504
48
    auto local_state = LocalStateType::create_unique(this, state);
505
48
    RETURN_IF_ERROR(local_state->init(state, info));
506
48
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
48
    return Status::OK();
508
48
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
206k
                                                            LocalSinkStateInfo& info) {
504
206k
    auto local_state = LocalStateType::create_unique(this, state);
505
206k
    RETURN_IF_ERROR(local_state->init(state, info));
506
206k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
206k
    return Status::OK();
508
206k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
29
                                                            LocalSinkStateInfo& info) {
504
29
    auto local_state = LocalStateType::create_unique(this, state);
505
29
    RETURN_IF_ERROR(local_state->init(state, info));
506
29
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
29
    return Status::OK();
508
29
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
243k
                                                            LocalSinkStateInfo& info) {
504
243k
    auto local_state = LocalStateType::create_unique(this, state);
505
243k
    RETURN_IF_ERROR(local_state->init(state, info));
506
243k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
243k
    return Status::OK();
508
243k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
92.9k
                                                            LocalSinkStateInfo& info) {
504
92.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
92.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
92.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
92.9k
    return Status::OK();
508
92.9k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
86.9k
                                                            LocalSinkStateInfo& info) {
504
86.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
86.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
86.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
86.9k
    return Status::OK();
508
86.9k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
272
                                                            LocalSinkStateInfo& info) {
504
272
    auto local_state = LocalStateType::create_unique(this, state);
505
272
    RETURN_IF_ERROR(local_state->init(state, info));
506
272
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
272
    return Status::OK();
508
272
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
461k
                                                            LocalSinkStateInfo& info) {
504
461k
    auto local_state = LocalStateType::create_unique(this, state);
505
461k
    RETURN_IF_ERROR(local_state->init(state, info));
506
461k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
461k
    return Status::OK();
508
461k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.45k
                                                            LocalSinkStateInfo& info) {
504
5.45k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.45k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.45k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.45k
    return Status::OK();
508
5.45k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.10k
                                                            LocalSinkStateInfo& info) {
504
8.10k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.10k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.10k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.10k
    return Status::OK();
508
8.10k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.98k
                                                            LocalSinkStateInfo& info) {
504
1.98k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.98k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.98k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.98k
    return Status::OK();
508
1.98k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
609
                                                            LocalSinkStateInfo& info) {
504
609
    auto local_state = LocalStateType::create_unique(this, state);
505
609
    RETURN_IF_ERROR(local_state->init(state, info));
506
609
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
609
    return Status::OK();
508
609
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.70k
                                                            LocalSinkStateInfo& info) {
504
4.70k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.70k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.70k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.70k
    return Status::OK();
508
4.70k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.46k
                                                            LocalSinkStateInfo& info) {
504
2.46k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.46k
    return Status::OK();
508
2.46k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.54k
                                                            LocalSinkStateInfo& info) {
504
2.54k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.54k
    return Status::OK();
508
2.54k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.41k
                                                            LocalSinkStateInfo& info) {
504
2.41k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.41k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.41k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.41k
    return Status::OK();
508
2.41k
}
_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
569
                                                            LocalSinkStateInfo& info) {
504
569
    auto local_state = LocalStateType::create_unique(this, state);
505
569
    RETURN_IF_ERROR(local_state->init(state, info));
506
569
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
569
    return Status::OK();
508
569
}
_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.29M
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.29M
    } else {
519
1.29M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.29M
        ss->id = operator_id();
521
1.29M
        for (auto& dest : dests_id()) {
522
1.27M
            ss->related_op_ids.insert(dest);
523
1.27M
        }
524
1.29M
        return ss;
525
1.29M
    }
526
1.29M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
97.8k
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
97.8k
    } else {
519
97.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
97.8k
        ss->id = operator_id();
521
97.8k
        for (auto& dest : dests_id()) {
522
97.5k
            ss->related_op_ids.insert(dest);
523
97.5k
        }
524
97.8k
        return ss;
525
97.8k
    }
526
97.8k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
362k
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
362k
    } else {
519
362k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
362k
        ss->id = operator_id();
521
362k
        for (auto& dest : dests_id()) {
522
359k
            ss->related_op_ids.insert(dest);
523
359k
        }
524
362k
        return ss;
525
362k
    }
526
362k
}
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
353
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
353
    } else {
519
353
        auto ss = LocalStateType::SharedStateType::create_shared();
520
353
        ss->id = operator_id();
521
353
        for (auto& dest : dests_id()) {
522
353
            ss->related_op_ids.insert(dest);
523
353
        }
524
353
        return ss;
525
353
    }
526
353
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
46.2k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
46.2k
    } else {
519
46.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
46.2k
        ss->id = operator_id();
521
46.2k
        for (auto& dest : dests_id()) {
522
45.7k
            ss->related_op_ids.insert(dest);
523
45.7k
        }
524
46.2k
        return ss;
525
46.2k
    }
526
46.2k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
90
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
    } else {
519
90
        auto ss = LocalStateType::SharedStateType::create_shared();
520
90
        ss->id = operator_id();
521
90
        for (auto& dest : dests_id()) {
522
90
            ss->related_op_ids.insert(dest);
523
90
        }
524
90
        return ss;
525
90
    }
526
90
}
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
8.98k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8.98k
    } else {
519
8.98k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.98k
        ss->id = operator_id();
521
8.98k
        for (auto& dest : dests_id()) {
522
8.97k
            ss->related_op_ids.insert(dest);
523
8.97k
        }
524
8.98k
        return ss;
525
8.98k
    }
526
8.98k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
48
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
48
    } else {
519
48
        auto ss = LocalStateType::SharedStateType::create_shared();
520
48
        ss->id = operator_id();
521
48
        for (auto& dest : dests_id()) {
522
48
            ss->related_op_ids.insert(dest);
523
48
        }
524
48
        return ss;
525
48
    }
526
48
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
207k
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
207k
    } else {
519
207k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
207k
        ss->id = operator_id();
521
207k
        for (auto& dest : dests_id()) {
522
206k
            ss->related_op_ids.insert(dest);
523
206k
        }
524
207k
        return ss;
525
207k
    }
526
207k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
31
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
31
    } else {
519
31
        auto ss = LocalStateType::SharedStateType::create_shared();
520
31
        ss->id = operator_id();
521
31
        for (auto& dest : dests_id()) {
522
31
            ss->related_op_ids.insert(dest);
523
31
        }
524
31
        return ss;
525
31
    }
526
31
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
93.1k
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
93.1k
    } else {
519
93.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
93.1k
        ss->id = operator_id();
521
93.1k
        for (auto& dest : dests_id()) {
522
93.1k
            ss->related_op_ids.insert(dest);
523
93.1k
        }
524
93.1k
        return ss;
525
93.1k
    }
526
93.1k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
271
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
271
    } else {
519
271
        auto ss = LocalStateType::SharedStateType::create_shared();
520
271
        ss->id = operator_id();
521
271
        for (auto& dest : dests_id()) {
522
271
            ss->related_op_ids.insert(dest);
523
271
        }
524
271
        return ss;
525
271
    }
526
271
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
462k
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
462k
    } else {
519
462k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
462k
        ss->id = operator_id();
521
462k
        for (auto& dest : dests_id()) {
522
455k
            ss->related_op_ids.insert(dest);
523
455k
        }
524
462k
        return ss;
525
462k
    }
526
462k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.45k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
5.45k
    } else {
519
5.45k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.45k
        ss->id = operator_id();
521
5.45k
        for (auto& dest : dests_id()) {
522
5.45k
            ss->related_op_ids.insert(dest);
523
5.45k
        }
524
5.45k
        return ss;
525
5.45k
    }
526
5.45k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
708
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
708
    } else {
519
708
        auto ss = LocalStateType::SharedStateType::create_shared();
520
708
        ss->id = operator_id();
521
710
        for (auto& dest : dests_id()) {
522
710
            ss->related_op_ids.insert(dest);
523
710
        }
524
708
        return ss;
525
708
    }
526
708
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.53k
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.53k
    } else {
519
2.53k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.53k
        ss->id = operator_id();
521
2.53k
        for (auto& dest : dests_id()) {
522
2.52k
            ss->related_op_ids.insert(dest);
523
2.52k
        }
524
2.53k
        return ss;
525
2.53k
    }
526
2.53k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.41k
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.41k
    } else {
519
2.41k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.41k
        ss->id = operator_id();
521
2.41k
        for (auto& dest : dests_id()) {
522
2.41k
            ss->related_op_ids.insert(dest);
523
2.41k
        }
524
2.41k
        return ss;
525
2.41k
    }
526
2.41k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
568
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
568
    } else {
519
568
        auto ss = LocalStateType::SharedStateType::create_shared();
520
568
        ss->id = operator_id();
521
568
        for (auto& dest : dests_id()) {
522
561
            ss->related_op_ids.insert(dest);
523
561
        }
524
568
        return ss;
525
568
    }
526
568
}
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
106
            ss->related_op_ids.insert(dest);
523
106
        }
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
1.91M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.91M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.91M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.91M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.91M
    return Status::OK();
534
1.91M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
67.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
67.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
67.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
67.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
67.0k
    return Status::OK();
534
67.0k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
234k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
234k
    auto local_state = LocalStateType::create_unique(state, this);
531
234k
    RETURN_IF_ERROR(local_state->init(state, info));
532
234k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
234k
    return Status::OK();
534
234k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
143
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
143
    auto local_state = LocalStateType::create_unique(state, this);
531
143
    RETURN_IF_ERROR(local_state->init(state, info));
532
143
    state->emplace_local_state(operator_id(), std::move(local_state));
533
143
    return Status::OK();
534
143
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.08k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.08k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.08k
    return Status::OK();
534
3.08k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.88k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.88k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.88k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.88k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.88k
    return Status::OK();
534
8.88k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.63k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.63k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.63k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.63k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.63k
    return Status::OK();
534
8.63k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
22
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
22
    auto local_state = LocalStateType::create_unique(state, this);
531
22
    RETURN_IF_ERROR(local_state->init(state, info));
532
22
    state->emplace_local_state(operator_id(), std::move(local_state));
533
22
    return Status::OK();
534
22
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
197k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
197k
    auto local_state = LocalStateType::create_unique(state, this);
531
197k
    RETURN_IF_ERROR(local_state->init(state, info));
532
197k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
197k
    return Status::OK();
534
197k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
92.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
92.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
92.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
92.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
92.9k
    return Status::OK();
534
92.9k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
87.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
87.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
87.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
87.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
87.3k
    return Status::OK();
534
87.3k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
262
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
262
    auto local_state = LocalStateType::create_unique(state, this);
531
262
    RETURN_IF_ERROR(local_state->init(state, info));
532
262
    state->emplace_local_state(operator_id(), std::move(local_state));
533
262
    return Status::OK();
534
262
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.12k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.12k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.12k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.12k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.12k
    return Status::OK();
534
4.12k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
250k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
250k
    auto local_state = LocalStateType::create_unique(state, this);
531
250k
    RETURN_IF_ERROR(local_state->init(state, info));
532
250k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
250k
    return Status::OK();
534
250k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.19k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.19k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.19k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.19k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.19k
    return Status::OK();
534
1.19k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.45k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.45k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.45k
    return Status::OK();
534
5.45k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.60k
    return Status::OK();
534
1.60k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
54.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
54.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
54.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
54.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
54.3k
    return Status::OK();
534
54.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.41k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.41k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.41k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.41k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.41k
    return Status::OK();
534
5.41k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
605
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
605
    auto local_state = LocalStateType::create_unique(state, this);
531
605
    RETURN_IF_ERROR(local_state->init(state, info));
532
605
    state->emplace_local_state(operator_id(), std::move(local_state));
533
605
    return Status::OK();
534
605
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.47k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.47k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.47k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.47k
    return Status::OK();
534
2.47k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.36k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.36k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.36k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.36k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.36k
    return Status::OK();
534
2.36k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
327
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
327
    auto local_state = LocalStateType::create_unique(state, this);
531
327
    RETURN_IF_ERROR(local_state->init(state, info));
532
327
    state->emplace_local_state(operator_id(), std::move(local_state));
533
327
    return Status::OK();
534
327
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.61k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.61k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.61k
    return Status::OK();
534
1.61k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.2k
    return Status::OK();
534
10.2k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
619k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
619k
    auto local_state = LocalStateType::create_unique(state, this);
531
619k
    RETURN_IF_ERROR(local_state->init(state, info));
532
619k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
619k
    return Status::OK();
534
619k
}
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
786
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
786
    auto local_state = LocalStateType::create_unique(state, this);
531
786
    RETURN_IF_ERROR(local_state->init(state, info));
532
786
    state->emplace_local_state(operator_id(), std::move(local_state));
533
786
    return Status::OK();
534
786
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.23k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.23k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.23k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.23k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.23k
    return Status::OK();
534
1.23k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.86k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.86k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.86k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.86k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.86k
    return Status::OK();
534
6.86k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_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
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.64M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.90M
        : _num_rows_returned(0),
542
1.90M
          _rows_returned_counter(nullptr),
543
1.90M
          _parent(parent),
544
1.90M
          _state(state),
545
1.90M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.91M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.91M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.91M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.91M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.91M
    _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.91M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.91M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.91M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.91M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.91M
    if constexpr (!is_fake_shared) {
560
1.15M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
716k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
716k
                                    .first.get()
563
716k
                                    ->template cast<SharedStateArg>();
564
565
716k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
716k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
716k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
716k
        } else if (info.shared_state) {
569
371k
            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
371k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
371k
            _dependency = _shared_state->create_source_dependency(
576
371k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
371k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
371k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
371k
        } else {
580
66.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.48k
                DCHECK(false);
582
8.48k
            }
583
66.6k
        }
584
1.15M
    }
585
586
1.91M
    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.91M
    _rows_returned_counter =
591
1.91M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.91M
    _blocks_returned_counter =
593
1.91M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.91M
    _output_block_bytes_counter =
595
1.91M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.91M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.91M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.91M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.91M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.91M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.91M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.91M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.91M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.91M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.91M
    _memory_used_counter =
606
1.91M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.91M
    _common_profile->add_info_string("IsColocate",
608
1.91M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.91M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.91M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.91M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.91M
    return Status::OK();
613
1.91M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
67.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
67.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
67.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
67.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
67.1k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
67.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
67.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
67.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
67.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
67.1k
    if constexpr (!is_fake_shared) {
560
67.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
16.8k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
16.8k
                                    .first.get()
563
16.8k
                                    ->template cast<SharedStateArg>();
564
565
16.8k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
16.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
16.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
50.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
49.1k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
49.1k
            _dependency = _shared_state->create_source_dependency(
576
49.1k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
49.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
49.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
49.1k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.09k
        }
584
67.1k
    }
585
586
67.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
67.1k
    _rows_returned_counter =
591
67.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
67.1k
    _blocks_returned_counter =
593
67.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
67.1k
    _output_block_bytes_counter =
595
67.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
67.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
67.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
67.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
67.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
67.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
67.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
67.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
67.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
67.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
67.1k
    _memory_used_counter =
606
67.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
67.1k
    _common_profile->add_info_string("IsColocate",
608
67.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
67.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
67.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
67.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
67.1k
    return Status::OK();
613
67.1k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
1
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
206k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
206k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
206k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
206k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
206k
    _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
206k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
206k
    _operator_profile->add_child(_common_profile.get(), true);
557
206k
    _operator_profile->add_child(_custom_profile.get(), true);
558
206k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
206k
    if constexpr (!is_fake_shared) {
560
206k
        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
206k
        } 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
201k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
201k
            _dependency = _shared_state->create_source_dependency(
576
201k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
201k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
201k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
201k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
4.41k
        }
584
206k
    }
585
586
206k
    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
206k
    _rows_returned_counter =
591
206k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
206k
    _blocks_returned_counter =
593
206k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
206k
    _output_block_bytes_counter =
595
206k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
206k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
206k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
206k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
206k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
206k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
206k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
206k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
206k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
206k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
206k
    _memory_used_counter =
606
206k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
206k
    _common_profile->add_info_string("IsColocate",
608
206k
                                     std::to_string(_parent->is_colocated_operator()));
609
206k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
206k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
206k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
206k
    return Status::OK();
613
206k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
22
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
22
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
22
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
22
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
22
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
22
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
22
    _operator_profile->add_child(_common_profile.get(), true);
557
22
    _operator_profile->add_child(_custom_profile.get(), true);
558
22
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
22
    if constexpr (!is_fake_shared) {
560
22
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
22
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
22
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
22
            _dependency = _shared_state->create_source_dependency(
576
22
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
22
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
22
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
22
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
22
    }
585
586
22
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
22
    _rows_returned_counter =
591
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
22
    _blocks_returned_counter =
593
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
22
    _output_block_bytes_counter =
595
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
22
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
22
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
22
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
22
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
22
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
22
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
22
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
22
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
22
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
22
    _memory_used_counter =
606
22
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
22
    _common_profile->add_info_string("IsColocate",
608
22
                                     std::to_string(_parent->is_colocated_operator()));
609
22
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
22
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
22
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
22
    return Status::OK();
613
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.45k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.45k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.45k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.45k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.45k
    _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.45k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.45k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.45k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.45k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.45k
    if constexpr (!is_fake_shared) {
560
5.45k
        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.45k
        } 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.44k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.44k
            _dependency = _shared_state->create_source_dependency(
576
5.44k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.44k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.44k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.44k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
10
        }
584
5.45k
    }
585
586
5.45k
    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.45k
    _rows_returned_counter =
591
5.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.45k
    _blocks_returned_counter =
593
5.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.45k
    _output_block_bytes_counter =
595
5.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.45k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.45k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.45k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.45k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.45k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.45k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.45k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.45k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.45k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.45k
    _memory_used_counter =
606
5.45k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.45k
    _common_profile->add_info_string("IsColocate",
608
5.45k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.45k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.45k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.45k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.45k
    return Status::OK();
613
5.45k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.98k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.98k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.98k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.98k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.98k
    _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
8.98k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.98k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.98k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.98k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.98k
    if constexpr (!is_fake_shared) {
560
8.98k
        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
8.98k
        } 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
8.74k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.74k
            _dependency = _shared_state->create_source_dependency(
576
8.74k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.74k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.74k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.74k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
244
        }
584
8.98k
    }
585
586
8.98k
    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
8.98k
    _rows_returned_counter =
591
8.98k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.98k
    _blocks_returned_counter =
593
8.98k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.98k
    _output_block_bytes_counter =
595
8.98k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.98k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.98k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.98k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.98k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.98k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.98k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.98k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.98k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.98k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.98k
    _memory_used_counter =
606
8.98k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.98k
    _common_profile->add_info_string("IsColocate",
608
8.98k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.98k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.98k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.98k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.98k
    return Status::OK();
613
8.98k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
93.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
93.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
93.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
93.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
93.1k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
93.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
93.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
93.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
93.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
93.1k
    if constexpr (!is_fake_shared) {
560
93.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
93.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
91.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
91.7k
            _dependency = _shared_state->create_source_dependency(
576
91.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
91.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
91.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
91.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.43k
        }
584
93.1k
    }
585
586
93.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
93.1k
    _rows_returned_counter =
591
93.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
93.1k
    _blocks_returned_counter =
593
93.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
93.1k
    _output_block_bytes_counter =
595
93.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
93.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
93.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
93.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
93.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
93.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
93.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
93.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
93.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
93.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
93.1k
    _memory_used_counter =
606
93.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
93.1k
    _common_profile->add_info_string("IsColocate",
608
93.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
93.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
93.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
93.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
93.1k
    return Status::OK();
613
93.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
87.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
87.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
87.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
87.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
87.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
87.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
87.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
87.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
87.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
87.2k
    if constexpr (!is_fake_shared) {
560
87.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
87.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
87.2k
                                    .first.get()
563
87.2k
                                    ->template cast<SharedStateArg>();
564
565
87.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
87.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
87.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
87.2k
    }
585
586
87.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
87.2k
    _rows_returned_counter =
591
87.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
87.2k
    _blocks_returned_counter =
593
87.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
87.2k
    _output_block_bytes_counter =
595
87.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
87.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
87.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
87.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
87.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
87.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
87.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
87.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
87.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
87.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
87.2k
    _memory_used_counter =
606
87.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
87.2k
    _common_profile->add_info_string("IsColocate",
608
87.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
87.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
87.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
87.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
87.2k
    return Status::OK();
613
87.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
262
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
262
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
262
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
262
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
262
    _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
262
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
262
    _operator_profile->add_child(_common_profile.get(), true);
557
262
    _operator_profile->add_child(_custom_profile.get(), true);
558
262
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
262
    if constexpr (!is_fake_shared) {
560
262
        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
262
        } 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
262
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
262
            _dependency = _shared_state->create_source_dependency(
576
262
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
262
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
262
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
262
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
262
    }
585
586
262
    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
262
    _rows_returned_counter =
591
262
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
262
    _blocks_returned_counter =
593
262
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
262
    _output_block_bytes_counter =
595
262
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
262
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
262
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
262
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
262
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
262
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
262
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
262
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
262
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
262
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
262
    _memory_used_counter =
606
262
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
262
    _common_profile->add_info_string("IsColocate",
608
262
                                     std::to_string(_parent->is_colocated_operator()));
609
262
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
262
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
262
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
262
    return Status::OK();
613
262
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
759k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
759k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
759k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
759k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
759k
    _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
759k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
759k
    _operator_profile->add_child(_common_profile.get(), true);
557
759k
    _operator_profile->add_child(_custom_profile.get(), true);
558
759k
    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
759k
    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
759k
    _rows_returned_counter =
591
759k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
759k
    _blocks_returned_counter =
593
759k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
759k
    _output_block_bytes_counter =
595
759k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
759k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
759k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
759k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
759k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
759k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
759k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
759k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
759k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
759k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
759k
    _memory_used_counter =
606
759k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
759k
    _common_profile->add_info_string("IsColocate",
608
759k
                                     std::to_string(_parent->is_colocated_operator()));
609
759k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
759k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
759k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
759k
    return Status::OK();
613
759k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
54.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
54.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
54.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
54.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
54.1k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
54.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
54.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
54.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
54.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
54.1k
    if constexpr (!is_fake_shared) {
560
54.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
54.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
3.64k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.64k
            _dependency = _shared_state->create_source_dependency(
576
3.64k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.64k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.64k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
50.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
50.5k
        }
584
54.1k
    }
585
586
54.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
54.1k
    _rows_returned_counter =
591
54.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
54.1k
    _blocks_returned_counter =
593
54.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
54.1k
    _output_block_bytes_counter =
595
54.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
54.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
54.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
54.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
54.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
54.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
54.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
54.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
54.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
54.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
54.1k
    _memory_used_counter =
606
54.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
54.1k
    _common_profile->add_info_string("IsColocate",
608
54.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
54.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
54.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
54.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
54.1k
    return Status::OK();
613
54.1k
}
_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.42k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.42k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.42k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.42k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.42k
    _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.42k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.42k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.42k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.42k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.42k
    if constexpr (!is_fake_shared) {
560
5.42k
        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.42k
        } 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.38k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.38k
            _dependency = _shared_state->create_source_dependency(
576
5.38k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.38k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.38k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.38k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
41
        }
584
5.42k
    }
585
586
5.42k
    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.42k
    _rows_returned_counter =
591
5.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.42k
    _blocks_returned_counter =
593
5.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.42k
    _output_block_bytes_counter =
595
5.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.42k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.42k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.42k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.42k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.42k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.42k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.42k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.42k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.42k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.42k
    _memory_used_counter =
606
5.42k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.42k
    _common_profile->add_info_string("IsColocate",
608
5.42k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.42k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.42k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.42k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.42k
    return Status::OK();
613
5.42k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
707
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
707
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
707
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
707
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
707
    _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
707
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
707
    _operator_profile->add_child(_common_profile.get(), true);
557
707
    _operator_profile->add_child(_custom_profile.get(), true);
558
707
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
707
    if constexpr (!is_fake_shared) {
560
707
        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
708
        } 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
708
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
708
            _dependency = _shared_state->create_source_dependency(
576
708
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
708
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
708
                    _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
707
    }
585
586
710
    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
707
    _rows_returned_counter =
591
707
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
707
    _blocks_returned_counter =
593
707
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
707
    _output_block_bytes_counter =
595
707
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
707
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
707
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
707
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
707
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
707
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
707
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
707
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
707
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
707
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
707
    _memory_used_counter =
606
707
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
707
    _common_profile->add_info_string("IsColocate",
608
707
                                     std::to_string(_parent->is_colocated_operator()));
609
707
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
707
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
707
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
707
    return Status::OK();
613
707
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.95k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.95k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.95k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.95k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.95k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4.95k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.95k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.95k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.95k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.95k
    if constexpr (!is_fake_shared) {
560
4.95k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4.95k
        } 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.57k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.57k
            _dependency = _shared_state->create_source_dependency(
576
4.57k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.57k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.57k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.57k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
383
        }
584
4.95k
    }
585
586
4.95k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4.95k
    _rows_returned_counter =
591
4.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.95k
    _blocks_returned_counter =
593
4.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.95k
    _output_block_bytes_counter =
595
4.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.95k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.95k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.95k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.95k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.95k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.95k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.95k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.95k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.95k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.95k
    _memory_used_counter =
606
4.95k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.95k
    _common_profile->add_info_string("IsColocate",
608
4.95k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.95k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.95k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.95k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.95k
    return Status::OK();
613
4.95k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
621k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
621k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
621k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
621k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
621k
    _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
621k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
621k
    _operator_profile->add_child(_common_profile.get(), true);
557
621k
    _operator_profile->add_child(_custom_profile.get(), true);
558
621k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
621k
    if constexpr (!is_fake_shared) {
560
621k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
612k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
612k
                                    .first.get()
563
612k
                                    ->template cast<SharedStateArg>();
564
565
612k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
612k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
612k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
612k
        } 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
8.48k
        } else {
580
8.48k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.48k
                DCHECK(false);
582
8.48k
            }
583
8.48k
        }
584
621k
    }
585
586
621k
    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
621k
    _rows_returned_counter =
591
621k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
621k
    _blocks_returned_counter =
593
621k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
621k
    _output_block_bytes_counter =
595
621k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
621k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
621k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
621k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
621k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
621k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
621k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
621k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
621k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
621k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
621k
    _memory_used_counter =
606
621k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
621k
    _common_profile->add_info_string("IsColocate",
608
621k
                                     std::to_string(_parent->is_colocated_operator()));
609
621k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
621k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
621k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
621k
    return Status::OK();
613
621k
}
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
1.92M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.92M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.22M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
300k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
300k
    }
621
1.92M
    if (_parent->has_projection()) {
622
368k
        const auto& projection = *_parent->_projection;
623
368k
        _projections.resize(projection.projections.size());
624
2.30M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.94M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.94M
        }
627
368k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
381k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
13.2k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
210k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
196k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
196k
                        state, _intermediate_projections[i][j]));
633
196k
            }
634
13.2k
        }
635
368k
    }
636
1.92M
    return Status::OK();
637
1.92M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
67.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
67.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
68.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.42k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.42k
    }
621
67.5k
    if (_parent->has_projection()) {
622
67.5k
        const auto& projection = *_parent->_projection;
623
67.5k
        _projections.resize(projection.projections.size());
624
354k
        for (size_t i = 0; i < _projections.size(); i++) {
625
287k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
287k
        }
627
67.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
74.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
7.29k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
170k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
163k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
163k
                        state, _intermediate_projections[i][j]));
633
163k
            }
634
7.29k
        }
635
67.5k
    }
636
67.5k
    return Status::OK();
637
67.5k
}
_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
207k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
207k
    _conjuncts.resize(_parent->_conjuncts.size());
618
207k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
207k
    if (_parent->has_projection()) {
622
79
        const auto& projection = *_parent->_projection;
623
79
        _projections.resize(projection.projections.size());
624
400
        for (size_t i = 0; i < _projections.size(); i++) {
625
321
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
321
        }
627
79
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
79
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
79
    }
636
207k
    return Status::OK();
637
207k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
22
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
22
    _conjuncts.resize(_parent->_conjuncts.size());
618
22
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
22
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
22
    return Status::OK();
637
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.45k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.45k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.53k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
82
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
82
    }
621
5.46k
    if (_parent->has_projection()) {
622
5.46k
        const auto& projection = *_parent->_projection;
623
5.46k
        _projections.resize(projection.projections.size());
624
25.8k
        for (size_t i = 0; i < _projections.size(); i++) {
625
20.3k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
20.3k
        }
627
5.46k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.48k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
25
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
183
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
158
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
158
                        state, _intermediate_projections[i][j]));
633
158
            }
634
25
        }
635
5.46k
    }
636
5.45k
    return Status::OK();
637
5.45k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.02k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.02k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
990
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
990
    }
621
9.02k
    if (_parent->has_projection()) {
622
4.40k
        const auto& projection = *_parent->_projection;
623
4.40k
        _projections.resize(projection.projections.size());
624
18.1k
        for (size_t i = 0; i < _projections.size(); i++) {
625
13.7k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
13.7k
        }
627
4.40k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.49k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
89
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
672
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
583
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
583
                        state, _intermediate_projections[i][j]));
633
583
            }
634
89
        }
635
4.40k
    }
636
9.02k
    return Status::OK();
637
9.02k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
93.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
93.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
95.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
2.15k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
2.15k
    }
621
93.3k
    if (_parent->has_projection()) {
622
30.8k
        const auto& projection = *_parent->_projection;
623
30.8k
        _projections.resize(projection.projections.size());
624
278k
        for (size_t i = 0; i < _projections.size(); i++) {
625
247k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
247k
        }
627
30.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
31.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
203
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.45k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.25k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.25k
                        state, _intermediate_projections[i][j]));
633
1.25k
            }
634
203
        }
635
30.8k
    }
636
93.3k
    return Status::OK();
637
93.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
87.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
87.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
87.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
8
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
8
    }
621
87.3k
    if (_parent->has_projection()) {
622
160
        const auto& projection = *_parent->_projection;
623
160
        _projections.resize(projection.projections.size());
624
677
        for (size_t i = 0; i < _projections.size(); i++) {
625
517
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
517
        }
627
160
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
161
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
1
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3
                        state, _intermediate_projections[i][j]));
633
3
            }
634
1
        }
635
160
    }
636
87.3k
    return Status::OK();
637
87.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
266
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
266
    _conjuncts.resize(_parent->_conjuncts.size());
618
266
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
266
    if (_parent->has_projection()) {
622
252
        const auto& projection = *_parent->_projection;
623
252
        _projections.resize(projection.projections.size());
624
756
        for (size_t i = 0; i < _projections.size(); i++) {
625
504
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
504
        }
627
252
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
252
        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
252
    }
636
266
    return Status::OK();
637
266
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
764k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
764k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.05M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
295k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
295k
    }
621
764k
    if (_parent->has_projection()) {
622
248k
        const auto& projection = *_parent->_projection;
623
248k
        _projections.resize(projection.projections.size());
624
1.51M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.27M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.27M
        }
627
248k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
253k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
5.47k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
34.7k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
29.2k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
29.2k
                        state, _intermediate_projections[i][j]));
633
29.2k
            }
634
5.47k
        }
635
248k
    }
636
764k
    return Status::OK();
637
764k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
54.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
54.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
54.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
54.5k
    if (_parent->has_projection()) {
622
11.4k
        const auto& projection = *_parent->_projection;
623
11.4k
        _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.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
114
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
2.43k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
2.31k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
2.31k
                        state, _intermediate_projections[i][j]));
633
2.31k
            }
634
114
        }
635
11.4k
    }
636
54.5k
    return Status::OK();
637
54.5k
}
_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.41k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.41k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.30k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
888
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
888
    }
621
5.41k
    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.41k
    return Status::OK();
637
5.41k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
711
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
711
    _conjuncts.resize(_parent->_conjuncts.size());
618
711
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
711
    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
711
    return Status::OK();
637
711
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.04k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.04k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.04k
    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.04k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
228
        for (size_t i = 0; i < _projections.size(); i++) {
625
168
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
168
        }
627
60
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
60
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
60
    }
636
5.04k
    return Status::OK();
637
5.04k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
626k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
626k
    _conjuncts.resize(_parent->_conjuncts.size());
618
626k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
626k
    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
626k
    return Status::OK();
637
626k
}
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
9.12k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9.12k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9.12k
    _terminated = true;
645
9.12k
    return Status::OK();
646
9.12k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
625
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
625
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
625
    _terminated = true;
645
625
    return Status::OK();
646
625
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
19
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
19
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
19
    _terminated = true;
645
19
    return Status::OK();
646
19
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
127
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
127
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
127
    _terminated = true;
645
127
    return Status::OK();
646
127
}
_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
22
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
22
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
22
    _terminated = true;
645
22
    return Status::OK();
646
22
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.83k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.83k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.83k
    _terminated = true;
645
6.83k
    return Status::OK();
646
6.83k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
60
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
60
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
60
    _terminated = true;
645
60
    return Status::OK();
646
60
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
252
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
252
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
252
    _terminated = true;
645
252
    return Status::OK();
646
252
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.14k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.14k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.14k
    _terminated = true;
645
1.14k
    return Status::OK();
646
1.14k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
35
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
35
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
35
    _terminated = true;
645
35
    return Status::OK();
646
35
}
647
648
template <typename SharedStateArg>
649
2.16M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.16M
    if (_closed) {
651
235k
        return Status::OK();
652
235k
    }
653
1.92M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.16M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.16M
    }
656
1.92M
    _closed = true;
657
1.92M
    return Status::OK();
658
2.16M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
67.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
67.4k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
67.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
67.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
67.4k
    }
656
67.4k
    _closed = true;
657
67.4k
    return Status::OK();
658
67.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
412k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
412k
    if (_closed) {
651
206k
        return Status::OK();
652
206k
    }
653
205k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
205k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
205k
    }
656
205k
    _closed = true;
657
205k
    return Status::OK();
658
412k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
22
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
22
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
22
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
22
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
22
    }
656
22
    _closed = true;
657
22
    return Status::OK();
658
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.44k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.44k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.44k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.44k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.44k
    }
656
5.44k
    _closed = true;
657
5.44k
    return Status::OK();
658
5.44k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
18.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
18.1k
    if (_closed) {
651
9.15k
        return Status::OK();
652
9.15k
    }
653
8.99k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.99k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.99k
    }
656
8.99k
    _closed = true;
657
8.99k
    return Status::OK();
658
18.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
92.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
92.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
92.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
92.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
92.9k
    }
656
92.9k
    _closed = true;
657
92.9k
    return Status::OK();
658
92.9k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
86.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
86.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
86.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
86.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
86.9k
    }
656
86.9k
    _closed = true;
657
86.9k
    return Status::OK();
658
86.9k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
261
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
261
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
261
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
261
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
261
    }
656
261
    _closed = true;
657
261
    return Status::OK();
658
261
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
779k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
779k
    if (_closed) {
651
14.3k
        return Status::OK();
652
14.3k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
765k
    _closed = true;
657
765k
    return Status::OK();
658
779k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
54.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
54.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
54.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
54.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
54.5k
    }
656
54.5k
    _closed = true;
657
54.5k
    return Status::OK();
658
54.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.38k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.38k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.38k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.38k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.38k
    }
656
5.38k
    _closed = true;
657
5.38k
    return Status::OK();
658
5.38k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.21k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.21k
    if (_closed) {
651
609
        return Status::OK();
652
609
    }
653
606
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
606
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
606
    }
656
606
    _closed = true;
657
606
    return Status::OK();
658
1.21k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.1k
    if (_closed) {
651
5.12k
        return Status::OK();
652
5.12k
    }
653
5.04k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.04k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.04k
    }
656
5.04k
    _closed = true;
657
5.04k
    return Status::OK();
658
10.1k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
627k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
627k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
627k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
627k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
627k
    }
656
627k
    _closed = true;
657
627k
    return Status::OK();
658
627k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
338
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
338
    if (_closed) {
651
178
        return Status::OK();
652
178
    }
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
338
}
659
660
template <typename SharedState>
661
1.65M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.65M
    _operator_profile =
664
1.65M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.65M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.65M
    _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.65M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.65M
    _operator_profile->add_child(_common_profile, true);
673
1.65M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.65M
    _operator_profile->set_metadata(_parent->node_id());
676
1.65M
    _wait_for_finish_dependency_timer =
677
1.65M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.65M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.65M
    if constexpr (!is_fake_shared) {
680
1.19M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.19M
            info.shared_state_map.end()) {
682
348k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
244k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
244k
            }
685
348k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
348k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
348k
                                                  ? 0
688
348k
                                                  : info.task_idx]
689
348k
                                  .get();
690
348k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
842k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
842k
            _shared_state = info.shared_state->template cast<SharedState>();
696
842k
            _dependency = _shared_state->create_sink_dependency(
697
842k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
842k
        }
699
1.19M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.19M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.19M
    }
702
703
1.65M
    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.65M
    _rows_input_counter =
708
1.65M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.65M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.65M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.65M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.65M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.65M
    _memory_used_counter =
714
1.65M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.65M
    _common_profile->add_info_string("IsColocate",
716
1.65M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.65M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.65M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.65M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.65M
    return Status::OK();
721
1.65M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
115k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
115k
    _operator_profile =
664
115k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
115k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
115k
    _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
115k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
115k
    _operator_profile->add_child(_common_profile, true);
673
115k
    _operator_profile->add_child(_custom_profile, true);
674
675
115k
    _operator_profile->set_metadata(_parent->node_id());
676
115k
    _wait_for_finish_dependency_timer =
677
115k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
115k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
115k
    if constexpr (!is_fake_shared) {
680
115k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
115k
            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
17.3k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
17.3k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
17.3k
                                                  ? 0
688
17.3k
                                                  : info.task_idx]
689
17.3k
                                  .get();
690
17.3k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
97.6k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
97.6k
            _shared_state = info.shared_state->template cast<SharedState>();
696
97.6k
            _dependency = _shared_state->create_sink_dependency(
697
97.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
97.6k
        }
699
115k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
115k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
115k
    }
702
703
115k
    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
115k
    _rows_input_counter =
708
115k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
115k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
115k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
115k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
115k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
115k
    _memory_used_counter =
714
115k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
115k
    _common_profile->add_info_string("IsColocate",
716
115k
                                     std::to_string(_parent->is_colocated_operator()));
717
115k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
115k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
115k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
115k
    return Status::OK();
721
115k
}
_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
205k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
205k
    _operator_profile =
664
205k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
205k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
205k
    _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
205k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
205k
    _operator_profile->add_child(_common_profile, true);
673
205k
    _operator_profile->add_child(_custom_profile, true);
674
675
205k
    _operator_profile->set_metadata(_parent->node_id());
676
205k
    _wait_for_finish_dependency_timer =
677
205k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
205k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
205k
    if constexpr (!is_fake_shared) {
680
205k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
205k
            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
205k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
205k
            _shared_state = info.shared_state->template cast<SharedState>();
696
205k
            _dependency = _shared_state->create_sink_dependency(
697
205k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
205k
        }
699
205k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
205k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
205k
    }
702
703
205k
    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
205k
    _rows_input_counter =
708
205k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
205k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
205k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
205k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
205k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
205k
    _memory_used_counter =
714
205k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
205k
    _common_profile->add_info_string("IsColocate",
716
205k
                                     std::to_string(_parent->is_colocated_operator()));
717
205k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
205k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
205k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
205k
    return Status::OK();
721
205k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
29
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
29
    _operator_profile =
664
29
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
29
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
29
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
29
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
29
    _operator_profile->add_child(_common_profile, true);
673
29
    _operator_profile->add_child(_custom_profile, true);
674
675
29
    _operator_profile->set_metadata(_parent->node_id());
676
29
    _wait_for_finish_dependency_timer =
677
29
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
29
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
29
    if constexpr (!is_fake_shared) {
680
29
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
29
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
29
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
29
            _shared_state = info.shared_state->template cast<SharedState>();
696
29
            _dependency = _shared_state->create_sink_dependency(
697
29
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
29
        }
699
29
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
29
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
29
    }
702
703
29
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
29
    _rows_input_counter =
708
29
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
29
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
29
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
29
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
29
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
29
    _memory_used_counter =
714
29
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
29
    _common_profile->add_info_string("IsColocate",
716
29
                                     std::to_string(_parent->is_colocated_operator()));
717
29
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
29
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
29
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
29
    return Status::OK();
721
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.45k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.45k
    _operator_profile =
664
5.45k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.45k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.45k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5.45k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.45k
    _operator_profile->add_child(_common_profile, true);
673
5.45k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.45k
    _operator_profile->set_metadata(_parent->node_id());
676
5.45k
    _wait_for_finish_dependency_timer =
677
5.45k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.45k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.45k
    if constexpr (!is_fake_shared) {
680
5.45k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.45k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5.45k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.45k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.45k
            _dependency = _shared_state->create_sink_dependency(
697
5.45k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.45k
        }
699
5.45k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.45k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.45k
    }
702
703
5.45k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5.45k
    _rows_input_counter =
708
5.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.45k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.45k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.45k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.45k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.45k
    _memory_used_counter =
714
5.45k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.45k
    _common_profile->add_info_string("IsColocate",
716
5.45k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.45k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.45k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.45k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.45k
    return Status::OK();
721
5.45k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.97k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.97k
    _operator_profile =
664
8.97k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.97k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.97k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.97k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.97k
    _operator_profile->add_child(_common_profile, true);
673
8.97k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.97k
    _operator_profile->set_metadata(_parent->node_id());
676
8.97k
    _wait_for_finish_dependency_timer =
677
8.97k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.97k
    if constexpr (!is_fake_shared) {
680
8.97k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.97k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.97k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.97k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.97k
            _dependency = _shared_state->create_sink_dependency(
697
8.97k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.97k
        }
699
8.97k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.97k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.97k
    }
702
703
8.97k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.97k
    _rows_input_counter =
708
8.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.97k
    _memory_used_counter =
714
8.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.97k
    _common_profile->add_info_string("IsColocate",
716
8.97k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.97k
    return Status::OK();
721
8.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
93.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
93.0k
    _operator_profile =
664
93.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
93.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
93.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
93.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
93.0k
    _operator_profile->add_child(_common_profile, true);
673
93.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
93.0k
    _operator_profile->set_metadata(_parent->node_id());
676
93.0k
    _wait_for_finish_dependency_timer =
677
93.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
93.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
93.0k
    if constexpr (!is_fake_shared) {
680
93.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
93.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
93.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
93.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
93.0k
            _dependency = _shared_state->create_sink_dependency(
697
93.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
93.0k
        }
699
93.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
93.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
93.0k
    }
702
703
93.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
93.0k
    _rows_input_counter =
708
93.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
93.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
93.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
93.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
93.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
93.0k
    _memory_used_counter =
714
93.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
93.0k
    _common_profile->add_info_string("IsColocate",
716
93.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
93.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
93.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
93.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
93.0k
    return Status::OK();
721
93.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
87.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
87.2k
    _operator_profile =
664
87.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
87.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
87.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
87.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
87.2k
    _operator_profile->add_child(_common_profile, true);
673
87.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
87.2k
    _operator_profile->set_metadata(_parent->node_id());
676
87.2k
    _wait_for_finish_dependency_timer =
677
87.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
87.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
87.2k
    if constexpr (!is_fake_shared) {
680
87.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
87.3k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
87.3k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
87.3k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
87.3k
                                                  ? 0
688
87.3k
                                                  : info.task_idx]
689
87.3k
                                  .get();
690
87.3k
            _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
87.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
87.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
87.2k
    }
702
703
87.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
87.2k
    _rows_input_counter =
708
87.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
87.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
87.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
87.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
87.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
87.2k
    _memory_used_counter =
714
87.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
87.2k
    _common_profile->add_info_string("IsColocate",
716
87.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
87.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
87.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
87.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
87.2k
    return Status::OK();
721
87.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
272
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
272
    _operator_profile =
664
272
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
272
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
272
    _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
272
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
272
    _operator_profile->add_child(_common_profile, true);
673
272
    _operator_profile->add_child(_custom_profile, true);
674
675
272
    _operator_profile->set_metadata(_parent->node_id());
676
272
    _wait_for_finish_dependency_timer =
677
272
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
272
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
272
    if constexpr (!is_fake_shared) {
680
272
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
272
            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
272
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
272
            _shared_state = info.shared_state->template cast<SharedState>();
696
272
            _dependency = _shared_state->create_sink_dependency(
697
272
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
272
        }
699
272
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
272
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
272
    }
702
703
272
    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
272
    _rows_input_counter =
708
272
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
272
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
272
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
272
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
272
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
272
    _memory_used_counter =
714
272
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
272
    _common_profile->add_info_string("IsColocate",
716
272
                                     std::to_string(_parent->is_colocated_operator()));
717
272
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
272
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
272
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
272
    return Status::OK();
721
272
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
462k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
462k
    _operator_profile =
664
462k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
462k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
462k
    _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
462k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
462k
    _operator_profile->add_child(_common_profile, true);
673
462k
    _operator_profile->add_child(_custom_profile, true);
674
675
462k
    _operator_profile->set_metadata(_parent->node_id());
676
462k
    _wait_for_finish_dependency_timer =
677
462k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
462k
    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
462k
    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
462k
    _rows_input_counter =
708
462k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
462k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
462k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
462k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
462k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
462k
    _memory_used_counter =
714
462k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
462k
    _common_profile->add_info_string("IsColocate",
716
462k
                                     std::to_string(_parent->is_colocated_operator()));
717
462k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
462k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
462k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
462k
    return Status::OK();
721
462k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.13k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.13k
    _operator_profile =
664
8.13k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.13k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.13k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.13k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.13k
    _operator_profile->add_child(_common_profile, true);
673
8.13k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.13k
    _operator_profile->set_metadata(_parent->node_id());
676
8.13k
    _wait_for_finish_dependency_timer =
677
8.13k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.13k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.13k
    if constexpr (!is_fake_shared) {
680
8.13k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.13k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.13k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.13k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.13k
            _dependency = _shared_state->create_sink_dependency(
697
8.13k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.13k
        }
699
8.13k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.13k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.13k
    }
702
703
8.13k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.13k
    _rows_input_counter =
708
8.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.13k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.13k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.13k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.13k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.13k
    _memory_used_counter =
714
8.13k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.13k
    _common_profile->add_info_string("IsColocate",
716
8.13k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.13k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.13k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.13k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.13k
    return Status::OK();
721
8.13k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
711
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
711
    _operator_profile =
664
711
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
711
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
711
    _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
711
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
711
    _operator_profile->add_child(_common_profile, true);
673
711
    _operator_profile->add_child(_custom_profile, true);
674
675
711
    _operator_profile->set_metadata(_parent->node_id());
676
711
    _wait_for_finish_dependency_timer =
677
711
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
711
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
711
    if constexpr (!is_fake_shared) {
680
711
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
711
            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
711
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
711
            _shared_state = info.shared_state->template cast<SharedState>();
696
711
            _dependency = _shared_state->create_sink_dependency(
697
711
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
711
        }
699
711
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
711
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
711
    }
702
703
711
    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
711
    _rows_input_counter =
708
711
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
711
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
711
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
711
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
711
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
711
    _memory_used_counter =
714
711
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
711
    _common_profile->add_info_string("IsColocate",
716
711
                                     std::to_string(_parent->is_colocated_operator()));
717
711
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
711
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
711
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
711
    return Status::OK();
721
711
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.94k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.94k
    _operator_profile =
664
1.94k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.94k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.94k
    _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.94k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.94k
    _operator_profile->add_child(_common_profile, true);
673
1.94k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.94k
    _operator_profile->set_metadata(_parent->node_id());
676
1.94k
    _wait_for_finish_dependency_timer =
677
1.94k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.94k
    if constexpr (!is_fake_shared) {
680
1.94k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.94k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.94k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.94k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.94k
            _dependency = _shared_state->create_sink_dependency(
697
1.94k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.94k
        }
699
1.94k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.94k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.94k
    }
702
703
1.95k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.94k
    _rows_input_counter =
708
1.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.94k
    _memory_used_counter =
714
1.94k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.94k
    _common_profile->add_info_string("IsColocate",
716
1.94k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.94k
    return Status::OK();
721
1.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.2k
    _operator_profile =
664
12.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.2k
    _operator_profile->add_child(_common_profile, true);
673
12.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.2k
    _operator_profile->set_metadata(_parent->node_id());
676
12.2k
    _wait_for_finish_dependency_timer =
677
12.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.2k
    if constexpr (!is_fake_shared) {
680
12.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.2k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.2k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.2k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.2k
            _dependency = _shared_state->create_sink_dependency(
697
12.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.2k
        }
699
12.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.2k
    }
702
703
12.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.2k
    _rows_input_counter =
708
12.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.2k
    _memory_used_counter =
714
12.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.2k
    _common_profile->add_info_string("IsColocate",
716
12.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.2k
    return Status::OK();
721
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
243k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
243k
    _operator_profile =
664
243k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
243k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
243k
    _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
243k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
243k
    _operator_profile->add_child(_common_profile, true);
673
243k
    _operator_profile->add_child(_custom_profile, true);
674
675
243k
    _operator_profile->set_metadata(_parent->node_id());
676
243k
    _wait_for_finish_dependency_timer =
677
243k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
243k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
243k
    if constexpr (!is_fake_shared) {
680
243k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
244k
            info.shared_state_map.end()) {
682
244k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
244k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
244k
            }
685
244k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
244k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
244k
                                                  ? 0
688
244k
                                                  : info.task_idx]
689
244k
                                  .get();
690
244k
            _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
243k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
243k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
243k
    }
702
703
243k
    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
243k
    _rows_input_counter =
708
243k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
243k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
243k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
243k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
243k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
243k
    _memory_used_counter =
714
243k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
243k
    _common_profile->add_info_string("IsColocate",
716
243k
                                     std::to_string(_parent->is_colocated_operator()));
717
243k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
243k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
243k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
243k
    return Status::OK();
721
243k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
408k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
408k
    _operator_profile =
664
408k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
408k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
408k
    _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
408k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
408k
    _operator_profile->add_child(_common_profile, true);
673
408k
    _operator_profile->add_child(_custom_profile, true);
674
675
408k
    _operator_profile->set_metadata(_parent->node_id());
676
408k
    _wait_for_finish_dependency_timer =
677
408k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
408k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
408k
    if constexpr (!is_fake_shared) {
680
408k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
408k
            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
408k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
408k
            _shared_state = info.shared_state->template cast<SharedState>();
696
408k
            _dependency = _shared_state->create_sink_dependency(
697
408k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
408k
        }
699
408k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
408k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
408k
    }
702
703
408k
    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
408k
    _rows_input_counter =
708
408k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
408k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
408k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
408k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
408k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
408k
    _memory_used_counter =
714
408k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
408k
    _common_profile->add_info_string("IsColocate",
716
408k
                                     std::to_string(_parent->is_colocated_operator()));
717
408k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
408k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
408k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
408k
    return Status::OK();
721
408k
}
_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.66M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.66M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.66M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.19M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.19M
    }
731
1.66M
    _closed = true;
732
1.66M
    return Status::OK();
733
1.66M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
115k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
115k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
115k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
115k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
115k
    }
731
115k
    _closed = true;
732
115k
    return Status::OK();
733
115k
}
_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
206k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
206k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
206k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
206k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
206k
    }
731
206k
    _closed = true;
732
206k
    return Status::OK();
733
206k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
20
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
20
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
18
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
18
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
18
    }
731
18
    _closed = true;
732
18
    return Status::OK();
733
20
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.44k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.44k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.44k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.44k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.44k
    }
731
5.44k
    _closed = true;
732
5.44k
    return Status::OK();
733
5.44k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.94k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.94k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.94k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.94k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.94k
    }
731
8.94k
    _closed = true;
732
8.94k
    return Status::OK();
733
8.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
92.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
92.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
92.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
92.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
92.8k
    }
731
92.8k
    _closed = true;
732
92.8k
    return Status::OK();
733
92.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
86.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
86.7k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
86.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
86.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
86.7k
    }
731
86.7k
    _closed = true;
732
86.7k
    return Status::OK();
733
86.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
261
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
261
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
261
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
261
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
261
    }
731
261
    _closed = true;
732
261
    return Status::OK();
733
261
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
467k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
467k
    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
467k
    _closed = true;
732
467k
    return Status::OK();
733
467k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.14k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.14k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.14k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.14k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.14k
    }
731
8.14k
    _closed = true;
732
8.14k
    return Status::OK();
733
8.14k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
605
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
605
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
605
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
605
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
605
    }
731
605
    _closed = true;
732
605
    return Status::OK();
733
605
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.00k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.00k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.00k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.00k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.00k
    }
731
2.00k
    _closed = true;
732
2.00k
    return Status::OK();
733
2.00k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_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_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
245k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
245k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
245k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
245k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
245k
    }
731
245k
    _closed = true;
732
245k
    return Status::OK();
733
245k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
411k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
411k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
411k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
411k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
411k
    }
731
411k
    _closed = true;
732
411k
    return Status::OK();
733
411k
}
_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.77k
                                                          bool* eos) {
738
7.77k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.76k
    return pull(state, block, eos);
740
7.77k
}
_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.73k
                                                          bool* eos) {
738
7.73k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.72k
    return pull(state, block, eos);
740
7.73k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
464k
                                                         bool* eos) {
745
464k
    auto& local_state = get_local_state(state);
746
464k
    if (need_more_input_data(state)) {
747
432k
        local_state._child_block->clear_column_data(
748
432k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
432k
                        .num_materialized_slots());
750
432k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
432k
                state, local_state._child_block.get(), &local_state._child_eos));
752
432k
        *eos = local_state._child_eos;
753
432k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
59.8k
            return Status::OK();
755
59.8k
        }
756
373k
        {
757
373k
            SCOPED_TIMER(local_state.exec_time_counter());
758
373k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
373k
        }
760
373k
    }
761
762
404k
    if (!need_more_input_data(state)) {
763
380k
        SCOPED_TIMER(local_state.exec_time_counter());
764
380k
        bool new_eos = false;
765
380k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
380k
        if (new_eos) {
767
305k
            *eos = true;
768
305k
        } else if (!need_more_input_data(state)) {
769
24.9k
            *eos = false;
770
24.9k
        }
771
380k
    }
772
404k
    return Status::OK();
773
404k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
133k
                                                         bool* eos) {
745
133k
    auto& local_state = get_local_state(state);
746
133k
    if (need_more_input_data(state)) {
747
115k
        local_state._child_block->clear_column_data(
748
115k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
115k
                        .num_materialized_slots());
750
115k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
115k
                state, local_state._child_block.get(), &local_state._child_eos));
752
115k
        *eos = local_state._child_eos;
753
115k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
35.6k
            return Status::OK();
755
35.6k
        }
756
80.1k
        {
757
80.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
80.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
80.1k
        }
760
80.1k
    }
761
762
97.5k
    if (!need_more_input_data(state)) {
763
97.5k
        SCOPED_TIMER(local_state.exec_time_counter());
764
97.5k
        bool new_eos = false;
765
97.5k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
97.5k
        if (new_eos) {
767
43.0k
            *eos = true;
768
54.4k
        } else if (!need_more_input_data(state)) {
769
10.5k
            *eos = false;
770
10.5k
        }
771
97.5k
    }
772
97.5k
    return Status::OK();
773
97.5k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.32k
                                                         bool* eos) {
745
4.32k
    auto& local_state = get_local_state(state);
746
4.32k
    if (need_more_input_data(state)) {
747
2.35k
        local_state._child_block->clear_column_data(
748
2.35k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.35k
                        .num_materialized_slots());
750
2.35k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.35k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.35k
        *eos = local_state._child_eos;
753
2.35k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
489
            return Status::OK();
755
489
        }
756
1.87k
        {
757
1.87k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.87k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.87k
        }
760
1.87k
    }
761
762
3.84k
    if (!need_more_input_data(state)) {
763
3.84k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.84k
        bool new_eos = false;
765
3.84k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.84k
        if (new_eos) {
767
1.19k
            *eos = true;
768
2.65k
        } else if (!need_more_input_data(state)) {
769
1.96k
            *eos = false;
770
1.96k
        }
771
3.84k
    }
772
3.83k
    return Status::OK();
773
3.83k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.88k
                                                         bool* eos) {
745
1.88k
    auto& local_state = get_local_state(state);
746
1.88k
    if (need_more_input_data(state)) {
747
1.88k
        local_state._child_block->clear_column_data(
748
1.88k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.88k
                        .num_materialized_slots());
750
1.88k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.88k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.88k
        *eos = local_state._child_eos;
753
1.88k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
766
            return Status::OK();
755
766
        }
756
1.12k
        {
757
1.12k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.12k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.12k
        }
760
1.12k
    }
761
762
1.12k
    if (!need_more_input_data(state)) {
763
1.12k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.12k
        bool new_eos = false;
765
1.12k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.12k
        if (new_eos) {
767
786
            *eos = true;
768
786
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.12k
    }
772
1.12k
    return Status::OK();
773
1.12k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
16.5k
                                                         bool* eos) {
745
16.5k
    auto& local_state = get_local_state(state);
746
16.5k
    if (need_more_input_data(state)) {
747
16.5k
        local_state._child_block->clear_column_data(
748
16.5k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
16.5k
                        .num_materialized_slots());
750
16.5k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
16.5k
                state, local_state._child_block.get(), &local_state._child_eos));
752
16.5k
        *eos = local_state._child_eos;
753
16.5k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.62k
            return Status::OK();
755
3.62k
        }
756
12.9k
        {
757
12.9k
            SCOPED_TIMER(local_state.exec_time_counter());
758
12.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
12.9k
        }
760
12.9k
    }
761
762
12.9k
    if (!need_more_input_data(state)) {
763
6.85k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.85k
        bool new_eos = false;
765
6.85k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.85k
        if (new_eos) {
767
6.75k
            *eos = true;
768
6.75k
        } else if (!need_more_input_data(state)) {
769
10
            *eos = false;
770
10
        }
771
6.85k
    }
772
12.9k
    return Status::OK();
773
12.9k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
278k
                                                         bool* eos) {
745
278k
    auto& local_state = get_local_state(state);
746
278k
    if (need_more_input_data(state)) {
747
278k
        local_state._child_block->clear_column_data(
748
278k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
278k
                        .num_materialized_slots());
750
278k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
278k
                state, local_state._child_block.get(), &local_state._child_eos));
752
278k
        *eos = local_state._child_eos;
753
278k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
17.2k
            return Status::OK();
755
17.2k
        }
756
261k
        {
757
261k
            SCOPED_TIMER(local_state.exec_time_counter());
758
261k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
261k
        }
760
261k
    }
761
762
261k
    if (!need_more_input_data(state)) {
763
244k
        SCOPED_TIMER(local_state.exec_time_counter());
764
244k
        bool new_eos = false;
765
244k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
244k
        if (new_eos) {
767
243k
            *eos = true;
768
243k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
244k
    }
772
261k
    return Status::OK();
773
261k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.7k
                                                         bool* eos) {
745
22.7k
    auto& local_state = get_local_state(state);
746
22.7k
    if (need_more_input_data(state)) {
747
10.6k
        local_state._child_block->clear_column_data(
748
10.6k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.6k
                        .num_materialized_slots());
750
10.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.6k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.6k
        *eos = local_state._child_eos;
753
10.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.18k
            return Status::OK();
755
1.18k
        }
756
9.49k
        {
757
9.49k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.49k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.49k
        }
760
9.49k
    }
761
762
21.5k
    if (!need_more_input_data(state)) {
763
21.0k
        SCOPED_TIMER(local_state.exec_time_counter());
764
21.0k
        bool new_eos = false;
765
21.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
21.0k
        if (new_eos) {
767
5.42k
            *eos = true;
768
15.6k
        } else if (!need_more_input_data(state)) {
769
12.0k
            *eos = false;
770
12.0k
        }
771
21.0k
    }
772
21.5k
    return Status::OK();
773
21.5k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.01k
                                                         bool* eos) {
745
7.01k
    auto& local_state = get_local_state(state);
746
7.01k
    if (need_more_input_data(state)) {
747
6.65k
        local_state._child_block->clear_column_data(
748
6.65k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.65k
                        .num_materialized_slots());
750
6.65k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.65k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.65k
        *eos = local_state._child_eos;
753
6.65k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
910
            return Status::OK();
755
910
        }
756
5.74k
        {
757
5.74k
            SCOPED_TIMER(local_state.exec_time_counter());
758
5.74k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
5.74k
        }
760
5.74k
    }
761
762
6.10k
    if (!need_more_input_data(state)) {
763
6.10k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.10k
        bool new_eos = false;
765
6.10k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.10k
        if (new_eos) {
767
4.08k
            *eos = true;
768
4.08k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
6.10k
    }
772
6.10k
    return Status::OK();
773
6.10k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
46.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
46.0k
    RETURN_IF_ERROR(Base::init(state, info));
779
46.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
46.0k
                                                         "AsyncWriterDependency", true);
781
46.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
46.0k
                             _finish_dependency));
783
784
46.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
46.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
46.0k
    return Status::OK();
787
46.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
353
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
353
    RETURN_IF_ERROR(Base::init(state, info));
779
353
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
353
                                                         "AsyncWriterDependency", true);
781
353
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
353
                             _finish_dependency));
783
784
353
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
353
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
353
    return Status::OK();
787
353
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
45.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
45.6k
    RETURN_IF_ERROR(Base::init(state, info));
779
45.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
45.6k
                                                         "AsyncWriterDependency", true);
781
45.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
45.6k
                             _finish_dependency));
783
784
45.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
45.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
45.6k
    return Status::OK();
787
45.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
90
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
90
    RETURN_IF_ERROR(Base::init(state, info));
779
90
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
90
                                                         "AsyncWriterDependency", true);
781
90
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
90
                             _finish_dependency));
783
784
90
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
90
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
90
    return Status::OK();
787
90
}
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
46.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
46.9k
    RETURN_IF_ERROR(Base::open(state));
793
46.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
368k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
321k
        RETURN_IF_ERROR(
796
321k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
321k
    }
798
46.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
46.9k
    return Status::OK();
800
46.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
353
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
353
    RETURN_IF_ERROR(Base::open(state));
793
353
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.83k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
353
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
353
    return Status::OK();
800
353
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
46.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
46.5k
    RETURN_IF_ERROR(Base::open(state));
793
46.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
365k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
318k
        RETURN_IF_ERROR(
796
318k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
318k
    }
798
46.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
46.5k
    return Status::OK();
800
46.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
90
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
90
    RETURN_IF_ERROR(Base::open(state));
793
90
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.62k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.53k
        RETURN_IF_ERROR(
796
1.53k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.53k
    }
798
90
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
90
    return Status::OK();
800
90
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
62.7k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
62.7k
    return _writer->sink(block, eos);
806
62.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.56k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.56k
    return _writer->sink(block, eos);
806
1.56k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
61.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
61.0k
    return _writer->sink(block, eos);
806
61.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
90
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
90
    return _writer->sink(block, eos);
806
90
}
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.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
47.0k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
47.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
47.0k
    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.0k
    if (_writer) {
818
47.0k
        Status st = _writer->get_writer_status();
819
47.0k
        if (exec_status.ok()) {
820
47.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
47.0k
                                                       : Status::Cancelled("force close"));
822
47.0k
        } else {
823
68
            _writer->force_close(exec_status);
824
68
        }
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.0k
        RETURN_IF_ERROR(st);
829
47.0k
    }
830
47.0k
    return Base::close(state, exec_status);
831
47.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
341
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
341
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
341
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
341
    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
341
    if (_writer) {
818
341
        Status st = _writer->get_writer_status();
819
341
        if (exec_status.ok()) {
820
341
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
341
                                                       : Status::Cancelled("force close"));
822
341
        } 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
341
        RETURN_IF_ERROR(st);
829
341
    }
830
341
    return Base::close(state, exec_status);
831
341
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
46.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
46.6k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
46.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
46.6k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
46.6k
    if (_writer) {
818
46.6k
        Status st = _writer->get_writer_status();
819
46.6k
        if (exec_status.ok()) {
820
46.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
46.5k
                                                       : Status::Cancelled("force close"));
822
46.5k
        } else {
823
68
            _writer->force_close(exec_status);
824
68
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
46.6k
        RETURN_IF_ERROR(st);
829
46.6k
    }
830
46.5k
    return Base::close(state, exec_status);
831
46.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
90
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
90
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
90
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
90
    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
90
    if (_writer) {
818
90
        Status st = _writer->get_writer_status();
819
90
        if (exec_status.ok()) {
820
90
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
90
                                                       : Status::Cancelled("force close"));
822
90
        } 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
90
        RETURN_IF_ERROR(st);
829
90
    }
830
90
    return Base::close(state, exec_status);
831
90
}
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