Coverage Report

Created: 2026-07-15 07:57

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
430k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
430k
    if (_parent->nereids_id() == -1) {
122
219k
        return fmt::format("(id={})", _parent->node_id());
123
219k
    } else {
124
210k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
210k
    }
126
430k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
30.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
30.2k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
30.2k
    } else {
124
30.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
30.2k
    }
126
30.2k
}
_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
84.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
84.5k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
84.5k
    } else {
124
84.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
84.5k
    }
126
84.5k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
14
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
14
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
14
    } else {
124
14
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
14
    }
126
14
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.64k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.64k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
4.64k
    } else {
124
4.64k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.64k
    }
126
4.64k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
69
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
69
    if (_parent->nereids_id() == -1) {
122
11
        return fmt::format("(id={})", _parent->node_id());
123
58
    } else {
124
58
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
58
    }
126
69
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
74.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
74.3k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
74.2k
    } else {
124
74.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
74.2k
    }
126
74.3k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
61
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
61
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
61
    } else {
124
61
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
61
    }
126
61
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
68.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
68.4k
    if (_parent->nereids_id() == -1) {
122
56.9k
        return fmt::format("(id={})", _parent->node_id());
123
56.9k
    } else {
124
11.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
11.5k
    }
126
68.4k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.92k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.92k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
4.92k
    } else {
124
4.92k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.92k
    }
126
4.92k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
3
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
3
    if (_parent->nereids_id() == -1) {
122
3
        return fmt::format("(id={})", _parent->node_id());
123
3
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
3
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.24k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.24k
    if (_parent->nereids_id() == -1) {
122
6.24k
        return fmt::format("(id={})", _parent->node_id());
123
6.24k
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
6.24k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
102
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
102
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
102
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
102
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
13
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
13
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
13
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
13
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
156k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
156k
    if (_parent->nereids_id() == -1) {
122
156k
        return fmt::format("(id={})", _parent->node_id());
123
156k
    } else {
124
6
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
6
    }
126
156k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
127
128
template <typename SharedStateArg>
129
385k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
385k
    if (_parent->nereids_id() == -1) {
131
142k
        return fmt::format("(id={})", _parent->node_id());
132
243k
    } else {
133
243k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
243k
    }
135
385k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
78.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
78.3k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
78.3k
    } else {
133
78.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
78.3k
    }
135
78.3k
}
_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
84.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
84.5k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
84.5k
    } else {
133
84.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
84.5k
    }
135
84.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
21
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
21
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
21
    } else {
133
21
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
21
    }
135
21
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
4.64k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
4.64k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
4.64k
    } else {
133
4.64k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
4.64k
    }
135
4.64k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
69
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
69
    if (_parent->nereids_id() == -1) {
131
11
        return fmt::format("(id={})", _parent->node_id());
132
58
    } else {
133
58
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
58
    }
135
69
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
74.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
74.3k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
74.2k
    } else {
133
74.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
74.2k
    }
135
74.3k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
71
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
71
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
71
    } else {
133
71
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
71
    }
135
71
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
80
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
80
    if (_parent->nereids_id() == -1) {
131
80
        return fmt::format("(id={})", _parent->node_id());
132
80
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
80
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
1.41k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.41k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
1.41k
    } else {
133
1.41k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1.41k
    }
135
1.41k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
102
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
102
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
102
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
102
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
29
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
29
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
29
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
29
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
40.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
40.9k
    if (_parent->nereids_id() == -1) {
131
40.9k
        return fmt::format("(id={})", _parent->node_id());
132
40.9k
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
40.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
101k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
101k
    if (_parent->nereids_id() == -1) {
131
101k
        return fmt::format("(id={})", _parent->node_id());
132
101k
    } else {
133
38
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
38
    }
135
101k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
3
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
3
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
3
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
3
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
136
137
template <typename SharedStateArg>
138
25.9k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
25.9k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
25.9k
    _terminated = true;
143
25.9k
    return Status::OK();
144
25.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
84
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
84
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
84
    _terminated = true;
143
84
    return Status::OK();
144
84
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.23k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.23k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.23k
    _terminated = true;
143
1.23k
    return Status::OK();
144
1.23k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
138
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
138
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
138
    _terminated = true;
143
138
    return Status::OK();
144
138
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
520
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
520
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
520
    _terminated = true;
143
520
    return Status::OK();
144
520
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
145
146
130k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
130k
    return _child && _child->is_serial_operator() && !is_source()
148
130k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
130k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
130k
}
151
152
6.98k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
6.98k
    if (!_child) {
154
2.81k
        return false;
155
2.81k
    }
156
4.17k
    if (_child->is_serial_operator()) {
157
26
        return true;
158
26
    }
159
4.14k
    const auto child_distribution = _child->required_data_distribution(state);
160
4.14k
    return child_distribution.need_local_exchange() &&
161
4.14k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
4.17k
}
163
164
72.8k
const RowDescriptor& OperatorBase::row_desc() const {
165
72.8k
    return _child->row_desc();
166
72.8k
}
167
168
template <typename SharedStateArg>
169
21.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
21.2k
    fmt::memory_buffer debug_string_buffer;
171
21.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
21.2k
    return fmt::to_string(debug_string_buffer);
173
21.2k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
128
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
128
    fmt::memory_buffer debug_string_buffer;
171
128
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
128
    return fmt::to_string(debug_string_buffer);
173
128
}
_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
32
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
32
    fmt::memory_buffer debug_string_buffer;
171
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
32
    return fmt::to_string(debug_string_buffer);
173
32
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
32
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
32
    fmt::memory_buffer debug_string_buffer;
171
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
32
    return fmt::to_string(debug_string_buffer);
173
32
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
169
20.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
20.9k
    fmt::memory_buffer debug_string_buffer;
171
20.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
20.9k
    return fmt::to_string(debug_string_buffer);
173
20.9k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
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
64
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
170
64
    fmt::memory_buffer debug_string_buffer;
171
64
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
172
64
    return fmt::to_string(debug_string_buffer);
173
64
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
174
175
template <typename SharedStateArg>
176
21.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
21.0k
    fmt::memory_buffer debug_string_buffer;
178
21.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
21.0k
    return fmt::to_string(debug_string_buffer);
180
21.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
32
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
32
    fmt::memory_buffer debug_string_buffer;
178
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
32
    return fmt::to_string(debug_string_buffer);
180
32
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
32
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
32
    fmt::memory_buffer debug_string_buffer;
178
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
32
    return fmt::to_string(debug_string_buffer);
180
32
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
148
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
148
    fmt::memory_buffer debug_string_buffer;
178
148
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
148
    return fmt::to_string(debug_string_buffer);
180
148
}
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
64
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
64
    fmt::memory_buffer debug_string_buffer;
178
64
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
64
    return fmt::to_string(debug_string_buffer);
180
64
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
20.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
20.7k
    fmt::memory_buffer debug_string_buffer;
178
20.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
20.7k
    return fmt::to_string(debug_string_buffer);
180
20.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
181
182
21.2k
std::string OperatorXBase::debug_string(int indentation_level) const {
183
21.2k
    fmt::memory_buffer debug_string_buffer;
184
21.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
185
21.2k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
186
21.2k
                   _is_serial_operator);
187
21.2k
    return fmt::to_string(debug_string_buffer);
188
21.2k
}
189
190
21.2k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
191
21.2k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
192
21.2k
}
193
194
220k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
195
220k
    std::string node_name = print_plan_node_type(tnode.node_type);
196
220k
    _nereids_id = tnode.nereids_id;
197
220k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
198
920
        if (!tnode.__isset.output_tuple_id) {
199
0
            return Status::InternalError("no final output tuple id");
200
0
        }
201
920
        if (tnode.intermediate_output_tuple_id_list.size() !=
202
920
            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
920
    }
210
220k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
211
220k
    _op_name = substr + "_OPERATOR";
212
213
220k
    if (tnode.__isset.vconjunct) {
214
0
        return Status::InternalError("vconjunct is not supported yet");
215
220k
    } else if (tnode.__isset.conjuncts) {
216
200k
        for (const auto& conjunct : tnode.conjuncts) {
217
200k
            VExprContextSPtr context;
218
200k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
219
200k
            _conjuncts.emplace_back(context);
220
200k
        }
221
61.2k
    }
222
223
    // create the projections expr
224
220k
    if (tnode.__isset.projections) {
225
110k
        DCHECK(tnode.__isset.output_tuple_id);
226
110k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
227
110k
    }
228
220k
    if (!tnode.intermediate_projections_list.empty()) {
229
920
        DCHECK(tnode.__isset.projections) << "no final projections";
230
920
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
231
4.29k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
232
4.29k
            VExprContextSPtrs projections;
233
4.29k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
234
4.29k
            _intermediate_projections.push_back(projections);
235
4.29k
        }
236
920
    }
237
220k
    return Status::OK();
238
220k
}
239
240
250k
Status OperatorXBase::prepare(RuntimeState* state) {
241
250k
    for (auto& conjunct : _conjuncts) {
242
200k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
243
200k
    }
244
250k
    if (state->enable_adjust_conjunct_order_by_cost()) {
245
271k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
246
271k
            return a->execute_cost() < b->execute_cost();
247
271k
        });
248
199k
    };
249
250
255k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
251
4.29k
        RETURN_IF_ERROR(
252
4.29k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
253
4.29k
    }
254
250k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
255
256
250k
    if (has_output_row_desc()) {
257
110k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
258
110k
    }
259
260
250k
    for (auto& conjunct : _conjuncts) {
261
200k
        RETURN_IF_ERROR(conjunct->open(state));
262
200k
    }
263
250k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
264
250k
    for (auto& projections : _intermediate_projections) {
265
4.29k
        RETURN_IF_ERROR(VExpr::open(projections, state));
266
4.29k
    }
267
250k
    if (_child && !is_source()) {
268
33.1k
        RETURN_IF_ERROR(_child->prepare(state));
269
33.1k
    }
270
271
250k
    if (VExpr::contains_blockable_function(_conjuncts) ||
272
250k
        VExpr::contains_blockable_function(_projections)) {
273
0
        _blockable = true;
274
0
    }
275
276
250k
    return Status::OK();
277
250k
}
278
279
2.58k
Status OperatorXBase::terminate(RuntimeState* state) {
280
2.58k
    if (_child && !is_source()) {
281
592
        RETURN_IF_ERROR(_child->terminate(state));
282
592
    }
283
2.58k
    auto result = state->get_local_state_result(operator_id());
284
2.58k
    if (!result) {
285
0
        return result.error();
286
0
    }
287
2.58k
    return result.value()->terminate(state);
288
2.58k
}
289
290
1.08M
Status OperatorXBase::close(RuntimeState* state) {
291
1.08M
    if (_child && !is_source()) {
292
64.7k
        RETURN_IF_ERROR(_child->close(state));
293
64.7k
    }
294
1.08M
    auto result = state->get_local_state_result(operator_id());
295
1.08M
    if (!result) {
296
0
        return result.error();
297
0
    }
298
1.08M
    return result.value()->close(state);
299
1.08M
}
300
301
40.4k
void PipelineXLocalStateBase::clear_origin_block() {
302
40.4k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
303
40.4k
}
304
305
99.9k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
306
99.9k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
307
308
99.9k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
309
99.9k
    return Status::OK();
310
99.9k
}
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
40.4k
                                     Block* output_block) const {
319
40.4k
    auto* local_state = state->get_local_state(operator_id());
320
40.4k
    SCOPED_TIMER(local_state->exec_time_counter());
321
40.4k
    SCOPED_TIMER(local_state->_projection_timer);
322
40.4k
    const size_t rows = origin_block->rows();
323
40.4k
    if (rows == 0) {
324
16.7k
        return Status::OK();
325
16.7k
    }
326
23.7k
    Block input_block = *origin_block;
327
328
23.7k
    size_t bytes_usage = 0;
329
23.7k
    ColumnsWithTypeAndName new_columns;
330
23.7k
    for (const auto& projections : local_state->_intermediate_projections) {
331
242
        if (projections.empty()) {
332
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
333
0
                                         node_id());
334
0
        }
335
242
        new_columns.resize(projections.size());
336
2.43k
        for (int i = 0; i < projections.size(); i++) {
337
2.18k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
338
2.18k
            if (new_columns[i].column->size() != rows) {
339
0
                return Status::InternalError(
340
0
                        "intermediate projection result column size {} not equal input rows {}, "
341
0
                        "expr: {}",
342
0
                        new_columns[i].column->size(), rows,
343
0
                        projections[i]->root()->debug_string());
344
0
            }
345
2.18k
        }
346
242
        Block tmp_block {new_columns};
347
242
        bytes_usage += tmp_block.allocated_bytes();
348
242
        input_block.swap(tmp_block);
349
242
    }
350
351
23.7k
    if (input_block.rows() != rows) {
352
0
        return Status::InternalError(
353
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
354
0
                "input_block: {}",
355
0
                input_block.rows(), rows, input_block.dump_structure());
356
0
    }
357
132k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
358
132k
        if (is_column_nullable(*to) && !is_column_nullable(*from)) {
359
0
            if (_keep_origin || !from->is_exclusive()) {
360
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
361
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
362
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
363
0
                bytes_usage += null_column.allocated_bytes();
364
0
            } else {
365
0
                to = make_nullable(from, false)->assert_mutable();
366
0
            }
367
132k
        } else {
368
132k
            if (_keep_origin || !from->is_exclusive()) {
369
132k
                to->insert_range_from(*from, 0, rows);
370
132k
                bytes_usage += from->allocated_bytes();
371
132k
            } else {
372
0
                to = from->assert_mutable();
373
0
            }
374
132k
        }
375
132k
    };
376
377
23.7k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
378
23.7k
            output_block, *_output_row_descriptor);
379
23.7k
    auto& mutable_block = scoped_mutable_block.mutable_block();
