Coverage Report

Created: 2026-08-07 19:40

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