380
23.7k
    auto& mutable_columns = mutable_block.mutable_columns();
381
23.7k
    if (rows != 0) {
382
23.7k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
383
155k
        for (int i = 0; i < mutable_columns.size(); ++i) {
384
132k
            ColumnPtr column_ptr;
385
132k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
386
132k
            if (column_ptr->size() != rows) {
387
0
                return Status::InternalError(
388
0
                        "projection result column size {} not equal input rows {}, expr: {}",
389
0
                        column_ptr->size(), rows,
390
0
                        local_state->_projections[i]->root()->debug_string());
391
0
            }
392
132k
            column_ptr = column_ptr->convert_to_full_column_if_const();
393
132k
            bytes_usage += column_ptr->allocated_bytes();
394
132k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
395
132k
        }
396
23.7k
        DCHECK(mutable_block.rows() == rows);
397
23.7k
    }
398
23.7k
    local_state->_estimate_memory_usage += bytes_usage;
399
400
23.7k
    return Status::OK();
401
23.7k
}
402
403
2.16M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
404
2.16M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
405
2.16M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
406
2.16M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
407
2.16M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
408
2.16M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
409
2.16M
            if (_debug_point_count++ % 2 == 0) {
410
2.16M
                return Status::OK();
411
2.16M
            }
412
2.16M
        }
413
2.16M
    });
414
415
2.16M
    Status status;
416
2.16M
    auto* local_state = state->get_local_state(operator_id());
417
2.17M
    Defer defer([&]() {
418
2.17M
        if (status.ok()) {
419
2.17M
            local_state->update_output_block_counters(*block);
420
2.17M
        }
421
2.17M
    });
422
2.16M
    if (_output_row_descriptor) {
423
40.4k
        local_state->clear_origin_block();
424
40.4k
        status = get_block(state, &local_state->_origin_block, eos);
425
40.4k
        if (UNLIKELY(!status.ok())) {
426
0
            return status;
427
0
        }
428
40.4k
        status = do_projections(state, &local_state->_origin_block, block);
429
40.4k
        return status;
430
40.4k
    }
431
2.12M
    status = get_block(state, block, eos);
432
2.12M
    RETURN_IF_ERROR(block->check_type_and_column());
433
2.12M
    return status;
434
2.12M
}
435
436
924k
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
437
924k
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
438
3.09k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
439
3.09k
        *eos = true;
440
3.09k
    }
441
442
924k
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
443
924k
        auto op_name = to_lower(_parent->_op_name);
444
924k
        auto arg_op_name = dp->param<std::string>("op_name");
445
924k
        arg_op_name = to_lower(arg_op_name);
446
447
924k
        if (op_name == arg_op_name) {
448
924k
            *eos = true;
449
924k
        }
450
924k
    });
451
452
924k
    if (auto rows = block->rows()) {
453
241k
        _num_rows_returned += rows;
454
241k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
455
241k
    }
456
924k
}
457
458
25.9k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
459
25.9k
    auto result = state->get_sink_local_state_result();
460
25.9k
    if (!result) {
461
0
        return result.error();
462
0
    }
463
25.9k
    return result.value()->terminate(state);
464
25.9k
}
465
466
21.0k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
467
21.0k
    fmt::memory_buffer debug_string_buffer;
468
469
21.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
470
21.0k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
471
21.0k
    return fmt::to_string(debug_string_buffer);
472
21.0k
}
473
474
21.0k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
475
21.0k
    return state->get_sink_local_state()->debug_string(indentation_level);
476
21.0k
}
477
478
130k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
479
130k
    std::string op_name = "UNKNOWN_SINK";
480
130k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
481
482
130k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
483
130k
        op_name = it->second;
484
130k
    }
485
130k
    _name = op_name + "_OPERATOR";
486
130k
    return Status::OK();
487
130k
}
488
489
135k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
490
135k
    std::string op_name = print_plan_node_type(tnode.node_type);
491
135k
    _nereids_id = tnode.nereids_id;
492
135k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
493
135k
    _name = substr + "_SINK_OPERATOR";
494
135k
    return Status::OK();
495
135k
}
496
497
template <typename LocalStateType>
498
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
499
565k
                                                            LocalSinkStateInfo& info) {
500
565k
    auto local_state = LocalStateType::create_unique(this, state);
501
565k
    RETURN_IF_ERROR(local_state->init(state, info));
502
565k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
565k
    return Status::OK();
504
565k
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
78.3k
                                                            LocalSinkStateInfo& info) {
500
78.3k
    auto local_state = LocalStateType::create_unique(this, state);
501
78.3k
    RETURN_IF_ERROR(local_state->init(state, info));
502
78.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
78.3k
    return Status::OK();
504
78.3k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
77.5k
                                                            LocalSinkStateInfo& info) {
500
77.5k
    auto local_state = LocalStateType::create_unique(this, state);
501
77.5k
    RETURN_IF_ERROR(local_state->init(state, info));
502
77.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
77.5k
    return Status::OK();
504
77.5k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
86
                                                            LocalSinkStateInfo& info) {
500
86
    auto local_state = LocalStateType::create_unique(this, state);
501
86
    RETURN_IF_ERROR(local_state->init(state, info));
502
86
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
86
    return Status::OK();
504
86
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
162
                                                            LocalSinkStateInfo& info) {
500
162
    auto local_state = LocalStateType::create_unique(this, state);
501
162
    RETURN_IF_ERROR(local_state->init(state, info));
502
162
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
162
    return Status::OK();
504
162
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
4.40k
                                                            LocalSinkStateInfo& info) {
500
4.40k
    auto local_state = LocalStateType::create_unique(this, state);
501
4.40k
    RETURN_IF_ERROR(local_state->init(state, info));
502
4.40k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
4.40k
    return Status::OK();
504
4.40k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
9.45k
                                                            LocalSinkStateInfo& info) {
500
9.45k
    auto local_state = LocalStateType::create_unique(this, state);
501
9.45k
    RETURN_IF_ERROR(local_state->init(state, info));
502
9.45k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
9.45k
    return Status::OK();
504
9.45k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
5.16k
                                                            LocalSinkStateInfo& info) {
500
5.16k
    auto local_state = LocalStateType::create_unique(this, state);
501
5.16k
    RETURN_IF_ERROR(local_state->init(state, info));
502
5.16k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
5.16k
    return Status::OK();
504
5.16k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
156
                                                            LocalSinkStateInfo& info) {
500
156
    auto local_state = LocalStateType::create_unique(this, state);
501
156
    RETURN_IF_ERROR(local_state->init(state, info));
502
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
156
    return Status::OK();
504
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
3.40k
                                                            LocalSinkStateInfo& info) {
500
3.40k
    auto local_state = LocalStateType::create_unique(this, state);
501
3.40k
    RETURN_IF_ERROR(local_state->init(state, info));
502
3.40k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
3.40k
    return Status::OK();
504
3.40k
}
_ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
32
                                                            LocalSinkStateInfo& info) {
500
32
    auto local_state = LocalStateType::create_unique(this, state);
501
32
    RETURN_IF_ERROR(local_state->init(state, info));
502
32
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
32
    return Status::OK();
504
32
}
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
192
                                                            LocalSinkStateInfo& info) {
500
192
    auto local_state = LocalStateType::create_unique(this, state);
501
192
    RETURN_IF_ERROR(local_state->init(state, info));
502
192
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
192
    return Status::OK();
504
192
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
640
                                                            LocalSinkStateInfo& info) {
500
640
    auto local_state = LocalStateType::create_unique(this, state);
501
640
    RETURN_IF_ERROR(local_state->init(state, info));
502
640
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
640
    return Status::OK();
504
640
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
58
                                                            LocalSinkStateInfo& info) {
500
58
    auto local_state = LocalStateType::create_unique(this, state);
501
58
    RETURN_IF_ERROR(local_state->init(state, info));
502
58
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
58
    return Status::OK();
504
58
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
80
                                                            LocalSinkStateInfo& info) {
500
80
    auto local_state = LocalStateType::create_unique(this, state);
501
80
    RETURN_IF_ERROR(local_state->init(state, info));
502
80
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
80
    return Status::OK();
504
80
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
84.5k
                                                            LocalSinkStateInfo& info) {
500
84.5k
    auto local_state = LocalStateType::create_unique(this, state);
501
84.5k
    RETURN_IF_ERROR(local_state->init(state, info));
502
84.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
84.5k
    return Status::OK();
504
84.5k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
21
                                                            LocalSinkStateInfo& info) {
500
21
    auto local_state = LocalStateType::create_unique(this, state);
501
21
    RETURN_IF_ERROR(local_state->init(state, info));
502
21
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
21
    return Status::OK();
504
21
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
40.9k
                                                            LocalSinkStateInfo& info) {
500
40.9k
    auto local_state = LocalStateType::create_unique(this, state);
501
40.9k
    RETURN_IF_ERROR(local_state->init(state, info));
502
40.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
40.9k
    return Status::OK();
504
40.9k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
74.2k
                                                            LocalSinkStateInfo& info) {
500
74.2k
    auto local_state = LocalStateType::create_unique(this, state);
501
74.2k
    RETURN_IF_ERROR(local_state->init(state, info));
502
74.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
74.2k
    return Status::OK();
504
74.2k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
71
                                                            LocalSinkStateInfo& info) {
500
71
    auto local_state = LocalStateType::create_unique(this, state);
501
71
    RETURN_IF_ERROR(local_state->init(state, info));
502
71
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
71
    return Status::OK();
504
71
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
177k
                                                            LocalSinkStateInfo& info) {
500
177k
    auto local_state = LocalStateType::create_unique(this, state);
501
177k
    RETURN_IF_ERROR(local_state->init(state, info));
502
177k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
177k
    return Status::OK();
504
177k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
4.64k
                                                            LocalSinkStateInfo& info) {
500
4.64k
    auto local_state = LocalStateType::create_unique(this, state);
501
4.64k
    RETURN_IF_ERROR(local_state->init(state, info));
502
4.64k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
4.64k
    return Status::OK();
504
4.64k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
1.41k
                                                            LocalSinkStateInfo& info) {
500
1.41k
    auto local_state = LocalStateType::create_unique(this, state);
501
1.41k
    RETURN_IF_ERROR(local_state->init(state, info));
502
1.41k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
1.41k
    return Status::OK();
504
1.41k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.08k
                                                            LocalSinkStateInfo& info) {
500
2.08k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.08k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.08k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.08k
    return Status::OK();
504
2.08k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
1
                                                            LocalSinkStateInfo& info) {
500
1
    auto local_state = LocalStateType::create_unique(this, state);
501
1
    RETURN_IF_ERROR(local_state->init(state, info));
502
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
1
    return Status::OK();
504
1
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
54
                                                            LocalSinkStateInfo& info) {
500
54
    auto local_state = LocalStateType::create_unique(this, state);
501
54
    RETURN_IF_ERROR(local_state->init(state, info));
502
54
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
54
    return Status::OK();
504
54
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
505
506
template <typename LocalStateType>
507
515k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
0
                                 LocalExchangeSharedState>) {
510
0
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
0
                                        MultiCastSharedState>) {
513
0
        throw Exception(Status::FatalError("should not reach here!"));
514
515k
    } else {
515
515k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
515k
        ss->id = operator_id();
517
515k
        for (auto& dest : dests_id()) {
518
515k
            ss->related_op_ids.insert(dest);
519
515k
        }
520
515k
        return ss;
521
515k
    }
522
515k
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
72.4k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
72.4k
    } else {
515
72.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
72.4k
        ss->id = operator_id();
517
72.4k
        for (auto& dest : dests_id()) {
518
72.4k
            ss->related_op_ids.insert(dest);
519
72.4k
        }
520
72.4k
        return ss;
521
72.4k
    }
522
72.4k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
77.5k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
77.5k
    } else {
515
77.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
77.5k
        ss->id = operator_id();
517
77.5k
        for (auto& dest : dests_id()) {
518
77.4k
            ss->related_op_ids.insert(dest);
519
77.4k
        }
520
77.5k
        return ss;
521
77.5k
    }
522
77.5k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
86
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
86
    } else {
515
86
        auto ss = LocalStateType::SharedStateType::create_shared();
516
86
        ss->id = operator_id();
517
86
        for (auto& dest : dests_id()) {
518
86
            ss->related_op_ids.insert(dest);
519
86
        }
520
86
        return ss;
521
86
    }
522
86
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
162
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
162
    } else {
515
162
        auto ss = LocalStateType::SharedStateType::create_shared();
516
162
        ss->id = operator_id();
517
162
        for (auto& dest : dests_id()) {
518
162
            ss->related_op_ids.insert(dest);
519
162
        }
520
162
        return ss;
521
162
    }
522
162
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
4.40k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
4.40k
    } else {
515
4.40k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
4.40k
        ss->id = operator_id();
517
4.40k
        for (auto& dest : dests_id()) {
518
4.40k
            ss->related_op_ids.insert(dest);
519
4.40k
        }
520
4.40k
        return ss;
521
4.40k
    }
522
4.40k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
507
9.45k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
9.45k
    } else {
515
9.45k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
9.45k
        ss->id = operator_id();
517
9.45k
        for (auto& dest : dests_id()) {
518
9.45k
            ss->related_op_ids.insert(dest);
519
9.45k
        }
520
9.45k
        return ss;
521
9.45k
    }
522
9.45k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
5.17k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
5.17k
    } else {
515
5.17k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
5.17k
        ss->id = operator_id();
517
5.17k
        for (auto& dest : dests_id()) {
518
5.16k
            ss->related_op_ids.insert(dest);
519
5.16k
        }
520
5.17k
        return ss;
521
5.17k
    }
522
5.17k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
156
    } else {
515
156
        auto ss = LocalStateType::SharedStateType::create_shared();
516
156
        ss->id = operator_id();
517
156
        for (auto& dest : dests_id()) {
518
156
            ss->related_op_ids.insert(dest);
519
156
        }
520
156
        return ss;
521
156
    }
522
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
3.40k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
3.40k
    } else {
515
3.40k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
3.40k
        ss->id = operator_id();
517
3.40k
        for (auto& dest : dests_id()) {
518
3.40k
            ss->related_op_ids.insert(dest);
519
3.40k
        }
520
3.40k
        return ss;
521
3.40k
    }
522
3.40k
}
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
32
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
32
    } else {
515
32
        auto ss = LocalStateType::SharedStateType::create_shared();
516
32
        ss->id = operator_id();
517
32
        for (auto& dest : dests_id()) {
518
32
            ss->related_op_ids.insert(dest);
519
32
        }
520
32
        return ss;
521
32
    }
522
32
}
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
192
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
192
    } else {
515
192
        auto ss = LocalStateType::SharedStateType::create_shared();
516
192
        ss->id = operator_id();
517
192
        for (auto& dest : dests_id()) {
518
192
            ss->related_op_ids.insert(dest);
519
192
        }
520
192
        return ss;
521
192
    }
522
192
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
640
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
640
    } else {
515
640
        auto ss = LocalStateType::SharedStateType::create_shared();
516
640
        ss->id = operator_id();
517
640
        for (auto& dest : dests_id()) {
518
640
            ss->related_op_ids.insert(dest);
519
640
        }
520
640
        return ss;
521
640
    }
522
640
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
69
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
69
    } else {
515
69
        auto ss = LocalStateType::SharedStateType::create_shared();
516
69
        ss->id = operator_id();
517
69
        for (auto& dest : dests_id()) {
518
69
            ss->related_op_ids.insert(dest);
519
69
        }
520
69
        return ss;
521
69
    }
522
69
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
80
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
80
    } else {
515
80
        auto ss = LocalStateType::SharedStateType::create_shared();
516
80
        ss->id = operator_id();
517
80
        for (auto& dest : dests_id()) {
518
80
            ss->related_op_ids.insert(dest);
519
80
        }
520
80
        return ss;
521
80
    }
522
80
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
84.5k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
84.5k
    } else {
515
84.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
84.5k
        ss->id = operator_id();
517
84.5k
        for (auto& dest : dests_id()) {
518
84.5k
            ss->related_op_ids.insert(dest);
519
84.5k
        }
520
84.5k
        return ss;
521
84.5k
    }
522
84.5k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
23
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
23
    } else {
515
23
        auto ss = LocalStateType::SharedStateType::create_shared();
516
23
        ss->id = operator_id();
517
23
        for (auto& dest : dests_id()) {
518
23
            ss->related_op_ids.insert(dest);
519
23
        }
520
23
        return ss;
521
23
    }
522
23
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
74.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
74.3k
    } else {
515
74.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
74.3k
        ss->id = operator_id();
517
74.3k
        for (auto& dest : dests_id()) {
518
74.3k
            ss->related_op_ids.insert(dest);
519
74.3k
        }
520
74.3k
        return ss;
521
74.3k
    }
522
74.3k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
70
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
70
    } else {
515
70
        auto ss = LocalStateType::SharedStateType::create_shared();
516
70
        ss->id = operator_id();
517
70
        for (auto& dest : dests_id()) {
518
70
            ss->related_op_ids.insert(dest);
519
70
        }
520
70
        return ss;
521
70
    }
522
70
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
177k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
177k
    } else {
515
177k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
177k
        ss->id = operator_id();
517
177k
        for (auto& dest : dests_id()) {
518
177k
            ss->related_op_ids.insert(dest);
519
177k
        }
520
177k
        return ss;
521
177k
    }
522
177k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
4.64k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
4.64k
    } else {
515
4.64k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
4.64k
        ss->id = operator_id();
517
4.64k
        for (auto& dest : dests_id()) {
518
4.64k
            ss->related_op_ids.insert(dest);
519
4.64k
        }
520
4.64k
        return ss;
521
4.64k
    }
522
4.64k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
102
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
102
    } else {
515
102
        auto ss = LocalStateType::SharedStateType::create_shared();
516
102
        ss->id = operator_id();
517
102
        for (auto& dest : dests_id()) {
518
102
            ss->related_op_ids.insert(dest);
519
102
        }
520
102
        return ss;
521
102
    }
522
102
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
507
7
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
7
    } else {
515
7
        auto ss = LocalStateType::SharedStateType::create_shared();
516
7
        ss->id = operator_id();
517
7
        for (auto& dest : dests_id()) {
518
7
            ss->related_op_ids.insert(dest);
519
7
        }
520
7
        return ss;
521
7
    }
522
7
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
507
6
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
6
    } else {
515
6
        auto ss = LocalStateType::SharedStateType::create_shared();
516
6
        ss->id = operator_id();
517
6
        for (auto& dest : dests_id()) {
518
6
            ss->related_op_ids.insert(dest);
519
6
        }
520
6
        return ss;
521
6
    }
522
6
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
54
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
508
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
509
                                 LocalExchangeSharedState>) {
510
        return nullptr;
511
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                        MultiCastSharedState>) {
513
        throw Exception(Status::FatalError("should not reach here!"));
514
54
    } else {
515
54
        auto ss = LocalStateType::SharedStateType::create_shared();
516
54
        ss->id = operator_id();
517
54
        for (auto& dest : dests_id()) {
518
54
            ss->related_op_ids.insert(dest);
519
54
        }
520
54
        return ss;
521
54
    }
522
54
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
523
524
template <typename LocalStateType>
525
537k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
537k
    auto local_state = LocalStateType::create_unique(state, this);
527
537k
    RETURN_IF_ERROR(local_state->init(state, info));
528
537k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
537k
    return Status::OK();
530
537k
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
30.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
30.2k
    auto local_state = LocalStateType::create_unique(state, this);
527
30.2k
    RETURN_IF_ERROR(local_state->init(state, info));
528
30.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
30.2k
    return Status::OK();
530
30.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
76.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
76.0k
    auto local_state = LocalStateType::create_unique(state, this);
527
76.0k
    RETURN_IF_ERROR(local_state->init(state, info));
528
76.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
76.0k
    return Status::OK();
530
76.0k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
31.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
31.7k
    auto local_state = LocalStateType::create_unique(state, this);
527
31.7k
    RETURN_IF_ERROR(local_state->init(state, info));
528
31.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
31.7k
    return Status::OK();
530
31.7k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
58
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
58
    auto local_state = LocalStateType::create_unique(state, this);
527
58
    RETURN_IF_ERROR(local_state->init(state, info));
528
58
    state->emplace_local_state(operator_id(), std::move(local_state));
529
58
    return Status::OK();
530
58
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
504
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
504
    auto local_state = LocalStateType::create_unique(state, this);
527
504
    RETURN_IF_ERROR(local_state->init(state, info));
528
504
    state->emplace_local_state(operator_id(), std::move(local_state));
529
504
    return Status::OK();
530
504
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
14
    auto local_state = LocalStateType::create_unique(state, this);
527
14
    RETURN_IF_ERROR(local_state->init(state, info));
528
14
    state->emplace_local_state(operator_id(), std::move(local_state));
529
14
    return Status::OK();
530
14
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
84.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
84.0k
    auto local_state = LocalStateType::create_unique(state, this);
527
84.0k
    RETURN_IF_ERROR(local_state->init(state, info));
528
84.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
84.0k
    return Status::OK();
530
84.0k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
74.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
74.2k
    auto local_state = LocalStateType::create_unique(state, this);
527
74.2k
    RETURN_IF_ERROR(local_state->init(state, info));
528
74.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
74.2k
    return Status::OK();
530
74.2k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
61
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
61
    auto local_state = LocalStateType::create_unique(state, this);
527
61
    RETURN_IF_ERROR(local_state->init(state, info));
528
61
    state->emplace_local_state(operator_id(), std::move(local_state));
529
61
    return Status::OK();
530
61
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
37
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
37
    auto local_state = LocalStateType::create_unique(state, this);
527
37
    RETURN_IF_ERROR(local_state->init(state, info));
528
37
    state->emplace_local_state(operator_id(), std::move(local_state));
529
37
    return Status::OK();
530
37
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
55.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
55.9k
    auto local_state = LocalStateType::create_unique(state, this);
527
55.9k
    RETURN_IF_ERROR(local_state->init(state, info));
528
55.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
55.9k
    return Status::OK();
530
55.9k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
4.64k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
4.64k
    auto local_state = LocalStateType::create_unique(state, this);
527
4.64k
    RETURN_IF_ERROR(local_state->init(state, info));
528
4.64k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
4.64k
    return Status::OK();
530
4.64k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
203
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
203
    auto local_state = LocalStateType::create_unique(state, this);
527
203
    RETURN_IF_ERROR(local_state->init(state, info));
528
203
    state->emplace_local_state(operator_id(), std::move(local_state));
529
203
    return Status::OK();
530
203
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
211
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
211
    auto local_state = LocalStateType::create_unique(state, this);
527
211
    RETURN_IF_ERROR(local_state->init(state, info));
528
211
    state->emplace_local_state(operator_id(), std::move(local_state));
529
211
    return Status::OK();
530
211
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
4.93k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
4.93k
    auto local_state = LocalStateType::create_unique(state, this);
527
4.93k
    RETURN_IF_ERROR(local_state->init(state, info));
528
4.93k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
4.93k
    return Status::OK();
530
4.93k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
6.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
6.24k
    auto local_state = LocalStateType::create_unique(state, this);
527
6.24k
    RETURN_IF_ERROR(local_state->init(state, info));
528
6.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
6.24k
    return Status::OK();
530
6.24k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
202
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
202
    auto local_state = LocalStateType::create_unique(state, this);
527
202
    RETURN_IF_ERROR(local_state->init(state, info));
528
202
    state->emplace_local_state(operator_id(), std::move(local_state));
529
202
    return Status::OK();
530
202
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
650
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
650
    auto local_state = LocalStateType::create_unique(state, this);
527
650
    RETURN_IF_ERROR(local_state->init(state, info));
528
650
    state->emplace_local_state(operator_id(), std::move(local_state));
529
650
    return Status::OK();
530
650
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.00k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.00k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.00k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.00k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.00k
    return Status::OK();
530
2.00k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
156k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
156k
    auto local_state = LocalStateType::create_unique(state, this);
527
156k
    RETURN_IF_ERROR(local_state->init(state, info));
528
156k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
156k
    return Status::OK();
530
156k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
932
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
932
    auto local_state = LocalStateType::create_unique(state, this);
527
932
    RETURN_IF_ERROR(local_state->init(state, info));
528
932
    state->emplace_local_state(operator_id(), std::move(local_state));
529
932
    return Status::OK();
530
932
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.08k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.08k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.08k
    return Status::OK();
530
2.08k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
5.63k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
5.63k
    auto local_state = LocalStateType::create_unique(state, this);
527
5.63k
    RETURN_IF_ERROR(local_state->init(state, info));
528
5.63k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
5.63k
    return Status::OK();
530
5.63k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
512
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
512
    auto local_state = LocalStateType::create_unique(state, this);
527
512
    RETURN_IF_ERROR(local_state->init(state, info));
528
512
    state->emplace_local_state(operator_id(), std::move(local_state));
529
512
    return Status::OK();
530
512
}
531
532
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
533
                                                         RuntimeState* state)
534
565k
        : _parent(parent), _state(state) {}
535
536
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
537
538k
        : _num_rows_returned(0),
538
538k
          _rows_returned_counter(nullptr),
539
538k
          _parent(parent),
540
538k
          _state(state),
541
538k
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
542
543
template <typename SharedStateArg>
544
537k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
537k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
537k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
537k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
537k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
537k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
537k
    _operator_profile->add_child(_common_profile.get(), true);
553
537k
    _operator_profile->add_child(_custom_profile.get(), true);
554
537k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
537k
    if constexpr (!is_fake_shared) {
556
361k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
162k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
162k
                                    .first.get()
559
162k
                                    ->template cast<SharedStateArg>();
560
561
162k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
162k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
162k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
199k
        } else if (info.shared_state) {
565
195k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
0
                DCHECK(false);
567
0
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
195k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
195k
            _dependency = _shared_state->create_source_dependency(
572
195k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
195k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
195k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
195k
        } else {
576
4.26k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
0
                DCHECK(false);
578
0
            }
579
4.26k
        }
580
361k
    }
581
582
537k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
537k
    _rows_returned_counter =
587
537k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
537k
    _blocks_returned_counter =
589
537k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
537k
    _output_block_bytes_counter =
591
537k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
537k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
537k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
537k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
537k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
537k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
537k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
537k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
537k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
537k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
537k
    _memory_used_counter =
602
537k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
537k
    _common_profile->add_info_string("IsColocate",
604
537k
                                     std::to_string(_parent->is_colocated_operator()));
605
537k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
537k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
537k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
537k
    return Status::OK();
609
537k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
30.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
30.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
30.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
30.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
30.2k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
30.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
30.2k
    _operator_profile->add_child(_common_profile.get(), true);
553
30.2k
    _operator_profile->add_child(_custom_profile.get(), true);
554
30.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
30.2k
    if constexpr (!is_fake_shared) {
556
30.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
5.85k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
5.85k
                                    .first.get()
559
5.85k
                                    ->template cast<SharedStateArg>();
560
561
5.85k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
5.85k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
5.85k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
24.4k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
24.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
24.4k
            _dependency = _shared_state->create_source_dependency(
572
24.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
24.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
24.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
24.4k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
30.2k
    }
581
582
30.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
30.2k
    _rows_returned_counter =
587
30.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
30.2k
    _blocks_returned_counter =
589
30.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
30.2k
    _output_block_bytes_counter =
591
30.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
30.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
30.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
30.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
30.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
30.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
30.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
30.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
30.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
30.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
30.2k
    _memory_used_counter =
602
30.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
30.2k
    _common_profile->add_info_string("IsColocate",
604
30.2k
                                     std::to_string(_parent->is_colocated_operator()));
605
30.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
30.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
30.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
30.2k
    return Status::OK();
609
30.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
1
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
1
    _operator_profile->add_child(_common_profile.get(), true);
553
1
    _operator_profile->add_child(_custom_profile.get(), true);
554
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
1
    if constexpr (!is_fake_shared) {
556
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
1
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
1
            _dependency = _shared_state->create_source_dependency(
572
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
1
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
1
    }
581
582
1
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
1
    _rows_returned_counter =
587
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
1
    _blocks_returned_counter =
589
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
1
    _output_block_bytes_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
1
    _memory_used_counter =
602
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
1
    _common_profile->add_info_string("IsColocate",
604
1
                                     std::to_string(_parent->is_colocated_operator()));
605
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
1
    return Status::OK();
609
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
84.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
84.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
84.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
84.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
84.5k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
84.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
84.5k
    _operator_profile->add_child(_common_profile.get(), true);
553
84.5k
    _operator_profile->add_child(_custom_profile.get(), true);
554
84.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
84.5k
    if constexpr (!is_fake_shared) {
556
84.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
84.5k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
84.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
84.5k
            _dependency = _shared_state->create_source_dependency(
572
84.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
84.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
84.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
18.4E
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
18.4E
        }
580
84.5k
    }
581
582
84.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
84.5k
    _rows_returned_counter =
587
84.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
84.5k
    _blocks_returned_counter =
589
84.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
84.5k
    _output_block_bytes_counter =
591
84.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
84.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
84.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
84.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
84.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
84.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
84.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
84.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
84.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
84.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
84.5k
    _memory_used_counter =
602
84.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
84.5k
    _common_profile->add_info_string("IsColocate",
604
84.5k
                                     std::to_string(_parent->is_colocated_operator()));
605
84.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
84.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
84.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
84.5k
    return Status::OK();
609
84.5k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
14
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
14
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
14
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
14
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
14
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
14
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
14
    _operator_profile->add_child(_common_profile.get(), true);
553
14
    _operator_profile->add_child(_custom_profile.get(), true);
554
14
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
14
    if constexpr (!is_fake_shared) {
556
14
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
14
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
14
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
14
            _dependency = _shared_state->create_source_dependency(
572
14
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
14
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
14
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
14
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
14
    }
581
582
14
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
14
    _rows_returned_counter =
587
14
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
14
    _blocks_returned_counter =
589
14
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
14
    _output_block_bytes_counter =
591
14
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
14
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
14
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
14
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
14
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
14
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
14
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
14
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
14
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
14
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
14
    _memory_used_counter =
602
14
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
14
    _common_profile->add_info_string("IsColocate",
604
14
                                     std::to_string(_parent->is_colocated_operator()));
605
14
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
14
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
14
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
14
    return Status::OK();
609
14
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
4.64k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
4.64k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
4.64k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
4.64k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
4.64k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
4.64k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
4.64k
    _operator_profile->add_child(_common_profile.get(), true);
553
4.64k
    _operator_profile->add_child(_custom_profile.get(), true);
554
4.64k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
4.64k
    if constexpr (!is_fake_shared) {
556
4.64k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
4.64k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
4.64k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
4.64k
            _dependency = _shared_state->create_source_dependency(
572
4.64k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
4.64k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
4.64k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
4.64k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
4.64k
    }
581
582
4.64k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
4.64k
    _rows_returned_counter =
587
4.64k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
4.64k
    _blocks_returned_counter =
589
4.64k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
4.64k
    _output_block_bytes_counter =
591
4.64k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
4.64k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
4.64k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
4.64k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
4.64k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.64k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
4.64k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
4.64k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
4.64k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
4.64k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
4.64k
    _memory_used_counter =
602
4.64k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
4.64k
    _common_profile->add_info_string("IsColocate",
604
4.64k
                                     std::to_string(_parent->is_colocated_operator()));
605
4.64k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
4.64k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
4.64k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
4.64k
    return Status::OK();
609
4.64k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
69
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
69
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
69
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
69
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
69
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
69
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
69
    _operator_profile->add_child(_common_profile.get(), true);
553
69
    _operator_profile->add_child(_custom_profile.get(), true);
554
69
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
69
    if constexpr (!is_fake_shared) {
556
69
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
69
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
69
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
69
            _dependency = _shared_state->create_source_dependency(
572
69
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
69
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
69
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
69
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
69
    }
581
582
69
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
69
    _rows_returned_counter =
587
69
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
69
    _blocks_returned_counter =
589
69
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
69
    _output_block_bytes_counter =
591
69
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
69
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
69
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
69
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
69
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
69
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
69
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
69
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
69
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
69
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
69
    _memory_used_counter =
602
69
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
69
    _common_profile->add_info_string("IsColocate",
604
69
                                     std::to_string(_parent->is_colocated_operator()));
605
69
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
69
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
69
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
69
    return Status::OK();
609
69
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
74.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
74.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
74.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
74.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
74.3k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
74.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
74.3k
    _operator_profile->add_child(_common_profile.get(), true);
553
74.3k
    _operator_profile->add_child(_custom_profile.get(), true);
554
74.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
74.3k
    if constexpr (!is_fake_shared) {
556
74.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
74.3k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
74.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
74.3k
            _dependency = _shared_state->create_source_dependency(
572
74.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
74.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
74.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
74.3k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
74.3k
    }
581
582
74.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
74.3k
    _rows_returned_counter =
587
74.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
74.3k
    _blocks_returned_counter =
589
74.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
74.3k
    _output_block_bytes_counter =
591
74.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
74.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
74.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
74.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
74.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
74.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
74.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
74.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
74.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
74.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
74.3k
    _memory_used_counter =
602
74.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
74.3k
    _common_profile->add_info_string("IsColocate",
604
74.3k
                                     std::to_string(_parent->is_colocated_operator()));
605
74.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
74.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
74.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
74.3k
    return Status::OK();
609
74.3k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
61
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
61
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
61
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
61
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
61
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
61
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
61
    _operator_profile->add_child(_common_profile.get(), true);
553
61
    _operator_profile->add_child(_custom_profile.get(), true);
554
61
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
61
    if constexpr (!is_fake_shared) {
556
61
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
61
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
61
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
61
            _dependency = _shared_state->create_source_dependency(
572
61
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
61
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
61
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
61
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
61
    }
581
582
61
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
61
    _rows_returned_counter =
587
61
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
61
    _blocks_returned_counter =
589
61
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
61
    _output_block_bytes_counter =
591
61
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
61
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
61
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
61
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
61
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
61
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
61
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
61
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
61
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
61
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
61
    _memory_used_counter =
602
61
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
61
    _common_profile->add_info_string("IsColocate",
604
61
                                     std::to_string(_parent->is_colocated_operator()));
605
61
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
61
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
61
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
61
    return Status::OK();
609
61
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
176k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
176k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
176k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
176k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
176k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
176k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
176k
    _operator_profile->add_child(_common_profile.get(), true);
553
176k
    _operator_profile->add_child(_custom_profile.get(), true);
554
176k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
    if constexpr (!is_fake_shared) {
556
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
                                    .first.get()
559
                                    ->template cast<SharedStateArg>();
560
561
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
            _dependency = _shared_state->create_source_dependency(
572
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
        }
580
    }
581
582
176k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
176k
    _rows_returned_counter =
587
176k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
176k
    _blocks_returned_counter =
589
176k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
176k
    _output_block_bytes_counter =
591
176k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
176k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
176k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
176k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
176k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
176k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
176k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
176k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
176k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
176k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
176k
    _memory_used_counter =
602
176k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
176k
    _common_profile->add_info_string("IsColocate",
604
176k
                                     std::to_string(_parent->is_colocated_operator()));
605
176k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
176k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
176k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
176k
    return Status::OK();
609
176k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
4.92k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
4.92k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
4.92k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
4.92k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
4.92k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
4.92k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
4.92k
    _operator_profile->add_child(_common_profile.get(), true);
553
4.92k
    _operator_profile->add_child(_custom_profile.get(), true);
554
4.92k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
4.92k
    if constexpr (!is_fake_shared) {
556
4.92k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
4.92k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
659
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
659
            _dependency = _shared_state->create_source_dependency(
572
659
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
659
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
659
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
4.27k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
4.27k
        }
580
4.92k
    }
581
582
4.92k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
4.92k
    _rows_returned_counter =
587
4.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
4.92k
    _blocks_returned_counter =
589
4.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
4.92k
    _output_block_bytes_counter =
591
4.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
4.92k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
4.92k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
4.92k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
4.92k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.92k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
4.92k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
4.92k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
4.92k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
4.92k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
4.92k
    _memory_used_counter =
602
4.92k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
4.92k
    _common_profile->add_info_string("IsColocate",
604
4.92k
                                     std::to_string(_parent->is_colocated_operator()));
605
4.92k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
4.92k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
4.92k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
4.92k
    return Status::OK();
609
4.92k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
3
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
3
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
3
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
3
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
3
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
3
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
3
    _operator_profile->add_child(_common_profile.get(), true);
553
3
    _operator_profile->add_child(_custom_profile.get(), true);
554
3
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
3
    if constexpr (!is_fake_shared) {
556
3
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
3
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
3
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
3
            _dependency = _shared_state->create_source_dependency(
572
3
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
3
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
3
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
3
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
3
    }
581
582
3
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
3
    _rows_returned_counter =
587
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
3
    _blocks_returned_counter =
589
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
3
    _output_block_bytes_counter =
591
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
3
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
3
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
3
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
3
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
3
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
3
    _memory_used_counter =
602
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
3
    _common_profile->add_info_string("IsColocate",
604
3
                                     std::to_string(_parent->is_colocated_operator()));
605
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
3
    return Status::OK();
609
3
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
6.24k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
6.24k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
6.24k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
6.24k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
6.24k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
6.24k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
6.24k
    _operator_profile->add_child(_common_profile.get(), true);
553
6.24k
    _operator_profile->add_child(_custom_profile.get(), true);
554
6.24k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
6.24k
    if constexpr (!is_fake_shared) {
556
6.24k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
6.24k
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
6.24k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
6.24k
            _dependency = _shared_state->create_source_dependency(
572
6.24k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
6.24k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
6.24k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
6.24k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
6.24k
    }
581
582
6.24k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
6.24k
    _rows_returned_counter =
587
6.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
6.24k
    _blocks_returned_counter =
589
6.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
6.24k
    _output_block_bytes_counter =
591
6.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
6.24k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
6.24k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
6.24k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
6.24k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.24k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
6.24k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
6.24k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
6.24k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
6.24k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
6.24k
    _memory_used_counter =
602
6.24k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
6.24k
    _common_profile->add_info_string("IsColocate",
604
6.24k
                                     std::to_string(_parent->is_colocated_operator()));
605
6.24k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
6.24k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
6.24k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
6.24k
    return Status::OK();
609
6.24k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
102
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
102
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
102
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
102
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
102
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
102
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
102
    _operator_profile->add_child(_common_profile.get(), true);
553
102
    _operator_profile->add_child(_custom_profile.get(), true);
554
102
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
102
    if constexpr (!is_fake_shared) {
556
102
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
102
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
102
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
102
            _dependency = _shared_state->create_source_dependency(
572
102
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
102
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
102
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
102
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
102
    }
581
582
102
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
102
    _rows_returned_counter =
587
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
102
    _blocks_returned_counter =
589
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
102
    _output_block_bytes_counter =
591
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
102
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
102
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
102
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
102
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
102
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
102
    _memory_used_counter =
602
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
102
    _common_profile->add_info_string("IsColocate",
604
102
                                     std::to_string(_parent->is_colocated_operator()));
605
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
102
    return Status::OK();
609
102
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
13
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
13
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
13
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
13
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
13
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
13
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
13
    _operator_profile->add_child(_common_profile.get(), true);
553
13
    _operator_profile->add_child(_custom_profile.get(), true);
554
13
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
13
    if constexpr (!is_fake_shared) {
556
13
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
0
                                    .first.get()
559
0
                                    ->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
13
        } else if (info.shared_state) {
565
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
                DCHECK(false);
567
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
13
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
13
            _dependency = _shared_state->create_source_dependency(
572
13
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
13
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
13
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
13
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
13
    }
581
582
13
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
13
    _rows_returned_counter =
587
13
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
13
    _blocks_returned_counter =
589
13
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
13
    _output_block_bytes_counter =
591
13
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
13
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
13
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
13
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
13
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
13
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
13
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
13
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
13
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
13
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
13
    _memory_used_counter =
602
13
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
13
    _common_profile->add_info_string("IsColocate",
604
13
                                     std::to_string(_parent->is_colocated_operator()));
605
13
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
13
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
13
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
13
    return Status::OK();
609
13
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
156k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
156k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
156k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
156k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
156k
    _operator_profile->set_metadata(_parent->node_id());
549
    // indent is false so that source operator will have same
550
    // indentation_level with its parent operator.
551
156k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
156k
    _operator_profile->add_child(_common_profile.get(), true);
553
156k
    _operator_profile->add_child(_custom_profile.get(), true);
554
156k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
156k
    if constexpr (!is_fake_shared) {
556
156k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
156k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
156k
                                    .first.get()
559
156k
                                    ->template cast<SharedStateArg>();
560
561
156k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
156k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
156k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
156k
        } else if (info.shared_state) {
565
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
566
0
                DCHECK(false);
567
0
            }
568
            // For UnionSourceOperator without children, there is no shared state.
569
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
0
            _dependency = _shared_state->create_source_dependency(
572
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
0
        } else {
576
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
0
                DCHECK(false);
578
0
            }
579
0
        }
580
156k
    }
581
582
156k
    if (must_set_shared_state() && _shared_state == nullptr) {
583
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
584
0
    }
585
586
156k
    _rows_returned_counter =
587
156k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
156k
    _blocks_returned_counter =
589
156k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
156k
    _output_block_bytes_counter =
591
156k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
156k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
156k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
156k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
156k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
156k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
156k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
156k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
156k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
156k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
156k
    _memory_used_counter =
602
156k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
156k
    _common_profile->add_info_string("IsColocate",
604
156k
                                     std::to_string(_parent->is_colocated_operator()));
605
156k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
156k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
156k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
156k
    return Status::OK();
609
156k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
610
611
template <typename SharedStateArg>
612
537k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
537k
    _conjuncts.resize(_parent->_conjuncts.size());
614
537k
    _projections.resize(_parent->_projections.size());
615
761k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
224k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
224k
    }
618
1.52M
    for (size_t i = 0; i < _projections.size(); i++) {
619
990k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
990k
    }
621
537k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
542k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
5.20k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
36.9k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
31.7k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
31.7k
                    state, _intermediate_projections[i][j]));
627
31.7k
        }
628
5.20k
    }
629
537k
    return Status::OK();
630
537k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
30.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
30.2k
    _conjuncts.resize(_parent->_conjuncts.size());
614
30.2k
    _projections.resize(_parent->_projections.size());
615
30.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
113k
    for (size_t i = 0; i < _projections.size(); i++) {
619
83.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
83.0k
    }
621
30.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
31.0k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
778
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
9.67k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
8.89k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
8.89k
                    state, _intermediate_projections[i][j]));
627
8.89k
        }
628
778
    }
629
30.2k
    return Status::OK();
630
30.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
3
    _conjuncts.resize(_parent->_conjuncts.size());
614
3
    _projections.resize(_parent->_projections.size());
615
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
3
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
3
    return Status::OK();
630
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
84.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
84.4k
    _conjuncts.resize(_parent->_conjuncts.size());
614
84.4k
    _projections.resize(_parent->_projections.size());
615
84.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
84.5k
    for (size_t i = 0; i < _projections.size(); i++) {
619
72
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
72
    }
621
84.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
84.4k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
84.4k
    return Status::OK();
630
84.4k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
14
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
14
    _conjuncts.resize(_parent->_conjuncts.size());
614
14
    _projections.resize(_parent->_projections.size());
615
14
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
14
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
14
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
14
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
14
    return Status::OK();
630
14
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
4.64k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
4.64k
    _conjuncts.resize(_parent->_conjuncts.size());
614
4.64k
    _projections.resize(_parent->_projections.size());
615
4.64k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
41.2k
    for (size_t i = 0; i < _projections.size(); i++) {
619
36.6k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
36.6k
    }
621
4.64k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
4.76k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
126
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
756
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
630
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
630
                    state, _intermediate_projections[i][j]));
627
630
        }
628
126
    }
629
4.64k
    return Status::OK();
630
4.64k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
69
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
69
    _conjuncts.resize(_parent->_conjuncts.size());
614
69
    _projections.resize(_parent->_projections.size());
615
69
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
157
    for (size_t i = 0; i < _projections.size(); i++) {
619
88
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
88
    }
621
69
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
69
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
69
    return Status::OK();
630
69
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
74.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
74.2k
    _conjuncts.resize(_parent->_conjuncts.size());
614
74.2k
    _projections.resize(_parent->_projections.size());
615
76.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
2.49k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
2.49k
    }
618
132k
    for (size_t i = 0; i < _projections.size(); i++) {
619
58.3k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
58.3k
    }
621
74.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
74.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
114
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
840
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
726
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
726
                    state, _intermediate_projections[i][j]));
627
726
        }
628
114
    }
629
74.2k
    return Status::OK();
630
74.2k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
65
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
65
    _conjuncts.resize(_parent->_conjuncts.size());
614
65
    _projections.resize(_parent->_projections.size());
615
65
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
167
    for (size_t i = 0; i < _projections.size(); i++) {
619
102
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
102
    }
621
65
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
65
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
65
    return Status::OK();
630
65
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
176k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
176k
    _conjuncts.resize(_parent->_conjuncts.size());
614
176k
    _projections.resize(_parent->_projections.size());
615
394k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
218k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
218k
    }
618
977k
    for (size_t i = 0; i < _projections.size(); i++) {
619
800k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
800k
    }
621
176k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
180k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
4.19k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
25.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
21.5k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
21.5k
                    state, _intermediate_projections[i][j]));
627
21.5k
        }
628
4.19k
    }
629
176k
    return Status::OK();
630
176k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
4.93k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
4.93k
    _conjuncts.resize(_parent->_conjuncts.size());
614
4.93k
    _projections.resize(_parent->_projections.size());
615
4.93k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
16.4k
    for (size_t i = 0; i < _projections.size(); i++) {
619
11.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
11.4k
    }
621
4.93k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
4.93k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
4.93k
    return Status::OK();
630
4.93k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
3
    _conjuncts.resize(_parent->_conjuncts.size());
614
3
    _projections.resize(_parent->_projections.size());
615
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
3
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
3
    return Status::OK();
630
3
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
6.24k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
6.24k
    _conjuncts.resize(_parent->_conjuncts.size());
614
6.24k
    _projections.resize(_parent->_projections.size());
615
9.56k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
3.31k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
3.31k
    }
618
6.24k
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
6.24k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
6.24k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
6.24k
    return Status::OK();
630
6.24k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
102
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
102
    _conjuncts.resize(_parent->_conjuncts.size());
614
102
    _projections.resize(_parent->_projections.size());
615
102
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
102
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
102
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
102
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
102
    return Status::OK();
630
102
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
13
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
13
    _conjuncts.resize(_parent->_conjuncts.size());
614
13
    _projections.resize(_parent->_projections.size());
615
13
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
13
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
13
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
13
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
13
    return Status::OK();
630
13
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
156k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
156k
    _conjuncts.resize(_parent->_conjuncts.size());
614
156k
    _projections.resize(_parent->_projections.size());
615
156k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
156k
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
156k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
156k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
0
                    state, _intermediate_projections[i][j]));
627
0
        }
628
0
    }
629
156k
    return Status::OK();
630
156k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
631
632
template <typename SharedStateArg>
633
2.58k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
2.58k
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
2.58k
    _terminated = true;
638
2.58k
    return Status::OK();
639
2.58k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
34
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
34
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
34
    _terminated = true;
638
34
    return Status::OK();
639
34
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
32
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
32
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
32
    _terminated = true;
638
32
    return Status::OK();
639
32
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
16
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
16
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
16
    _terminated = true;
638
16
    return Status::OK();
639
16
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
2.19k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
2.19k
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
2.19k
    _terminated = true;
638
2.19k
    return Status::OK();
639
2.19k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
308
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
308
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
308
    _terminated = true;
638
308
    return Status::OK();
639
308
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
640
641
template <typename SharedStateArg>
642
624k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
624k
    if (_closed) {
644
88.0k
        return Status::OK();
645
88.0k
    }
646
536k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
360k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
360k
    }
649
536k
    _closed = true;
650
536k
    return Status::OK();
651
624k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
30.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
30.2k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
30.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
30.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
30.2k
    }
649
30.2k
    _closed = true;
650
30.2k
    return Status::OK();
651
30.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
4
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
4
    }
649
4
    _closed = true;
650
4
    return Status::OK();
651
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
167k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
167k
    if (_closed) {
644
83.8k
        return Status::OK();
645
83.8k
    }
646
83.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
83.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
83.6k
    }
649
83.6k
    _closed = true;
650
83.6k
    return Status::OK();
651
167k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
14
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
14
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
14
    }
649
14
    _closed = true;
650
14
    return Status::OK();
651
14
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
4.64k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
4.64k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
4.64k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
4.64k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
4.64k
    }
649
4.64k
    _closed = true;
650
4.64k
    return Status::OK();
651
4.64k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
113
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
113
    if (_closed) {
644
54
        return Status::OK();
645
54
    }
646
59
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
59
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
59
    }
649
59
    _closed = true;
650
59
    return Status::OK();
651
113
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
74.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
74.1k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
74.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
74.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
74.1k
    }
649
74.1k
    _closed = true;
650
74.1k
    return Status::OK();
651
74.1k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
60
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
60
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
60
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
60
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
60
    }
649
60
    _closed = true;
650
60
    return Status::OK();
651
60
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
180k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
180k
    if (_closed) {
644
4.13k
        return Status::OK();
645
4.13k
    }
646
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
    }
649
176k
    _closed = true;
650
176k
    return Status::OK();
651
180k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
4.93k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
4.93k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
4.93k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
4.93k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
4.93k
    }
649
4.93k
    _closed = true;
650
4.93k
    return Status::OK();
651
4.93k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
6.24k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
6.24k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
6.24k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
6.24k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
6.24k
    }
649
6.24k
    _closed = true;
650
6.24k
    return Status::OK();
651
6.24k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
156k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
156k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
156k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
156k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
156k
    }
649
156k
    _closed = true;
650
156k
    return Status::OK();
651
156k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
652
653
template <typename SharedState>
654
565k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
565k
    _operator_profile =
657
565k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
565k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
565k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
565k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
565k
    _operator_profile->add_child(_common_profile, true);
666
565k
    _operator_profile->add_child(_custom_profile, true);
667
668
565k
    _operator_profile->set_metadata(_parent->node_id());
669
565k
    _wait_for_finish_dependency_timer =
670
565k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
565k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
565k
    if constexpr (!is_fake_shared) {
673
387k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
387k
            info.shared_state_map.end()) {
675
46.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
40.9k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
40.9k
            }
678
46.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
46.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
46.7k
                                                  ? 0
681
46.7k
                                                  : info.task_idx]
682
46.7k
                                  .get();
683
46.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
340k
        } else {
685
340k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
0
                DCHECK(false);
687
0
            }
688
340k
            _shared_state = info.shared_state->template cast<SharedState>();
689
340k
            _dependency = _shared_state->create_sink_dependency(
690
340k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
340k
        }
692
387k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
387k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
387k
    }
695
696
565k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
565k
    _rows_input_counter =
701
565k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
565k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
565k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
565k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
565k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
565k
    _memory_used_counter =
707
565k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
565k
    _common_profile->add_info_string("IsColocate",
709
565k
                                     std::to_string(_parent->is_colocated_operator()));
710
565k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
565k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
565k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
565k
    return Status::OK();
714
565k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
78.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
78.3k
    _operator_profile =
657
78.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
78.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
78.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
78.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
78.3k
    _operator_profile->add_child(_common_profile, true);
666
78.3k
    _operator_profile->add_child(_custom_profile, true);
667
668
78.3k
    _operator_profile->set_metadata(_parent->node_id());
669
78.3k
    _wait_for_finish_dependency_timer =
670
78.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
78.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
78.3k
    if constexpr (!is_fake_shared) {
673
78.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
78.3k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
5.85k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
5.85k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
5.85k
                                                  ? 0
681
5.85k
                                                  : info.task_idx]
682
5.85k
                                  .get();
683
5.85k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
72.4k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
72.4k
            _shared_state = info.shared_state->template cast<SharedState>();
689
72.4k
            _dependency = _shared_state->create_sink_dependency(
690
72.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
72.4k
        }
692
78.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
78.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
78.3k
    }
695
696
78.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
78.3k
    _rows_input_counter =
701
78.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
78.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
78.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
78.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
78.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
78.3k
    _memory_used_counter =
707
78.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
78.3k
    _common_profile->add_info_string("IsColocate",
709
78.3k
                                     std::to_string(_parent->is_colocated_operator()));
710
78.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
78.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
78.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
78.3k
    return Status::OK();
714
78.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
2
    _operator_profile =
657
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
2
    _operator_profile->add_child(_common_profile, true);
666
2
    _operator_profile->add_child(_custom_profile, true);
667
668
2
    _operator_profile->set_metadata(_parent->node_id());
669
2
    _wait_for_finish_dependency_timer =
670
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
2
    if constexpr (!is_fake_shared) {
673
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
2
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
2
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
2
            _shared_state = info.shared_state->template cast<SharedState>();
689
2
            _dependency = _shared_state->create_sink_dependency(
690
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
2
        }
692
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
2
    }
695
696
2
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
2
    _rows_input_counter =
701
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
2
    _memory_used_counter =
707
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
2
    _common_profile->add_info_string("IsColocate",
709
2
                                     std::to_string(_parent->is_colocated_operator()));
710
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
2
    return Status::OK();
714
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
84.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
84.5k
    _operator_profile =
657
84.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
84.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
84.5k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
84.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
84.5k
    _operator_profile->add_child(_common_profile, true);
666
84.5k
    _operator_profile->add_child(_custom_profile, true);
667
668
84.5k
    _operator_profile->set_metadata(_parent->node_id());
669
84.5k
    _wait_for_finish_dependency_timer =
670
84.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
84.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
84.5k
    if constexpr (!is_fake_shared) {
673
84.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
84.5k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
84.5k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
84.5k
            _shared_state = info.shared_state->template cast<SharedState>();
689
84.5k
            _dependency = _shared_state->create_sink_dependency(
690
84.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
84.5k
        }
692
84.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
84.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
84.5k
    }
695
696
84.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
84.5k
    _rows_input_counter =
701
84.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
84.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
84.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
84.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
84.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
84.5k
    _memory_used_counter =
707
84.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
84.5k
    _common_profile->add_info_string("IsColocate",
709
84.5k
                                     std::to_string(_parent->is_colocated_operator()));
710
84.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
84.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
84.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
84.5k
    return Status::OK();
714
84.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
21
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
21
    _operator_profile =
657
21
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
21
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
21
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
21
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
21
    _operator_profile->add_child(_common_profile, true);
666
21
    _operator_profile->add_child(_custom_profile, true);
667
668
21
    _operator_profile->set_metadata(_parent->node_id());
669
21
    _wait_for_finish_dependency_timer =
670
21
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
21
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
21
    if constexpr (!is_fake_shared) {
673
21
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
21
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
21
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
21
            _shared_state = info.shared_state->template cast<SharedState>();
689
21
            _dependency = _shared_state->create_sink_dependency(
690
21
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
21
        }
692
21
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
21
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
21
    }
695
696
21
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
21
    _rows_input_counter =
701
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
21
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
21
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
21
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
21
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
21
    _memory_used_counter =
707
21
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
21
    _common_profile->add_info_string("IsColocate",
709
21
                                     std::to_string(_parent->is_colocated_operator()));
710
21
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
21
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
21
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
21
    return Status::OK();
714
21
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
4.64k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
4.64k
    _operator_profile =
657
4.64k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
4.64k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
4.64k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
4.64k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
4.64k
    _operator_profile->add_child(_common_profile, true);
666
4.64k
    _operator_profile->add_child(_custom_profile, true);
667
668
4.64k
    _operator_profile->set_metadata(_parent->node_id());
669
4.64k
    _wait_for_finish_dependency_timer =
670
4.64k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
4.64k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
4.64k
    if constexpr (!is_fake_shared) {
673
4.64k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
4.64k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
4.64k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
4.64k
            _shared_state = info.shared_state->template cast<SharedState>();
689
4.64k
            _dependency = _shared_state->create_sink_dependency(
690
4.64k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
4.64k
        }
692
4.64k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
4.64k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
4.64k
    }
695
696
4.64k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
4.64k
    _rows_input_counter =
701
4.64k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
4.64k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
4.64k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
4.64k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
4.64k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
4.64k
    _memory_used_counter =
707
4.64k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
4.64k
    _common_profile->add_info_string("IsColocate",
709
4.64k
                                     std::to_string(_parent->is_colocated_operator()));
710
4.64k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
4.64k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
4.64k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
4.64k
    return Status::OK();
714
4.64k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
69
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
69
    _operator_profile =
657
69
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
69
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
69
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
69
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
69
    _operator_profile->add_child(_common_profile, true);
666
69
    _operator_profile->add_child(_custom_profile, true);
667
668
69
    _operator_profile->set_metadata(_parent->node_id());
669
69
    _wait_for_finish_dependency_timer =
670
69
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
69
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
69
    if constexpr (!is_fake_shared) {
673
69
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
69
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
69
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
69
            _shared_state = info.shared_state->template cast<SharedState>();
689
69
            _dependency = _shared_state->create_sink_dependency(
690
69
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
69
        }
692
69
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
69
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
69
    }
695
696
69
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
69
    _rows_input_counter =
701
69
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
69
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
69
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
69
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
69
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
69
    _memory_used_counter =
707
69
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
69
    _common_profile->add_info_string("IsColocate",
709
69
                                     std::to_string(_parent->is_colocated_operator()));
710
69
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
69
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
69
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
69
    return Status::OK();
714
69
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
74.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
74.3k
    _operator_profile =
657
74.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
74.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
74.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
74.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
74.3k
    _operator_profile->add_child(_common_profile, true);
666
74.3k
    _operator_profile->add_child(_custom_profile, true);
667
668
74.3k
    _operator_profile->set_metadata(_parent->node_id());
669
74.3k
    _wait_for_finish_dependency_timer =
670
74.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
74.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
74.3k
    if constexpr (!is_fake_shared) {
673
74.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
74.3k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
74.3k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
74.3k
            _shared_state = info.shared_state->template cast<SharedState>();
689
74.3k
            _dependency = _shared_state->create_sink_dependency(
690
74.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
74.3k
        }
692
74.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
74.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
74.3k
    }
695
696
74.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
74.3k
    _rows_input_counter =
701
74.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
74.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
74.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
74.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
74.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
74.3k
    _memory_used_counter =
707
74.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
74.3k
    _common_profile->add_info_string("IsColocate",
709
74.3k
                                     std::to_string(_parent->is_colocated_operator()));
710
74.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
74.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
74.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
74.3k
    return Status::OK();
714
74.3k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
71
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
71
    _operator_profile =
657
71
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
71
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
71
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
71
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
71
    _operator_profile->add_child(_common_profile, true);
666
71
    _operator_profile->add_child(_custom_profile, true);
667
668
71
    _operator_profile->set_metadata(_parent->node_id());
669
71
    _wait_for_finish_dependency_timer =
670
71
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
71
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
71
    if constexpr (!is_fake_shared) {
673
71
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
71
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
71
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
71
            _shared_state = info.shared_state->template cast<SharedState>();
689
71
            _dependency = _shared_state->create_sink_dependency(
690
71
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
71
        }
692
71
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
71
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
71
    }
695
696
71
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
71
    _rows_input_counter =
701
71
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
71
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
71
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
71
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
71
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
71
    _memory_used_counter =
707
71
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
71
    _common_profile->add_info_string("IsColocate",
709
71
                                     std::to_string(_parent->is_colocated_operator()));
710
71
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
71
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
71
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
71
    return Status::OK();
714
71
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
177k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
177k
    _operator_profile =
657
177k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
177k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
177k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
177k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
177k
    _operator_profile->add_child(_common_profile, true);
666
177k
    _operator_profile->add_child(_custom_profile, true);
667
668
177k
    _operator_profile->set_metadata(_parent->node_id());
669
177k
    _wait_for_finish_dependency_timer =
670
177k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
177k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
    if constexpr (!is_fake_shared) {
673
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
                                                  ? 0
681
                                                  : info.task_idx]
682
                                  .get();
683
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
            _shared_state = info.shared_state->template cast<SharedState>();
689
            _dependency = _shared_state->create_sink_dependency(
690
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
        }
692
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
    }
695
696
177k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
177k
    _rows_input_counter =
701
177k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
177k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
177k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
177k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
177k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
177k
    _memory_used_counter =
707
177k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
177k
    _common_profile->add_info_string("IsColocate",
709
177k
                                     std::to_string(_parent->is_colocated_operator()));
710
177k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
177k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
177k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
177k
    return Status::OK();
714
177k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
1.41k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
1.41k
    _operator_profile =
657
1.41k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
1.41k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
1.41k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
1.41k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
1.41k
    _operator_profile->add_child(_common_profile, true);
666
1.41k
    _operator_profile->add_child(_custom_profile, true);
667
668
1.41k
    _operator_profile->set_metadata(_parent->node_id());
669
1.41k
    _wait_for_finish_dependency_timer =
670
1.41k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
1.41k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
1.41k
    if constexpr (!is_fake_shared) {
673
1.41k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
1.41k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
1.41k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
1.41k
            _shared_state = info.shared_state->template cast<SharedState>();
689
1.41k
            _dependency = _shared_state->create_sink_dependency(
690
1.41k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
1.41k
        }
692
1.41k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
1.41k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
1.41k
    }
695
696
1.41k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
1.41k
    _rows_input_counter =
701
1.41k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
1.41k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
1.41k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
1.41k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
1.41k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
1.41k
    _memory_used_counter =
707
1.41k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
1.41k
    _common_profile->add_info_string("IsColocate",
709
1.41k
                                     std::to_string(_parent->is_colocated_operator()));
710
1.41k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
1.41k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
1.41k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
1.41k
    return Status::OK();
714
1.41k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
102
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
102
    _operator_profile =
657
102
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
102
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
102
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
102
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
102
    _operator_profile->add_child(_common_profile, true);
666
102
    _operator_profile->add_child(_custom_profile, true);
667
668
102
    _operator_profile->set_metadata(_parent->node_id());
669
102
    _wait_for_finish_dependency_timer =
670
102
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
102
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
102
    if constexpr (!is_fake_shared) {
673
102
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
102
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
102
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
102
            _shared_state = info.shared_state->template cast<SharedState>();
689
102
            _dependency = _shared_state->create_sink_dependency(
690
102
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
102
        }
692
102
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
102
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
102
    }
695
696
102
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
102
    _rows_input_counter =
701
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
102
    _memory_used_counter =
707
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
102
    _common_profile->add_info_string("IsColocate",
709
102
                                     std::to_string(_parent->is_colocated_operator()));
710
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
102
    return Status::OK();
714
102
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
2.08k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
2.08k
    _operator_profile =
657
2.08k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
2.08k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
2.08k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
2.08k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
2.08k
    _operator_profile->add_child(_common_profile, true);
666
2.08k
    _operator_profile->add_child(_custom_profile, true);
667
668
2.08k
    _operator_profile->set_metadata(_parent->node_id());
669
2.08k
    _wait_for_finish_dependency_timer =
670
2.08k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
2.08k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
2.08k
    if constexpr (!is_fake_shared) {
673
2.08k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
2.08k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
2.08k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
2.08k
            _shared_state = info.shared_state->template cast<SharedState>();
689
2.08k
            _dependency = _shared_state->create_sink_dependency(
690
2.08k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
2.08k
        }
692
2.08k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
2.08k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
2.08k
    }
695
696
2.08k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
2.08k
    _rows_input_counter =
701
2.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
2.08k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
2.08k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
2.08k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
2.08k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
2.08k
    _memory_used_counter =
707
2.08k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
2.08k
    _common_profile->add_info_string("IsColocate",
709
2.08k
                                     std::to_string(_parent->is_colocated_operator()));
710
2.08k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
2.08k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
2.08k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
2.08k
    return Status::OK();
714
2.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
29
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
29
    _operator_profile =
657
29
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
29
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
29
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
29
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
29
    _operator_profile->add_child(_common_profile, true);
666
29
    _operator_profile->add_child(_custom_profile, true);
667
668
29
    _operator_profile->set_metadata(_parent->node_id());
669
29
    _wait_for_finish_dependency_timer =
670
29
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
29
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
29
    if constexpr (!is_fake_shared) {
673
29
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
29
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
29
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
29
            _shared_state = info.shared_state->template cast<SharedState>();
689
29
            _dependency = _shared_state->create_sink_dependency(
690
29
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
29
        }
692
29
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
29
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
29
    }
695
696
29
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
29
    _rows_input_counter =
701
29
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
29
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
29
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
29
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
29
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
29
    _memory_used_counter =
707
29
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
29
    _common_profile->add_info_string("IsColocate",
709
29
                                     std::to_string(_parent->is_colocated_operator()));
710
29
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
29
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
29
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
29
    return Status::OK();
714
29
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
40.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
40.9k
    _operator_profile =
657
40.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
40.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
40.9k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
40.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
40.9k
    _operator_profile->add_child(_common_profile, true);
666
40.9k
    _operator_profile->add_child(_custom_profile, true);
667
668
40.9k
    _operator_profile->set_metadata(_parent->node_id());
669
40.9k
    _wait_for_finish_dependency_timer =
670
40.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
40.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
40.9k
    if constexpr (!is_fake_shared) {
673
40.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
40.9k
            info.shared_state_map.end()) {
675
40.9k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
40.9k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
40.9k
            }
678
40.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
40.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
40.9k
                                                  ? 0
681
40.9k
                                                  : info.task_idx]
682
40.9k
                                  .get();
683
40.9k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
40.9k
        } else {
685
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
0
                DCHECK(false);
687
0
            }
688
0
            _shared_state = info.shared_state->template cast<SharedState>();
689
0
            _dependency = _shared_state->create_sink_dependency(
690
0
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
0
        }
692
40.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
40.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
40.9k
    }
695
696
40.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
40.9k
    _rows_input_counter =
701
40.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
40.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
40.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
40.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
40.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
40.9k
    _memory_used_counter =
707
40.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
40.9k
    _common_profile->add_info_string("IsColocate",
709
40.9k
                                     std::to_string(_parent->is_colocated_operator()));
710
40.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
40.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
40.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
40.9k
    return Status::OK();
714
40.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
101k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
101k
    _operator_profile =
657
101k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
101k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
101k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
101k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
101k
    _operator_profile->add_child(_common_profile, true);
666
101k
    _operator_profile->add_child(_custom_profile, true);
667
668
101k
    _operator_profile->set_metadata(_parent->node_id());
669
101k
    _wait_for_finish_dependency_timer =
670
101k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
101k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
101k
    if constexpr (!is_fake_shared) {
673
101k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
101k
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
101k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
101k
            _shared_state = info.shared_state->template cast<SharedState>();
689
101k
            _dependency = _shared_state->create_sink_dependency(
690
101k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
101k
        }
692
101k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
101k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
101k
    }
695
696
101k
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
101k
    _rows_input_counter =
701
101k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
101k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
101k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
101k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
101k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
101k
    _memory_used_counter =
707
101k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
101k
    _common_profile->add_info_string("IsColocate",
709
101k
                                     std::to_string(_parent->is_colocated_operator()));
710
101k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
101k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
101k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
101k
    return Status::OK();
714
101k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
3
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
3
    _operator_profile =
657
3
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
3
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
3
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
660
661
    // indentation is true
662
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
663
    // So we should set the indentation to true.
664
3
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
3
    _operator_profile->add_child(_common_profile, true);
666
3
    _operator_profile->add_child(_custom_profile, true);
667
668
3
    _operator_profile->set_metadata(_parent->node_id());
669
3
    _wait_for_finish_dependency_timer =
670
3
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
3
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
3
    if constexpr (!is_fake_shared) {
673
3
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
3
            info.shared_state_map.end()) {
675
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
            }
678
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
0
                                                  ? 0
681
0
                                                  : info.task_idx]
682
0
                                  .get();
683
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
3
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
3
            _shared_state = info.shared_state->template cast<SharedState>();
689
3
            _dependency = _shared_state->create_sink_dependency(
690
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
3
        }
692
3
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
3
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
3
    }
695
696
3
    if (must_set_shared_state() && _shared_state == nullptr) {
697
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
698
0
    }
699
700
3
    _rows_input_counter =
701
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
3
    _memory_used_counter =
707
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
3
    _common_profile->add_info_string("IsColocate",
709
3
                                     std::to_string(_parent->is_colocated_operator()));
710
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
3
    return Status::OK();
714
3
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
715
716
template <typename SharedState>
717
564k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
564k
    if (_closed) {
719
2
        return Status::OK();
720
2
    }
721
564k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
387k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
387k
    }
724
564k
    _closed = true;
725
564k
    return Status::OK();
726
564k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
78.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
78.2k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
78.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
78.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
78.2k
    }
724
78.2k
    _closed = true;
725
78.2k
    return Status::OK();
726
78.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
1
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
1
    }
724
1
    _closed = true;
725
1
    return Status::OK();
726
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
84.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
84.3k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
84.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
84.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
84.3k
    }
724
84.3k
    _closed = true;
725
84.3k
    return Status::OK();
726
84.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
12
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
12
    if (_closed) {
719
2
        return Status::OK();
720
2
    }
721
10
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
10
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
10
    }
724
10
    _closed = true;
725
10
    return Status::OK();
726
12
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
4.64k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
4.64k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
4.64k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
4.64k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
4.64k
    }
724
4.64k
    _closed = true;
725
4.64k
    return Status::OK();
726
4.64k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
59
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
59
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
59
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
59
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
59
    }
724
59
    _closed = true;
725
59
    return Status::OK();
726
59
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
73.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
73.9k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
73.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
73.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
73.9k
    }
724
73.9k
    _closed = true;
725
73.9k
    return Status::OK();
726
73.9k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
60
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
60
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
60
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
60
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
60
    }
724
60
    _closed = true;
725
60
    return Status::OK();
726
60
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
177k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
177k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
    }
724
177k
    _closed = true;
725
177k
    return Status::OK();
726
177k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
1.41k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
1.41k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
1.41k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
1.41k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
1.41k
    }
724
1.41k
    _closed = true;
725
1.41k
    return Status::OK();
726
1.41k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
2.08k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
2.08k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
2.08k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
2.08k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
2.08k
    }
724
2.08k
    _closed = true;
725
2.08k
    return Status::OK();
726
2.08k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
40.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
40.9k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
40.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
40.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
40.9k
    }
724
40.9k
    _closed = true;
725
40.9k
    return Status::OK();
726
40.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
101k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
101k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
101k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
101k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
101k
    }
724
101k
    _closed = true;
725
101k
    return Status::OK();
726
101k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
727
728
template <typename LocalStateType>
729
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
730
9.83k
                                                          bool* eos) {
731
9.83k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
9.82k
    return pull(state, block, eos);
733
9.83k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
730
404
                                                          bool* eos) {
731
404
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
404
    return pull(state, block, eos);
733
404
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
730
9.42k
                                                          bool* eos) {
731
9.42k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
9.42k
    return pull(state, block, eos);
733
9.42k
}
734
735
template <typename LocalStateType>
736
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
43.4k
                                                         bool* eos) {
738
43.4k
    auto& local_state = get_local_state(state);
739
43.4k
    if (need_more_input_data(state)) {
740
43.3k
        local_state._child_block->clear_column_data(
741
43.3k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
43.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
43.3k
                state, local_state._child_block.get(), &local_state._child_eos));
744
43.3k
        *eos = local_state._child_eos;
745
43.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
4.44k
            return Status::OK();
747
4.44k
        }
748
38.8k
        {
749
38.8k
            SCOPED_TIMER(local_state.exec_time_counter());
750
38.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
38.8k
        }
752
38.8k
    }
753
754
38.9k
    if (!need_more_input_data(state)) {
755
23.9k
        SCOPED_TIMER(local_state.exec_time_counter());
756
23.9k
        bool new_eos = false;
757
23.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
23.9k
        if (new_eos) {
759
17.9k
            *eos = true;
760
17.9k
        } else if (!need_more_input_data(state)) {
761
70
            *eos = false;
762
70
        }
763
23.9k
    }
764
38.9k
    return Status::OK();
765
38.9k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
10.3k
                                                         bool* eos) {
738
10.3k
    auto& local_state = get_local_state(state);
739
10.3k
    if (need_more_input_data(state)) {
740
10.2k
        local_state._child_block->clear_column_data(
741
10.2k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
10.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
10.2k
                state, local_state._child_block.get(), &local_state._child_eos));
744
10.2k
        *eos = local_state._child_eos;
745
10.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
1.01k
            return Status::OK();
747
1.01k
        }
748
9.23k
        {
749
9.23k
            SCOPED_TIMER(local_state.exec_time_counter());
750
9.23k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
9.23k
        }
752
9.23k
    }
753
754
9.37k
    if (!need_more_input_data(state)) {
755
9.37k
        SCOPED_TIMER(local_state.exec_time_counter());
756
9.37k
        bool new_eos = false;
757
9.37k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
9.37k
        if (new_eos) {
759
6.27k
            *eos = true;
760
6.27k
        } else if (!need_more_input_data(state)) {
761
70
            *eos = false;
762
70
        }
763
9.37k
    }
764
9.37k
    return Status::OK();
765
9.37k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
3.00k
                                                         bool* eos) {
738
3.00k
    auto& local_state = get_local_state(state);
739
3.00k
    if (need_more_input_data(state)) {
740
3.00k
        local_state._child_block->clear_column_data(
741
3.00k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
3.00k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
3.00k
                state, local_state._child_block.get(), &local_state._child_eos));
744
3.00k
        *eos = local_state._child_eos;
745
3.00k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
930
            return Status::OK();
747
930
        }
748
2.07k
        {
749
2.07k
            SCOPED_TIMER(local_state.exec_time_counter());
750
2.07k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
2.07k
        }
752
2.07k
    }
753
754
2.07k
    if (!need_more_input_data(state)) {
755
2.07k
        SCOPED_TIMER(local_state.exec_time_counter());
756
2.07k
        bool new_eos = false;
757
2.07k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
2.07k
        if (new_eos) {
759
932
            *eos = true;
760
1.14k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
2.07k
    }
764
2.07k
    return Status::OK();
765
2.07k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
20.8k
                                                         bool* eos) {
738
20.8k
    auto& local_state = get_local_state(state);
739
20.8k
    if (need_more_input_data(state)) {
740
20.8k
        local_state._child_block->clear_column_data(
741
20.8k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
20.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
20.8k
                state, local_state._child_block.get(), &local_state._child_eos));
744
20.8k
        *eos = local_state._child_eos;
745
20.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
384
            return Status::OK();
747
384
        }
748
20.4k
        {
749
20.4k
            SCOPED_TIMER(local_state.exec_time_counter());
750
20.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
20.4k
        }
752
20.4k
    }
753
754
20.4k
    if (!need_more_input_data(state)) {
755
5.59k
        SCOPED_TIMER(local_state.exec_time_counter());
756
5.59k
        bool new_eos = false;
757
5.59k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
5.59k
        if (new_eos) {
759
5.55k
            *eos = true;
760
5.55k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
5.59k
    }
764
20.4k
    return Status::OK();
765
20.4k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
740
                                                         bool* eos) {
738
740
    auto& local_state = get_local_state(state);
739
740
    if (need_more_input_data(state)) {
740
740
        local_state._child_block->clear_column_data(
741
740
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
740
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
740
                state, local_state._child_block.get(), &local_state._child_eos));
744
740
        *eos = local_state._child_eos;
745
740
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
38
            return Status::OK();
747
38
        }
748
702
        {
749
702
            SCOPED_TIMER(local_state.exec_time_counter());
750
702
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
702
        }
752
702
    }
753
754
702
    if (!need_more_input_data(state)) {
755
514
        SCOPED_TIMER(local_state.exec_time_counter());
756
514
        bool new_eos = false;
757
514
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
514
        if (new_eos) {
759
514
            *eos = true;
760
514
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
514
    }
764
702
    return Status::OK();
765
702
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
8.41k
                                                         bool* eos) {
738
8.41k
    auto& local_state = get_local_state(state);
739
8.41k
    if (need_more_input_data(state)) {
740
8.41k
        local_state._child_block->clear_column_data(
741
8.41k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
8.41k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
8.41k
                state, local_state._child_block.get(), &local_state._child_eos));
744
8.41k
        *eos = local_state._child_eos;
745
8.41k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
2.07k
            return Status::OK();
747
2.07k
        }
748
6.33k
        {
749
6.33k
            SCOPED_TIMER(local_state.exec_time_counter());
750
6.33k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
6.33k
        }
752
6.33k
    }
753
754
6.33k
    if (!need_more_input_data(state)) {
755
6.33k
        SCOPED_TIMER(local_state.exec_time_counter());
756
6.33k
        bool new_eos = false;
757
6.33k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
6.33k
        if (new_eos) {
759
4.63k
            *eos = true;
760
4.63k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
6.33k
    }
764
6.33k
    return Status::OK();
765
6.33k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
32
                                                         bool* eos) {
738
32
    auto& local_state = get_local_state(state);
739
36
    if (need_more_input_data(state)) {
740
36
        local_state._child_block->clear_column_data(
741
36
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
36
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
36
                state, local_state._child_block.get(), &local_state._child_eos));
744
36
        *eos = local_state._child_eos;
745
36
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
0
            return Status::OK();
747
0
        }
748
36
        {
749
36
            SCOPED_TIMER(local_state.exec_time_counter());
750
36
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
36
        }
752
36
    }
753
754
34
    if (!need_more_input_data(state)) {
755
34
        SCOPED_TIMER(local_state.exec_time_counter());
756
34
        bool new_eos = false;
757
34
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
34
        if (new_eos) {
759
32
            *eos = true;
760
32
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
34
    }
764
32
    return Status::OK();
765
32
}
766
767
template <typename Writer, typename Parent>
768
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
769
23.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
23.7k
    RETURN_IF_ERROR(Base::init(state, info));
771
23.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
23.7k
                                                         "AsyncWriterDependency", true);
773
23.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
23.7k
                             _finish_dependency));
775
776
23.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
23.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
23.7k
    return Status::OK();
779
23.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
162
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
162
    RETURN_IF_ERROR(Base::init(state, info));
771
162
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
162
                                                         "AsyncWriterDependency", true);
773
162
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
162
                             _finish_dependency));
775
776
162
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
162
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
162
    return Status::OK();
779
162
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
86
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
86
    RETURN_IF_ERROR(Base::init(state, info));
771
86
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
86
                                                         "AsyncWriterDependency", true);
773
86
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
86
                             _finish_dependency));
775
776
86
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
86
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
86
    return Status::OK();
779
86
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
4.40k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
4.40k
    RETURN_IF_ERROR(Base::init(state, info));
771
4.40k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
4.40k
                                                         "AsyncWriterDependency", true);
773
4.40k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
4.40k
                             _finish_dependency));
775
776
4.40k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
4.40k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
4.40k
    return Status::OK();
779
4.40k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
9.45k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
9.45k
    RETURN_IF_ERROR(Base::init(state, info));
771
9.45k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
9.45k
                                                         "AsyncWriterDependency", true);
773
9.45k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
9.45k
                             _finish_dependency));
775
776
9.45k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
9.45k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
9.45k
    return Status::OK();
779
9.45k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
5.17k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
5.17k
    RETURN_IF_ERROR(Base::init(state, info));
771
5.17k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
5.17k
                                                         "AsyncWriterDependency", true);
773
5.17k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
5.17k
                             _finish_dependency));
775
776
5.17k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
5.17k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
5.17k
    return Status::OK();
779
5.17k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
3.40k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
3.40k
    RETURN_IF_ERROR(Base::init(state, info));
771
3.40k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
3.40k
                                                         "AsyncWriterDependency", true);
773
3.40k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
3.40k
                             _finish_dependency));
775
776
3.40k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
3.40k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
3.40k
    return Status::OK();
779
3.40k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
32
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
32
    RETURN_IF_ERROR(Base::init(state, info));
771
32
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
32
                                                         "AsyncWriterDependency", true);
773
32
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
32
                             _finish_dependency));
775
776
32
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
32
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
32
    return Status::OK();
779
32
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
192
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
192
    RETURN_IF_ERROR(Base::init(state, info));
771
192
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
192
                                                         "AsyncWriterDependency", true);
773
192
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
192
                             _finish_dependency));
775
776
192
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
192
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
192
    return Status::OK();
779
192
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
640
    RETURN_IF_ERROR(Base::init(state, info));
771
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
640
                                                         "AsyncWriterDependency", true);
773
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
640
                             _finish_dependency));
775
776
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
640
    return Status::OK();
779
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
156
    RETURN_IF_ERROR(Base::init(state, info));
771
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
156
                                                         "AsyncWriterDependency", true);
773
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
156
                             _finish_dependency));
775
776
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
156
    return Status::OK();
779
156
}
780
781
template <typename Writer, typename Parent>
782
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
783
23.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
23.6k
    RETURN_IF_ERROR(Base::open(state));
785
23.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
251k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
227k
        RETURN_IF_ERROR(
788
227k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
227k
    }
790
23.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
23.6k
    return Status::OK();
792
23.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
162
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
162
    RETURN_IF_ERROR(Base::open(state));
785
162
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
934
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
772
        RETURN_IF_ERROR(
788
772
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
772
    }
790
162
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
162
    return Status::OK();
792
162
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
86
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
86
    RETURN_IF_ERROR(Base::open(state));
785
86
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
402
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
316
        RETURN_IF_ERROR(
788
316
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
316
    }
790
86
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
86
    return Status::OK();
792
86
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
4.40k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
4.40k
    RETURN_IF_ERROR(Base::open(state));
785
4.40k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
10.0k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
5.66k
        RETURN_IF_ERROR(
788
5.66k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
5.66k
    }
790
4.40k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
4.40k
    return Status::OK();
792
4.40k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
9.39k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
9.39k
    RETURN_IF_ERROR(Base::open(state));
785
9.39k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
57.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
47.7k
        RETURN_IF_ERROR(
788
47.7k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
47.7k
    }
790
9.39k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
9.39k
    return Status::OK();
792
9.39k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
5.17k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
5.17k
    RETURN_IF_ERROR(Base::open(state));
785
5.17k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
135k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
130k
        RETURN_IF_ERROR(
788
130k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
130k
    }
790
5.17k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
5.17k
    return Status::OK();
792
5.17k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
3.40k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
3.40k
    RETURN_IF_ERROR(Base::open(state));
785
3.40k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
41.5k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
38.1k
        RETURN_IF_ERROR(
788
38.1k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
38.1k
    }
790
3.40k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
3.40k
    return Status::OK();
792
3.40k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
32
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
32
    RETURN_IF_ERROR(Base::open(state));
785
32
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
128
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
96
        RETURN_IF_ERROR(
788
96
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
96
    }
790
32
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
32
    return Status::OK();
792
32
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
192
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
192
    RETURN_IF_ERROR(Base::open(state));
785
192
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
574
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
382
        RETURN_IF_ERROR(
788
382
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
382
    }
790
192
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
192
    return Status::OK();
792
192
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
638
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
638
    RETURN_IF_ERROR(Base::open(state));
785
638
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
4.36k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
3.72k
        RETURN_IF_ERROR(
788
3.72k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
3.72k
    }
790
638
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
638
    return Status::OK();
792
638
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
156
    RETURN_IF_ERROR(Base::open(state));
785
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
630
        RETURN_IF_ERROR(
788
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
630
    }
790
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
156
    return Status::OK();
792
156
}
793
794
template <typename Writer, typename Parent>
795
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
796
33.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
33.6k
    return _writer->sink(block, eos);
798
33.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
800
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
800
    return _writer->sink(block, eos);
798
800
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
110
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
110
    return _writer->sink(block, eos);
798
110
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
7.53k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
7.53k
    return _writer->sink(block, eos);
798
7.53k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
10.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
10.9k
    return _writer->sink(block, eos);
798
10.9k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
7.54k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
7.54k
    return _writer->sink(block, eos);
798
7.54k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
5.37k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
5.37k
    return _writer->sink(block, eos);
798
5.37k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
40
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
40
    return _writer->sink(block, eos);
798
40
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
216
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
216
    return _writer->sink(block, eos);
798
216
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
796
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
796
    return _writer->sink(block, eos);
798
796
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
310
    return _writer->sink(block, eos);
798
310
}
799
800
template <typename Writer, typename Parent>
801
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
802
23.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
23.6k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
23.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
23.6k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
23.7k
    if (_writer) {
810
23.7k
        Status st = _writer->get_writer_status();
811
23.7k
        if (exec_status.ok()) {
812
23.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
23.6k
                                                       : Status::Cancelled("force close"));
814
23.6k
        } else {
815
30
            _writer->force_close(exec_status);
816
30
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
23.7k
        RETURN_IF_ERROR(st);
821
23.7k
    }
822
23.6k
    return Base::close(state, exec_status);
823
23.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
162
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
162
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
162
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
162
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
162
    if (_writer) {
810
162
        Status st = _writer->get_writer_status();
811
162
        if (exec_status.ok()) {
812
162
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
162
                                                       : Status::Cancelled("force close"));
814
162
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
162
        RETURN_IF_ERROR(st);
821
162
    }
822
162
    return Base::close(state, exec_status);
823
162
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
86
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
86
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
86
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
86
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
86
    if (_writer) {
810
86
        Status st = _writer->get_writer_status();
811
86
        if (exec_status.ok()) {
812
86
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
86
                                                       : Status::Cancelled("force close"));
814
86
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
86
        RETURN_IF_ERROR(st);
821
86
    }
822
78
    return Base::close(state, exec_status);
823
86
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
4.40k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
4.40k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
4.40k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
4.40k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
4.40k
    if (_writer) {
810
4.40k
        Status st = _writer->get_writer_status();
811
4.40k
        if (exec_status.ok()) {
812
4.40k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
4.40k
                                                       : Status::Cancelled("force close"));
814
4.40k
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
4.40k
        RETURN_IF_ERROR(st);
821
4.40k
    }
822
4.40k
    return Base::close(state, exec_status);
823
4.40k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
9.43k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
9.43k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
9.43k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
9.43k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
9.44k
    if (_writer) {
810
9.44k
        Status st = _writer->get_writer_status();
811
9.44k
        if (exec_status.ok()) {
812
9.42k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
9.42k
                                                       : Status::Cancelled("force close"));
814
9.42k
        } else {
815
28
            _writer->force_close(exec_status);
816
28
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
9.44k
        RETURN_IF_ERROR(st);
821
9.44k
    }
822
9.43k
    return Base::close(state, exec_status);
823
9.43k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
5.16k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
5.16k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
5.16k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
5.16k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
5.17k
    if (_writer) {
810
5.17k
        Status st = _writer->get_writer_status();
811
5.17k
        if (exec_status.ok()) {
812
5.17k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
5.17k
                                                       : Status::Cancelled("force close"));
814
5.17k
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
5.17k
        RETURN_IF_ERROR(st);
821
5.17k
    }
822
5.16k
    return Base::close(state, exec_status);
823
5.16k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
3.39k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
3.39k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
3.39k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
3.39k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
3.40k
    if (_writer) {
810
3.40k
        Status st = _writer->get_writer_status();
811
3.40k
        if (exec_status.ok()) {
812
3.40k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
3.40k
                                                       : Status::Cancelled("force close"));
814
3.40k
        } else {
815
2
            _writer->force_close(exec_status);
816
2
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
3.40k
        RETURN_IF_ERROR(st);
821
3.40k
    }
822
3.39k
    return Base::close(state, exec_status);
823
3.39k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
32
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
32
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
32
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
32
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
32
    if (_writer) {
810
32
        Status st = _writer->get_writer_status();
811
32
        if (exec_status.ok()) {
812
32
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
32
                                                       : Status::Cancelled("force close"));
814
32
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
32
        RETURN_IF_ERROR(st);
821
32
    }
822
32
    return Base::close(state, exec_status);
823
32
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
192
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
192
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
192
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
192
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
192
    if (_writer) {
810
192
        Status st = _writer->get_writer_status();
811
192
        if (exec_status.ok()) {
812
192
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
192
                                                       : Status::Cancelled("force close"));
814
192
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
192
        RETURN_IF_ERROR(st);
821
192
    }
822
192
    return Base::close(state, exec_status);
823
192
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
640
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
640
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
640
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
640
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
640
    if (_writer) {
810
640
        Status st = _writer->get_writer_status();
811
640
        if (exec_status.ok()) {
812
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
640
                                                       : Status::Cancelled("force close"));
814
640
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
640
        RETURN_IF_ERROR(st);
821
640
    }
822
640
    return Base::close(state, exec_status);
823
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
156
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
808
    // if the init failed, the _writer may be nullptr. so here need check
809
156
    if (_writer) {
810
156
        Status st = _writer->get_writer_status();
811
156
        if (exec_status.ok()) {
812
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
156
                                                       : Status::Cancelled("force close"));
814
156
        } else {
815
0
            _writer->force_close(exec_status);
816
0
        }
817
        // If there is an error in process_block thread, then we should get the writer
818
        // status before call force_close. For example, the thread may failed in commit
819
        // transaction.
820
156
        RETURN_IF_ERROR(st);
821
156
    }
822
156
    return Base::close(state, exec_status);
823
156
}
824
825
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
826
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
827
DECLARE_OPERATOR(ResultSinkLocalState)
828
DECLARE_OPERATOR(JdbcTableSinkLocalState)
829
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
830
DECLARE_OPERATOR(ResultFileSinkLocalState)
831
DECLARE_OPERATOR(OlapTableSinkLocalState)
832
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
833
DECLARE_OPERATOR(HiveTableSinkLocalState)
834
DECLARE_OPERATOR(TVFTableSinkLocalState)
835
DECLARE_OPERATOR(IcebergTableSinkLocalState)
836
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
837
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
838
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
839
DECLARE_OPERATOR(MCTableSinkLocalState)
840
DECLARE_OPERATOR(AnalyticSinkLocalState)
841
DECLARE_OPERATOR(BlackholeSinkLocalState)
842
DECLARE_OPERATOR(SortSinkLocalState)
843
DECLARE_OPERATOR(SpillSortSinkLocalState)
844
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
845
DECLARE_OPERATOR(AggSinkLocalState)
846
DECLARE_OPERATOR(BucketedAggSinkLocalState)
847
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
848
DECLARE_OPERATOR(ExchangeSinkLocalState)
849
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
850
DECLARE_OPERATOR(UnionSinkLocalState)
851
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
852
DECLARE_OPERATOR(PartitionSortSinkLocalState)
853
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
854
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
855
DECLARE_OPERATOR(SetSinkLocalState<true>)
856
DECLARE_OPERATOR(SetSinkLocalState<false>)
857
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
858
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
859
DECLARE_OPERATOR(CacheSinkLocalState)
860
DECLARE_OPERATOR(DictSinkLocalState)
861
DECLARE_OPERATOR(RecCTESinkLocalState)
862
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
863
864
#undef DECLARE_OPERATOR
865
866
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
867
DECLARE_OPERATOR(HashJoinProbeLocalState)
868
DECLARE_OPERATOR(OlapScanLocalState)
869
DECLARE_OPERATOR(GroupCommitLocalState)
870
DECLARE_OPERATOR(JDBCScanLocalState)
871
DECLARE_OPERATOR(FileScanLocalState)
872
DECLARE_OPERATOR(AnalyticLocalState)
873
DECLARE_OPERATOR(SortLocalState)
874
DECLARE_OPERATOR(SpillSortLocalState)
875
DECLARE_OPERATOR(LocalMergeSortLocalState)
876
DECLARE_OPERATOR(AggLocalState)
877
DECLARE_OPERATOR(BucketedAggLocalState)
878
DECLARE_OPERATOR(PartitionedAggLocalState)
879
DECLARE_OPERATOR(TableFunctionLocalState)
880
DECLARE_OPERATOR(ExchangeLocalState)
881
DECLARE_OPERATOR(RepeatLocalState)
882
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
883
DECLARE_OPERATOR(AssertNumRowsLocalState)
884
DECLARE_OPERATOR(EmptySetLocalState)
885
DECLARE_OPERATOR(UnionSourceLocalState)
886
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
887
DECLARE_OPERATOR(PartitionSortSourceLocalState)
888
DECLARE_OPERATOR(SetSourceLocalState<true>)
889
DECLARE_OPERATOR(SetSourceLocalState<false>)
890
DECLARE_OPERATOR(DataGenLocalState)
891
DECLARE_OPERATOR(SchemaScanLocalState)
892
DECLARE_OPERATOR(MetaScanLocalState)
893
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
894
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
895
DECLARE_OPERATOR(CacheSourceLocalState)
896
DECLARE_OPERATOR(RecCTESourceLocalState)
897
DECLARE_OPERATOR(RecCTEScanLocalState)
898
899
#ifdef BE_TEST
900
DECLARE_OPERATOR(MockLocalState)
901
DECLARE_OPERATOR(MockScanLocalState)
902
#endif
903
#undef DECLARE_OPERATOR
904
905
template class StreamingOperatorX<AssertNumRowsLocalState>;
906
template class StreamingOperatorX<SelectLocalState>;
907
908
template class StatefulOperatorX<HashJoinProbeLocalState>;
909
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
910
template class StatefulOperatorX<RepeatLocalState>;
911
template class StatefulOperatorX<MaterializationLocalState>;
912
template class StatefulOperatorX<StreamingAggLocalState>;
913
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
914
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
915
template class StatefulOperatorX<TableFunctionLocalState>;
916
917
template class PipelineXSinkLocalState<HashJoinSharedState>;
918
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
919
template class PipelineXSinkLocalState<SortSharedState>;
920
template class PipelineXSinkLocalState<SpillSortSharedState>;
921
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
922
template class PipelineXSinkLocalState<AnalyticSharedState>;
923
template class PipelineXSinkLocalState<AggSharedState>;
924
template class PipelineXSinkLocalState<BucketedAggSharedState>;
925
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
926
template class PipelineXSinkLocalState<FakeSharedState>;
927
template class PipelineXSinkLocalState<UnionSharedState>;
928
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
929
template class PipelineXSinkLocalState<MultiCastSharedState>;
930
template class PipelineXSinkLocalState<SetSharedState>;
931
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
932
template class PipelineXSinkLocalState<BasicSharedState>;
933
template class PipelineXSinkLocalState<DataQueueSharedState>;
934
template class PipelineXSinkLocalState<RecCTESharedState>;
935
936
template class PipelineXLocalState<HashJoinSharedState>;
937
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
938
template class PipelineXLocalState<SortSharedState>;
939
template class PipelineXLocalState<SpillSortSharedState>;
940
template class PipelineXLocalState<NestedLoopJoinSharedState>;
941
template class PipelineXLocalState<AnalyticSharedState>;
942
template class PipelineXLocalState<AggSharedState>;
943
template class PipelineXLocalState<BucketedAggSharedState>;
944
template class PipelineXLocalState<PartitionedAggSharedState>;
945
template class PipelineXLocalState<FakeSharedState>;
946
template class PipelineXLocalState<UnionSharedState>;
947
template class PipelineXLocalState<DataQueueSharedState>;
948
template class PipelineXLocalState<MultiCastSharedState>;
949
template class PipelineXLocalState<PartitionSortNodeSharedState>;
950
template class PipelineXLocalState<SetSharedState>;
951
template class PipelineXLocalState<LocalExchangeSharedState>;
952
template class PipelineXLocalState<BasicSharedState>;
953
template class PipelineXLocalState<RecCTESharedState>;
954
955
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
956
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
957
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
958
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
959
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
960
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
961
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
962
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
963
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
964
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
965
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
966
967
#ifdef BE_TEST
968
template class OperatorX<DummyOperatorLocalState>;
969
template class DataSinkOperatorX<DummySinkLocalState>;
970
#endif
971
972
} // namespace doris