Coverage Report

Created: 2026-06-29 02:19

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
221k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
221k
    if (_parent->nereids_id() == -1) {
122
107k
        return fmt::format("(id={})", _parent->node_id());
123
114k
    } else {
124
114k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
114k
    }
126
221k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
27.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
27.1k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
27.1k
    } else {
124
27.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
27.1k
    }
126
27.1k
}
_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
42.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
42.0k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
42.0k
    } else {
124
42.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
42.0k
    }
126
42.0k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
15
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
15
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
15
    } else {
124
15
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
15
    }
126
15
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
2.28k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
2.28k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
2.28k
    } else {
124
2.28k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
2.28k
    }
126
2.28k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
40
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
40
    if (_parent->nereids_id() == -1) {
122
11
        return fmt::format("(id={})", _parent->node_id());
123
29
    } else {
124
29
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
29
    }
126
40
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
34.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
34.9k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
34.9k
    } else {
124
34.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
34.9k
    }
126
34.9k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
42
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
42
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
42
    } else {
124
42
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
42
    }
126
42
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
33.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
33.4k
    if (_parent->nereids_id() == -1) {
122
27.9k
        return fmt::format("(id={})", _parent->node_id());
123
27.9k
    } else {
124
5.50k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.50k
    }
126
33.4k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
2.41k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
2.41k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
2.41k
    } else {
124
2.41k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
2.41k
    }
126
2.41k
}
_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
3.06k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
3.06k
    if (_parent->nereids_id() == -1) {
122
3.06k
        return fmt::format("(id={})", _parent->node_id());
123
3.06k
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
3.06k
}
_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
76.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
76.0k
    if (_parent->nereids_id() == -1) {
122
76.0k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
76.0k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
127
128
template <typename SharedStateArg>
129
225k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
225k
    if (_parent->nereids_id() == -1) {
131
70.6k
        return fmt::format("(id={})", _parent->node_id());
132
155k
    } else {
133
155k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
155k
    }
135
225k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
75.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
75.1k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
75.1k
    } else {
133
75.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
75.1k
    }
135
75.1k
}
_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
42.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
42.0k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
42.0k
    } else {
133
42.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
42.0k
    }
135
42.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
22
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
22
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
22
    } else {
133
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
22
    }
135
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2.28k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2.28k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
2.28k
    } else {
133
2.28k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
2.28k
    }
135
2.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
40
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
40
    if (_parent->nereids_id() == -1) {
131
11
        return fmt::format("(id={})", _parent->node_id());
132
29
    } else {
133
29
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
29
    }
135
40
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
34.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
34.9k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
34.9k
    } else {
133
34.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
34.9k
    }
135
34.9k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
52
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
52
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
52
    } else {
133
52
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
52
    }
135
52
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
40
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
40
    if (_parent->nereids_id() == -1) {
131
40
        return fmt::format("(id={})", _parent->node_id());
132
40
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
40
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
655
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
655
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
652
    } else {
133
652
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
652
    }
135
655
}
_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
19.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
19.8k
    if (_parent->nereids_id() == -1) {
131
19.8k
        return fmt::format("(id={})", _parent->node_id());
132
19.8k
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
19.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
50.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
50.5k
    if (_parent->nereids_id() == -1) {
131
50.5k
        return fmt::format("(id={})", _parent->node_id());
132
50.5k
    } else {
133
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
4
    }
135
50.5k
}
_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.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
25.1k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
25.1k
    _terminated = true;
143
25.1k
    return Status::OK();
144
25.1k
}
_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
46
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
46
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
46
    _terminated = true;
143
46
    return Status::OK();
144
46
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
804
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
804
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
804
    _terminated = true;
143
804
    return Status::OK();
144
804
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_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
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1
    _terminated = true;
143
1
    return Status::OK();
144
1
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
254
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
254
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
254
    _terminated = true;
143
254
    return Status::OK();
144
254
}
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
64.2k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
64.2k
    return _child && _child->is_serial_operator() && !is_source()
148
64.2k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
64.2k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
64.2k
}
151
152
3.42k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
3.42k
    if (!_child) {
154
1.37k
        return false;
155
1.37k
    }
156
2.04k
    if (_child->is_serial_operator()) {
157
16
        return true;
158
16
    }
159
2.03k
    const auto child_distribution = _child->required_data_distribution(state);
160
2.03k
    return child_distribution.need_local_exchange() &&
161
2.03k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
2.04k
}
163
164
72.4k
const RowDescriptor& OperatorBase::row_desc() const {
165
72.4k
    return _child->row_desc();
166
72.4k
}
167
168
template <typename SharedStateArg>
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_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_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
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
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
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
174
175
template <typename SharedStateArg>
176
20.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
20.9k
    fmt::memory_buffer debug_string_buffer;
178
20.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
20.9k
    return fmt::to_string(debug_string_buffer);
180
20.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
176
20.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
177
20.9k
    fmt::memory_buffer debug_string_buffer;
178
20.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
179
20.9k
    return fmt::to_string(debug_string_buffer);
180
20.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
181
182
21.0k
std::string OperatorXBase::debug_string(int indentation_level) const {
183
21.0k
    fmt::memory_buffer debug_string_buffer;
184
21.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
185
21.0k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
186
21.0k
                   _is_serial_operator);
187
21.0k
    return fmt::to_string(debug_string_buffer);
188
21.0k
}
189
190
20.9k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
191
20.9k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
192
20.9k
}
193
194
121k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
195
121k
    std::string node_name = print_plan_node_type(tnode.node_type);
196
121k
    _nereids_id = tnode.nereids_id;
197
121k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
198
437
        if (!tnode.__isset.output_tuple_id) {
199
0
            return Status::InternalError("no final output tuple id");
200
0
        }
201
437
        if (tnode.intermediate_output_tuple_id_list.size() !=
202
437
            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
437
    }
210
121k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
211
121k
    _op_name = substr + "_OPERATOR";
212
213
121k
    if (tnode.__isset.vconjunct) {
214
0
        return Status::InternalError("vconjunct is not supported yet");
215
121k
    } else if (tnode.__isset.conjuncts) {
216
100k
        for (const auto& conjunct : tnode.conjuncts) {
217
100k
            VExprContextSPtr context;
218
100k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
219
100k
            _conjuncts.emplace_back(context);
220
100k
        }
221
30.5k
    }
222
223
    // create the projections expr
224
121k
    if (tnode.__isset.projections) {
225
67.2k
        DCHECK(tnode.__isset.output_tuple_id);
226
67.2k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
227
67.2k
    }
228
121k
    if (!tnode.intermediate_projections_list.empty()) {
229
437
        DCHECK(tnode.__isset.projections) << "no final projections";
230
437
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
231
2.03k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
232
2.03k
            VExprContextSPtrs projections;
233
2.03k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
234
2.03k
            _intermediate_projections.push_back(projections);
235
2.03k
        }
236
437
    }
237
121k
    return Status::OK();
238
121k
}
239
240
148k
Status OperatorXBase::prepare(RuntimeState* state) {
241
148k
    for (auto& conjunct : _conjuncts) {
242
100k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
243
100k
    }
244
148k
    if (state->enable_adjust_conjunct_order_by_cost()) {
245
136k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
246
136k
            return a->execute_cost() < b->execute_cost();
247
136k
        });
248
98.6k
    };
249
250
150k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
251
2.03k
        RETURN_IF_ERROR(
252
2.03k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
253
2.03k
    }
254
148k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
255
256
148k
    if (has_output_row_desc()) {
257
67.2k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
258
67.2k
    }
259
260
148k
    for (auto& conjunct : _conjuncts) {
261
100k
        RETURN_IF_ERROR(conjunct->open(state));
262
100k
    }
263
148k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
264
148k
    for (auto& projections : _intermediate_projections) {
265
2.03k
        RETURN_IF_ERROR(VExpr::open(projections, state));
266
2.03k
    }
267
148k
    if (_child && !is_source()) {
268
28.5k
        RETURN_IF_ERROR(_child->prepare(state));
269
28.5k
    }
270
271
148k
    if (VExpr::contains_blockable_function(_conjuncts) ||
272
148k
        VExpr::contains_blockable_function(_projections)) {
273
0
        _blockable = true;
274
0
    }
275
276
148k
    return Status::OK();
277
148k
}
278
279
1.53k
Status OperatorXBase::terminate(RuntimeState* state) {
280
1.53k
    if (_child && !is_source()) {
281
342
        RETURN_IF_ERROR(_child->terminate(state));
282
342
    }
283
1.53k
    auto result = state->get_local_state_result(operator_id());
284
1.53k
    if (!result) {
285
0
        return result.error();
286
0
    }
287
1.53k
    return result.value()->terminate(state);
288
1.53k
}
289
290
544k
Status OperatorXBase::close(RuntimeState* state) {
291
544k
    if (_child && !is_source()) {
292
43.9k
        RETURN_IF_ERROR(_child->close(state));
293
43.9k
    }
294
544k
    auto result = state->get_local_state_result(operator_id());
295
544k
    if (!result) {
296
0
        return result.error();
297
0
    }
298
544k
    return result.value()->close(state);
299
544k
}
300
301
19.9k
void PipelineXLocalStateBase::clear_origin_block() {
302
19.9k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
303
19.9k
}
304
305
46.5k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
306
46.5k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
307
308
46.5k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
309
46.5k
    return Status::OK();
310
46.5k
}
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
19.9k
                                     Block* output_block) const {
319
19.9k
    auto* local_state = state->get_local_state(operator_id());
320
19.9k
    SCOPED_TIMER(local_state->exec_time_counter());
321
19.9k
    SCOPED_TIMER(local_state->_projection_timer);
322
19.9k
    const size_t rows = origin_block->rows();
323
19.9k
    if (rows == 0) {
324
8.26k
        return Status::OK();
325
8.26k
    }
326
11.7k
    Block input_block = *origin_block;
327
328
11.7k
    size_t bytes_usage = 0;
329
11.7k
    ColumnsWithTypeAndName new_columns;
330
11.7k
    for (const auto& projections : local_state->_intermediate_projections) {
331
121
        if (projections.empty()) {
332
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
333
0
                                         node_id());
334
0
        }
335
121
        new_columns.resize(projections.size());
336
1.21k
        for (int i = 0; i < projections.size(); i++) {
337
1.09k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
338
1.09k
            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
1.09k
        }
346
121
        Block tmp_block {new_columns};
347
121
        bytes_usage += tmp_block.allocated_bytes();
348
121
        input_block.swap(tmp_block);
349
121
    }
350
351
11.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
65.9k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
358
65.9k
        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
65.9k
        } else {
368
65.9k
            if (_keep_origin || !from->is_exclusive()) {
369
65.9k
                to->insert_range_from(*from, 0, rows);
370
65.9k
                bytes_usage += from->allocated_bytes();
371
65.9k
            } else {
372
2
                to = from->assert_mutable();
373
2
            }
374
65.9k
        }
375
65.9k
    };
376
377
11.7k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
378
11.7k
            output_block, *_output_row_descriptor);
379
11.7k
    auto& mutable_block = scoped_mutable_block.mutable_block();
380
11.7k
    auto& mutable_columns = mutable_block.mutable_columns();
381
11.7k
    if (rows != 0) {
382
11.7k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
383
77.6k
        for (int i = 0; i < mutable_columns.size(); ++i) {
384
65.9k
            ColumnPtr column_ptr;
385
65.9k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
386
65.9k
            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
65.9k
            column_ptr = column_ptr->convert_to_full_column_if_const();
393
65.9k
            bytes_usage += column_ptr->allocated_bytes();
394
65.9k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
395
65.9k
        }
396
11.7k
        DCHECK(mutable_block.rows() == rows);
397
11.7k
    }
398
11.7k
    local_state->_estimate_memory_usage += bytes_usage;
399
400
11.7k
    return Status::OK();
401
11.7k
}
402
403
1.87M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
404
1.87M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
405
1.87M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
406
1.87M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
407
1.87M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
408
1.87M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
409
1.87M
            if (_debug_point_count++ % 2 == 0) {
410
1.87M
                return Status::OK();
411
1.87M
            }
412
1.87M
        }
413
1.87M
    });
414
415
1.87M
    Status status;
416
1.87M
    auto* local_state = state->get_local_state(operator_id());
417
1.88M
    Defer defer([&]() {
418
1.88M
        if (status.ok()) {
419
1.88M
            local_state->update_output_block_counters(*block);
420
1.88M
        }
421
1.88M
    });
422
1.87M
    if (_output_row_descriptor) {
423
19.9k
        local_state->clear_origin_block();
424
19.9k
        status = get_block(state, &local_state->_origin_block, eos);
425
19.9k
        if (UNLIKELY(!status.ok())) {
426
0
            return status;
427
0
        }
428
19.9k
        status = do_projections(state, &local_state->_origin_block, block);
429
19.9k
        return status;
430
19.9k
    }
431
1.85M
    status = get_block(state, block, eos);
432
1.85M
    RETURN_IF_ERROR(block->check_type_and_column());
433
1.85M
    return status;
434
1.85M
}
435
436
449k
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
437
449k
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
438
1.61k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
439
1.61k
        *eos = true;
440
1.61k
    }
441
442
449k
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
443
449k
        auto op_name = to_lower(_parent->_op_name);
444
449k
        auto arg_op_name = dp->param<std::string>("op_name");
445
449k
        arg_op_name = to_lower(arg_op_name);
446
447
449k
        if (op_name == arg_op_name) {
448
449k
            *eos = true;
449
449k
        }
450
449k
    });
451
452
449k
    if (auto rows = block->rows()) {
453
112k
        _num_rows_returned += rows;
454
112k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
455
112k
    }
456
449k
}
457
458
25.1k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
459
25.1k
    auto result = state->get_sink_local_state_result();
460
25.1k
    if (!result) {
461
0
        return result.error();
462
0
    }
463
25.1k
    return result.value()->terminate(state);
464
25.1k
}
465
466
20.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
467
20.9k
    fmt::memory_buffer debug_string_buffer;
468
469
20.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
470
20.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
471
20.9k
    return fmt::to_string(debug_string_buffer);
472
20.9k
}
473
474
20.9k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
475
20.9k
    return state->get_sink_local_state()->debug_string(indentation_level);
476
20.9k
}
477
478
64.6k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
479
64.6k
    std::string op_name = "UNKNOWN_SINK";
480
64.6k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
481
482
64.7k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
483
64.7k
        op_name = it->second;
484
64.7k
    }
485
64.6k
    _name = op_name + "_OPERATOR";
486
64.6k
    return Status::OK();
487
64.6k
}
488
489
102k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
490
102k
    std::string op_name = print_plan_node_type(tnode.node_type);
491
102k
    _nereids_id = tnode.nereids_id;
492
102k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
493
102k
    _name = substr + "_SINK_OPERATOR";
494
102k
    return Status::OK();
495
102k
}
496
497
template <typename LocalStateType>
498
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
499
313k
                                                            LocalSinkStateInfo& info) {
500
313k
    auto local_state = LocalStateType::create_unique(this, state);
501
313k
    RETURN_IF_ERROR(local_state->init(state, info));
502
313k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
313k
    return Status::OK();
504
313k
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
75.1k
                                                            LocalSinkStateInfo& info) {
500
75.1k
    auto local_state = LocalStateType::create_unique(this, state);
501
75.1k
    RETURN_IF_ERROR(local_state->init(state, info));
502
75.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
75.1k
    return Status::OK();
504
75.1k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
38.9k
                                                            LocalSinkStateInfo& info) {
500
38.9k
    auto local_state = LocalStateType::create_unique(this, state);
501
38.9k
    RETURN_IF_ERROR(local_state->init(state, info));
502
38.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
38.9k
    return Status::OK();
504
38.9k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
44
                                                            LocalSinkStateInfo& info) {
500
44
    auto local_state = LocalStateType::create_unique(this, state);
501
44
    RETURN_IF_ERROR(local_state->init(state, info));
502
44
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
44
    return Status::OK();
504
44
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
82
                                                            LocalSinkStateInfo& info) {
500
82
    auto local_state = LocalStateType::create_unique(this, state);
501
82
    RETURN_IF_ERROR(local_state->init(state, info));
502
82
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
82
    return Status::OK();
504
82
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
1.97k
                                                            LocalSinkStateInfo& info) {
500
1.97k
    auto local_state = LocalStateType::create_unique(this, state);
501
1.97k
    RETURN_IF_ERROR(local_state->init(state, info));
502
1.97k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
1.97k
    return Status::OK();
504
1.97k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
4.67k
                                                            LocalSinkStateInfo& info) {
500
4.67k
    auto local_state = LocalStateType::create_unique(this, state);
501
4.67k
    RETURN_IF_ERROR(local_state->init(state, info));
502
4.67k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
4.67k
    return Status::OK();
504
4.67k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.58k
                                                            LocalSinkStateInfo& info) {
500
2.58k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.58k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.58k
    return Status::OK();
504
2.58k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
78
                                                            LocalSinkStateInfo& info) {
500
78
    auto local_state = LocalStateType::create_unique(this, state);
501
78
    RETURN_IF_ERROR(local_state->init(state, info));
502
78
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
78
    return Status::OK();
504
78
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
1.69k
                                                            LocalSinkStateInfo& info) {
500
1.69k
    auto local_state = LocalStateType::create_unique(this, state);
501
1.69k
    RETURN_IF_ERROR(local_state->init(state, info));
502
1.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
1.69k
    return Status::OK();
504
1.69k
}
_ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
16
                                                            LocalSinkStateInfo& info) {
500
16
    auto local_state = LocalStateType::create_unique(this, state);
501
16
    RETURN_IF_ERROR(local_state->init(state, info));
502
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
16
    return Status::OK();
504
16
}
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_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_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
320
                                                            LocalSinkStateInfo& info) {
500
320
    auto local_state = LocalStateType::create_unique(this, state);
501
320
    RETURN_IF_ERROR(local_state->init(state, info));
502
320
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
320
    return Status::OK();
504
320
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
29
                                                            LocalSinkStateInfo& info) {
500
29
    auto local_state = LocalStateType::create_unique(this, state);
501
29
    RETURN_IF_ERROR(local_state->init(state, info));
502
29
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
29
    return Status::OK();
504
29
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
40
                                                            LocalSinkStateInfo& info) {
500
40
    auto local_state = LocalStateType::create_unique(this, state);
501
40
    RETURN_IF_ERROR(local_state->init(state, info));
502
40
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
40
    return Status::OK();
504
40
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
42.0k
                                                            LocalSinkStateInfo& info) {
500
42.0k
    auto local_state = LocalStateType::create_unique(this, state);
501
42.0k
    RETURN_IF_ERROR(local_state->init(state, info));
502
42.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
42.0k
    return Status::OK();
504
42.0k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
22
                                                            LocalSinkStateInfo& info) {
500
22
    auto local_state = LocalStateType::create_unique(this, state);
501
22
    RETURN_IF_ERROR(local_state->init(state, info));
502
22
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
22
    return Status::OK();
504
22
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
19.8k
                                                            LocalSinkStateInfo& info) {
500
19.8k
    auto local_state = LocalStateType::create_unique(this, state);
501
19.8k
    RETURN_IF_ERROR(local_state->init(state, info));
502
19.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
19.8k
    return Status::OK();
504
19.8k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
34.9k
                                                            LocalSinkStateInfo& info) {
500
34.9k
    auto local_state = LocalStateType::create_unique(this, state);
501
34.9k
    RETURN_IF_ERROR(local_state->init(state, info));
502
34.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
34.9k
    return Status::OK();
504
34.9k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
52
                                                            LocalSinkStateInfo& info) {
500
52
    auto local_state = LocalStateType::create_unique(this, state);
501
52
    RETURN_IF_ERROR(local_state->init(state, info));
502
52
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
52
    return Status::OK();
504
52
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
86.5k
                                                            LocalSinkStateInfo& info) {
500
86.5k
    auto local_state = LocalStateType::create_unique(this, state);
501
86.5k
    RETURN_IF_ERROR(local_state->init(state, info));
502
86.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
86.5k
    return Status::OK();
504
86.5k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
2.28k
                                                            LocalSinkStateInfo& info) {
500
2.28k
    auto local_state = LocalStateType::create_unique(this, state);
501
2.28k
    RETURN_IF_ERROR(local_state->init(state, info));
502
2.28k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
2.28k
    return Status::OK();
504
2.28k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
652
                                                            LocalSinkStateInfo& info) {
500
652
    auto local_state = LocalStateType::create_unique(this, state);
501
652
    RETURN_IF_ERROR(local_state->init(state, info));
502
652
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
652
    return Status::OK();
504
652
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
499
1.02k
                                                            LocalSinkStateInfo& info) {
500
1.02k
    auto local_state = LocalStateType::create_unique(this, state);
501
1.02k
    RETURN_IF_ERROR(local_state->init(state, info));
502
1.02k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
503
1.02k
    return Status::OK();
504
1.02k
}
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
289k
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
289k
    } else {
515
289k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
289k
        ss->id = operator_id();
517
289k
        for (auto& dest : dests_id()) {
518
289k
            ss->related_op_ids.insert(dest);
519
289k
        }
520
289k
        return ss;
521
289k
    }
522
289k
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
72.2k
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.2k
    } else {
515
72.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
72.2k
        ss->id = operator_id();
517
72.2k
        for (auto& dest : dests_id()) {
518
72.2k
            ss->related_op_ids.insert(dest);
519
72.2k
        }
520
72.2k
        return ss;
521
72.2k
    }
522
72.2k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
38.9k
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
38.9k
    } else {
515
38.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
38.9k
        ss->id = operator_id();
517
38.9k
        for (auto& dest : dests_id()) {
518
38.9k
            ss->related_op_ids.insert(dest);
519
38.9k
        }
520
38.9k
        return ss;
521
38.9k
    }
522
38.9k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
44
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
44
    } else {
515
44
        auto ss = LocalStateType::SharedStateType::create_shared();
516
44
        ss->id = operator_id();
517
44
        for (auto& dest : dests_id()) {
518
44
            ss->related_op_ids.insert(dest);
519
44
        }
520
44
        return ss;
521
44
    }
522
44
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
82
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
82
    } else {
515
82
        auto ss = LocalStateType::SharedStateType::create_shared();
516
82
        ss->id = operator_id();
517
82
        for (auto& dest : dests_id()) {
518
82
            ss->related_op_ids.insert(dest);
519
82
        }
520
82
        return ss;
521
82
    }
522
82
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
1.97k
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
1.97k
    } else {
515
1.97k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
1.97k
        ss->id = operator_id();
517
1.97k
        for (auto& dest : dests_id()) {
518
1.97k
            ss->related_op_ids.insert(dest);
519
1.97k
        }
520
1.97k
        return ss;
521
1.97k
    }
522
1.97k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
507
4.67k
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.67k
    } else {
515
4.67k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
4.67k
        ss->id = operator_id();
517
4.67k
        for (auto& dest : dests_id()) {
518
4.67k
            ss->related_op_ids.insert(dest);
519
4.67k
        }
520
4.67k
        return ss;
521
4.67k
    }
522
4.67k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
2.58k
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
2.58k
    } else {
515
2.58k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
2.58k
        ss->id = operator_id();
517
2.58k
        for (auto& dest : dests_id()) {
518
2.58k
            ss->related_op_ids.insert(dest);
519
2.58k
        }
520
2.58k
        return ss;
521
2.58k
    }
522
2.58k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
78
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
78
    } else {
515
78
        auto ss = LocalStateType::SharedStateType::create_shared();
516
78
        ss->id = operator_id();
517
78
        for (auto& dest : dests_id()) {
518
78
            ss->related_op_ids.insert(dest);
519
78
        }
520
78
        return ss;
521
78
    }
522
78
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
1.69k
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
1.69k
    } else {
515
1.69k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
1.69k
        ss->id = operator_id();
517
1.69k
        for (auto& dest : dests_id()) {
518
1.69k
            ss->related_op_ids.insert(dest);
519
1.69k
        }
520
1.69k
        return ss;
521
1.69k
    }
522
1.69k
}
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
16
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
16
    } else {
515
16
        auto ss = LocalStateType::SharedStateType::create_shared();
516
16
        ss->id = operator_id();
517
16
        for (auto& dest : dests_id()) {
518
16
            ss->related_op_ids.insert(dest);
519
16
        }
520
16
        return ss;
521
16
    }
522
16
}
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_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
79
            ss->related_op_ids.insert(dest);
519
79
        }
520
80
        return ss;
521
80
    }
522
80
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
320
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
320
    } else {
515
320
        auto ss = LocalStateType::SharedStateType::create_shared();
516
320
        ss->id = operator_id();
517
320
        for (auto& dest : dests_id()) {
518
320
            ss->related_op_ids.insert(dest);
519
320
        }
520
320
        return ss;
521
320
    }
522
320
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
40
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
40
    } else {
515
40
        auto ss = LocalStateType::SharedStateType::create_shared();
516
40
        ss->id = operator_id();
517
40
        for (auto& dest : dests_id()) {
518
40
            ss->related_op_ids.insert(dest);
519
40
        }
520
40
        return ss;
521
40
    }
522
40
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
40
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
40
    } else {
515
40
        auto ss = LocalStateType::SharedStateType::create_shared();
516
40
        ss->id = operator_id();
517
40
        for (auto& dest : dests_id()) {
518
40
            ss->related_op_ids.insert(dest);
519
40
        }
520
40
        return ss;
521
40
    }
522
40
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
42.0k
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
42.0k
    } else {
515
42.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
42.0k
        ss->id = operator_id();
517
42.0k
        for (auto& dest : dests_id()) {
518
42.0k
            ss->related_op_ids.insert(dest);
519
42.0k
        }
520
42.0k
        return ss;
521
42.0k
    }
522
42.0k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
24
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
24
    } else {
515
24
        auto ss = LocalStateType::SharedStateType::create_shared();
516
24
        ss->id = operator_id();
517
24
        for (auto& dest : dests_id()) {
518
24
            ss->related_op_ids.insert(dest);
519
24
        }
520
24
        return ss;
521
24
    }
522
24
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
34.9k
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
34.9k
    } else {
515
34.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
34.9k
        ss->id = operator_id();
517
34.9k
        for (auto& dest : dests_id()) {
518
34.9k
            ss->related_op_ids.insert(dest);
519
34.9k
        }
520
34.9k
        return ss;
521
34.9k
    }
522
34.9k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
51
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
51
    } else {
515
51
        auto ss = LocalStateType::SharedStateType::create_shared();
516
51
        ss->id = operator_id();
517
51
        for (auto& dest : dests_id()) {
518
51
            ss->related_op_ids.insert(dest);
519
51
        }
520
51
        return ss;
521
51
    }
522
51
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
86.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
86.5k
    } else {
515
86.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
86.5k
        ss->id = operator_id();
517
86.5k
        for (auto& dest : dests_id()) {
518
86.5k
            ss->related_op_ids.insert(dest);
519
86.5k
        }
520
86.5k
        return ss;
521
86.5k
    }
522
86.5k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
507
2.28k
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
2.28k
    } else {
515
2.28k
        auto ss = LocalStateType::SharedStateType::create_shared();
516
2.28k
        ss->id = operator_id();
517
2.28k
        for (auto& dest : dests_id()) {
518
2.28k
            ss->related_op_ids.insert(dest);
519
2.28k
        }
520
2.28k
        return ss;
521
2.28k
    }
522
2.28k
}
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
52
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
52
    } else {
515
52
        auto ss = LocalStateType::SharedStateType::create_shared();
516
52
        ss->id = operator_id();
517
54
        for (auto& dest : dests_id()) {
518
54
            ss->related_op_ids.insert(dest);
519
54
        }
520
52
        return ss;
521
52
    }
522
52
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
523
524
template <typename LocalStateType>
525
275k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
275k
    auto local_state = LocalStateType::create_unique(state, this);
527
275k
    RETURN_IF_ERROR(local_state->init(state, info));
528
275k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
275k
    return Status::OK();
530
275k
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
27.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
27.1k
    auto local_state = LocalStateType::create_unique(state, this);
527
27.1k
    RETURN_IF_ERROR(local_state->init(state, info));
528
27.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
27.1k
    return Status::OK();
530
27.1k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
37.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
37.9k
    auto local_state = LocalStateType::create_unique(state, this);
527
37.9k
    RETURN_IF_ERROR(local_state->init(state, info));
528
37.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
37.9k
    return Status::OK();
530
37.9k
}
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
15.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
15.7k
    auto local_state = LocalStateType::create_unique(state, this);
527
15.7k
    RETURN_IF_ERROR(local_state->init(state, info));
528
15.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
15.7k
    return Status::OK();
530
15.7k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
29
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
29
    auto local_state = LocalStateType::create_unique(state, this);
527
29
    RETURN_IF_ERROR(local_state->init(state, info));
528
29
    state->emplace_local_state(operator_id(), std::move(local_state));
529
29
    return Status::OK();
530
29
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
259
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
259
    auto local_state = LocalStateType::create_unique(state, this);
527
259
    RETURN_IF_ERROR(local_state->init(state, info));
528
259
    state->emplace_local_state(operator_id(), std::move(local_state));
529
259
    return Status::OK();
530
259
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
15
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
15
    auto local_state = LocalStateType::create_unique(state, this);
527
15
    RETURN_IF_ERROR(local_state->init(state, info));
528
15
    state->emplace_local_state(operator_id(), std::move(local_state));
529
15
    return Status::OK();
530
15
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
41.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
41.8k
    auto local_state = LocalStateType::create_unique(state, this);
527
41.8k
    RETURN_IF_ERROR(local_state->init(state, info));
528
41.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
41.8k
    return Status::OK();
530
41.8k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
34.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
34.9k
    auto local_state = LocalStateType::create_unique(state, this);
527
34.9k
    RETURN_IF_ERROR(local_state->init(state, info));
528
34.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
34.9k
    return Status::OK();
530
34.9k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
42
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
42
    auto local_state = LocalStateType::create_unique(state, this);
527
42
    RETURN_IF_ERROR(local_state->init(state, info));
528
42
    state->emplace_local_state(operator_id(), std::move(local_state));
529
42
    return Status::OK();
530
42
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
21
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
21
    auto local_state = LocalStateType::create_unique(state, this);
527
21
    RETURN_IF_ERROR(local_state->init(state, info));
528
21
    state->emplace_local_state(operator_id(), std::move(local_state));
529
21
    return Status::OK();
530
21
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
27.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
27.4k
    auto local_state = LocalStateType::create_unique(state, this);
527
27.4k
    RETURN_IF_ERROR(local_state->init(state, info));
528
27.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
27.4k
    return Status::OK();
530
27.4k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.28k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.28k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.28k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.28k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.28k
    return Status::OK();
530
2.28k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
103
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
103
    auto local_state = LocalStateType::create_unique(state, this);
527
103
    RETURN_IF_ERROR(local_state->init(state, info));
528
103
    state->emplace_local_state(operator_id(), std::move(local_state));
529
103
    return Status::OK();
530
103
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
104
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
104
    auto local_state = LocalStateType::create_unique(state, this);
527
104
    RETURN_IF_ERROR(local_state->init(state, info));
528
104
    state->emplace_local_state(operator_id(), std::move(local_state));
529
104
    return Status::OK();
530
104
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.41k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.41k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.41k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.41k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.41k
    return Status::OK();
530
2.41k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
3.06k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
3.06k
    auto local_state = LocalStateType::create_unique(state, this);
527
3.06k
    RETURN_IF_ERROR(local_state->init(state, info));
528
3.06k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
3.06k
    return Status::OK();
530
3.06k
}
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
103
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
103
    auto local_state = LocalStateType::create_unique(state, this);
527
103
    RETURN_IF_ERROR(local_state->init(state, info));
528
103
    state->emplace_local_state(operator_id(), std::move(local_state));
529
103
    return Status::OK();
530
103
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
270
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
270
    auto local_state = LocalStateType::create_unique(state, this);
527
270
    RETURN_IF_ERROR(local_state->init(state, info));
528
270
    state->emplace_local_state(operator_id(), std::move(local_state));
529
270
    return Status::OK();
530
270
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
943
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
943
    auto local_state = LocalStateType::create_unique(state, this);
527
943
    RETURN_IF_ERROR(local_state->init(state, info));
528
943
    state->emplace_local_state(operator_id(), std::move(local_state));
529
943
    return Status::OK();
530
943
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_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_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
467
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
467
    auto local_state = LocalStateType::create_unique(state, this);
527
467
    RETURN_IF_ERROR(local_state->init(state, info));
528
467
    state->emplace_local_state(operator_id(), std::move(local_state));
529
467
    return Status::OK();
530
467
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
1.02k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
1.02k
    auto local_state = LocalStateType::create_unique(state, this);
527
1.02k
    RETURN_IF_ERROR(local_state->init(state, info));
528
1.02k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
1.02k
    return Status::OK();
530
1.02k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
2.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
2.72k
    auto local_state = LocalStateType::create_unique(state, this);
527
2.72k
    RETURN_IF_ERROR(local_state->init(state, info));
528
2.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
529
2.72k
    return Status::OK();
530
2.72k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
525
208
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
526
208
    auto local_state = LocalStateType::create_unique(state, this);
527
208
    RETURN_IF_ERROR(local_state->init(state, info));
528
208
    state->emplace_local_state(operator_id(), std::move(local_state));
529
208
    return Status::OK();
530
208
}
531
532
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
533
                                                         RuntimeState* state)
534
313k
        : _parent(parent), _state(state) {}
535
536
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
537
275k
        : _num_rows_returned(0),
538
275k
          _rows_returned_counter(nullptr),
539
275k
          _parent(parent),
540
275k
          _state(state),
541
275k
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
542
543
template <typename SharedStateArg>
544
275k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
275k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
275k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
275k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
275k
    _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
275k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
275k
    _operator_profile->add_child(_common_profile.get(), true);
553
275k
    _operator_profile->add_child(_custom_profile.get(), true);
554
275k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
275k
    if constexpr (!is_fake_shared) {
556
188k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
78.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
78.9k
                                    .first.get()
559
78.9k
                                    ->template cast<SharedStateArg>();
560
561
78.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
78.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
78.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
109k
        } else if (info.shared_state) {
565
107k
            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
107k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
107k
            _dependency = _shared_state->create_source_dependency(
572
107k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
107k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
107k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
107k
        } else {
576
2.10k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
1
                DCHECK(false);
578
1
            }
579
2.10k
        }
580
188k
    }
581
582
275k
    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
275k
    _rows_returned_counter =
587
275k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
275k
    _blocks_returned_counter =
589
275k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
275k
    _output_block_bytes_counter =
591
275k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
275k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
275k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
275k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
275k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
275k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
275k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
275k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
275k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
275k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
275k
    _memory_used_counter =
602
275k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
275k
    _common_profile->add_info_string("IsColocate",
604
275k
                                     std::to_string(_parent->is_colocated_operator()));
605
275k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
275k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
275k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
275k
    return Status::OK();
609
275k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
27.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
27.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
27.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
27.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
27.1k
    _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
27.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
27.1k
    _operator_profile->add_child(_common_profile.get(), true);
553
27.1k
    _operator_profile->add_child(_custom_profile.get(), true);
554
27.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
27.1k
    if constexpr (!is_fake_shared) {
556
27.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
2.92k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
2.92k
                                    .first.get()
559
2.92k
                                    ->template cast<SharedStateArg>();
560
561
2.92k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
2.92k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
2.92k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
24.2k
        } 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.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
24.2k
            _dependency = _shared_state->create_source_dependency(
572
24.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
24.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
24.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
24.2k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
27.1k
    }
581
582
27.1k
    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
27.1k
    _rows_returned_counter =
587
27.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
27.1k
    _blocks_returned_counter =
589
27.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
27.1k
    _output_block_bytes_counter =
591
27.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
27.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
27.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
27.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
27.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
27.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
27.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
27.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
27.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
27.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
27.1k
    _memory_used_counter =
602
27.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
27.1k
    _common_profile->add_info_string("IsColocate",
604
27.1k
                                     std::to_string(_parent->is_colocated_operator()));
605
27.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
27.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
27.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
27.1k
    return Status::OK();
609
27.1k
}
_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
42.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
42.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
42.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
42.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
42.0k
    _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
42.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
42.0k
    _operator_profile->add_child(_common_profile.get(), true);
553
42.0k
    _operator_profile->add_child(_custom_profile.get(), true);
554
42.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
42.0k
    if constexpr (!is_fake_shared) {
556
42.0k
        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
42.0k
        } 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
42.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
42.0k
            _dependency = _shared_state->create_source_dependency(
572
42.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
42.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
42.0k
                    _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
42.0k
    }
581
582
42.0k
    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
42.0k
    _rows_returned_counter =
587
42.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
42.0k
    _blocks_returned_counter =
589
42.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
42.0k
    _output_block_bytes_counter =
591
42.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
42.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
42.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
42.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
42.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
42.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
42.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
42.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
42.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
42.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
42.0k
    _memory_used_counter =
602
42.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
42.0k
    _common_profile->add_info_string("IsColocate",
604
42.0k
                                     std::to_string(_parent->is_colocated_operator()));
605
42.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
42.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
42.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
42.0k
    return Status::OK();
609
42.0k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
15
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
15
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
15
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
15
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
15
    _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
15
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
15
    _operator_profile->add_child(_common_profile.get(), true);
553
15
    _operator_profile->add_child(_custom_profile.get(), true);
554
15
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
15
    if constexpr (!is_fake_shared) {
556
15
        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
15
        } 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
15
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
15
            _dependency = _shared_state->create_source_dependency(
572
15
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
15
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
15
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
15
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
15
    }
581
582
15
    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
15
    _rows_returned_counter =
587
15
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
15
    _blocks_returned_counter =
589
15
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
15
    _output_block_bytes_counter =
591
15
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
15
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
15
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
15
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
15
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
15
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
15
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
15
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
15
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
15
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
15
    _memory_used_counter =
602
15
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
15
    _common_profile->add_info_string("IsColocate",
604
15
                                     std::to_string(_parent->is_colocated_operator()));
605
15
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
15
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
15
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
15
    return Status::OK();
609
15
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
2.28k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
2.28k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
2.28k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
2.28k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
2.28k
    _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
2.28k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
2.28k
    _operator_profile->add_child(_common_profile.get(), true);
553
2.28k
    _operator_profile->add_child(_custom_profile.get(), true);
554
2.28k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
2.28k
    if constexpr (!is_fake_shared) {
556
2.28k
        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
2.28k
        } 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
2.28k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
2.28k
            _dependency = _shared_state->create_source_dependency(
572
2.28k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
2.28k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
2.28k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
2.28k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
2.28k
    }
581
582
2.28k
    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
2.28k
    _rows_returned_counter =
587
2.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
2.28k
    _blocks_returned_counter =
589
2.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
2.28k
    _output_block_bytes_counter =
591
2.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
2.28k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
2.28k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
2.28k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
2.28k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.28k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
2.28k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
2.28k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
2.28k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
2.28k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
2.28k
    _memory_used_counter =
602
2.28k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
2.28k
    _common_profile->add_info_string("IsColocate",
604
2.28k
                                     std::to_string(_parent->is_colocated_operator()));
605
2.28k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
2.28k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
2.28k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
2.28k
    return Status::OK();
609
2.28k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
40
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
40
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
40
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
40
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
40
    _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
40
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
40
    _operator_profile->add_child(_common_profile.get(), true);
553
40
    _operator_profile->add_child(_custom_profile.get(), true);
554
40
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
40
    if constexpr (!is_fake_shared) {
556
40
        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
40
        } 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
40
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
40
            _dependency = _shared_state->create_source_dependency(
572
40
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
40
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
40
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
40
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
40
    }
581
582
40
    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
40
    _rows_returned_counter =
587
40
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
40
    _blocks_returned_counter =
589
40
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
40
    _output_block_bytes_counter =
591
40
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
40
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
40
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
40
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
40
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
40
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
40
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
40
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
40
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
40
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
40
    _memory_used_counter =
602
40
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
40
    _common_profile->add_info_string("IsColocate",
604
40
                                     std::to_string(_parent->is_colocated_operator()));
605
40
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
40
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
40
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
40
    return Status::OK();
609
40
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
34.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
34.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
34.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
34.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
34.9k
    _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
34.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
34.9k
    _operator_profile->add_child(_common_profile.get(), true);
553
34.9k
    _operator_profile->add_child(_custom_profile.get(), true);
554
34.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
34.9k
    if constexpr (!is_fake_shared) {
556
34.9k
        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
34.9k
        } 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
34.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
34.9k
            _dependency = _shared_state->create_source_dependency(
572
34.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
34.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
34.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
34.9k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
3
        }
580
34.9k
    }
581
582
34.9k
    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
34.9k
    _rows_returned_counter =
587
34.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
34.9k
    _blocks_returned_counter =
589
34.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
34.9k
    _output_block_bytes_counter =
591
34.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
34.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
34.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
34.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
34.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
34.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
34.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
34.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
34.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
34.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
34.9k
    _memory_used_counter =
602
34.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
34.9k
    _common_profile->add_info_string("IsColocate",
604
34.9k
                                     std::to_string(_parent->is_colocated_operator()));
605
34.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
34.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
34.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
34.9k
    return Status::OK();
609
34.9k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
42
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
42
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
42
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
42
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
42
    _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
42
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
42
    _operator_profile->add_child(_common_profile.get(), true);
553
42
    _operator_profile->add_child(_custom_profile.get(), true);
554
42
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
42
    if constexpr (!is_fake_shared) {
556
42
        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
42
        } 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
42
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
42
            _dependency = _shared_state->create_source_dependency(
572
42
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
42
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
42
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
42
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
42
    }
581
582
42
    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
42
    _rows_returned_counter =
587
42
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
42
    _blocks_returned_counter =
589
42
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
42
    _output_block_bytes_counter =
591
42
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
42
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
42
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
42
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
42
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
42
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
42
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
42
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
42
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
42
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
42
    _memory_used_counter =
602
42
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
42
    _common_profile->add_info_string("IsColocate",
604
42
                                     std::to_string(_parent->is_colocated_operator()));
605
42
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
42
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
42
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
42
    return Status::OK();
609
42
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
87.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
87.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
87.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
87.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
87.1k
    _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
87.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
87.1k
    _operator_profile->add_child(_common_profile.get(), true);
553
87.1k
    _operator_profile->add_child(_custom_profile.get(), true);
554
87.1k
    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
87.1k
    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
87.1k
    _rows_returned_counter =
587
87.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
87.1k
    _blocks_returned_counter =
589
87.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
87.1k
    _output_block_bytes_counter =
591
87.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
87.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
87.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
87.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
87.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
87.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
87.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
87.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
87.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
87.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
87.1k
    _memory_used_counter =
602
87.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
87.1k
    _common_profile->add_info_string("IsColocate",
604
87.1k
                                     std::to_string(_parent->is_colocated_operator()));
605
87.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
87.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
87.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
87.1k
    return Status::OK();
609
87.1k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
544
2.42k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
2.42k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
2.42k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
2.42k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
2.42k
    _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
2.42k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
2.42k
    _operator_profile->add_child(_common_profile.get(), true);
553
2.42k
    _operator_profile->add_child(_custom_profile.get(), true);
554
2.42k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
2.42k
    if constexpr (!is_fake_shared) {
556
2.42k
        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
2.42k
        } 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
318
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
318
            _dependency = _shared_state->create_source_dependency(
572
318
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
318
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
318
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
2.10k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
2.10k
        }
580
2.42k
    }
581
582
2.42k
    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
2.42k
    _rows_returned_counter =
587
2.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
2.42k
    _blocks_returned_counter =
589
2.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
2.42k
    _output_block_bytes_counter =
591
2.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
2.42k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
2.42k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
2.42k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
2.42k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.42k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
2.42k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
2.42k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
2.42k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
2.42k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
2.42k
    _memory_used_counter =
602
2.42k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
2.42k
    _common_profile->add_info_string("IsColocate",
604
2.42k
                                     std::to_string(_parent->is_colocated_operator()));
605
2.42k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
2.42k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
2.42k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
2.42k
    return Status::OK();
609
2.42k
}
_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
3.06k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
3.06k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
3.06k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
3.06k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
3.06k
    _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.06k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
3.06k
    _operator_profile->add_child(_common_profile.get(), true);
553
3.06k
    _operator_profile->add_child(_custom_profile.get(), true);
554
3.06k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
3.06k
    if constexpr (!is_fake_shared) {
556
3.06k
        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.06k
        } 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.06k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
570
571
3.06k
            _dependency = _shared_state->create_source_dependency(
572
3.06k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
573
3.06k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
574
3.06k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
575
3.06k
        } else {
576
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
                DCHECK(false);
578
            }
579
0
        }
580
3.06k
    }
581
582
3.06k
    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.06k
    _rows_returned_counter =
587
3.06k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
3.06k
    _blocks_returned_counter =
589
3.06k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
3.06k
    _output_block_bytes_counter =
591
3.06k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
3.06k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
3.06k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
3.06k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
3.06k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
3.06k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
3.06k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
3.06k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
3.06k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
3.06k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
3.06k
    _memory_used_counter =
602
3.06k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
3.06k
    _common_profile->add_info_string("IsColocate",
604
3.06k
                                     std::to_string(_parent->is_colocated_operator()));
605
3.06k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
3.06k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
3.06k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
3.06k
    return Status::OK();
609
3.06k
}
_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
76.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
545
76.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
546
76.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
547
76.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
548
76.0k
    _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
76.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
552
76.0k
    _operator_profile->add_child(_common_profile.get(), true);
553
76.0k
    _operator_profile->add_child(_custom_profile.get(), true);
554
76.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
555
76.0k
    if constexpr (!is_fake_shared) {
556
76.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
557
76.0k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
558
76.0k
                                    .first.get()
559
76.0k
                                    ->template cast<SharedStateArg>();
560
561
76.0k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
562
76.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
563
76.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
564
76.0k
        } 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
1
        } else {
576
1
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
577
1
                DCHECK(false);
578
1
            }
579
1
        }
580
76.0k
    }
581
582
76.0k
    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
76.0k
    _rows_returned_counter =
587
76.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
588
76.0k
    _blocks_returned_counter =
589
76.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
590
76.0k
    _output_block_bytes_counter =
591
76.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
592
76.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
593
76.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
594
76.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
595
76.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
76.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
597
76.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
598
76.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
599
76.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
600
76.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
601
76.0k
    _memory_used_counter =
602
76.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
603
76.0k
    _common_profile->add_info_string("IsColocate",
604
76.0k
                                     std::to_string(_parent->is_colocated_operator()));
605
76.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
606
76.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
607
76.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
608
76.0k
    return Status::OK();
609
76.0k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
610
611
template <typename SharedStateArg>
612
275k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
275k
    _conjuncts.resize(_parent->_conjuncts.size());
614
275k
    _projections.resize(_parent->_projections.size());
615
387k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
112k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
112k
    }
618
806k
    for (size_t i = 0; i < _projections.size(); i++) {
619
531k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
531k
    }
621
275k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
277k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
2.49k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
17.9k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
15.4k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
15.4k
                    state, _intermediate_projections[i][j]));
627
15.4k
        }
628
2.49k
    }
629
275k
    return Status::OK();
630
275k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
27.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
27.1k
    _conjuncts.resize(_parent->_conjuncts.size());
614
27.1k
    _projections.resize(_parent->_projections.size());
615
27.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
101k
    for (size_t i = 0; i < _projections.size(); i++) {
619
74.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
74.4k
    }
621
27.1k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
27.5k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
396
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
4.96k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
4.56k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
4.56k
                    state, _intermediate_projections[i][j]));
627
4.56k
        }
628
396
    }
629
27.1k
    return Status::OK();
630
27.1k
}
_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
42.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
42.0k
    _conjuncts.resize(_parent->_conjuncts.size());
614
42.0k
    _projections.resize(_parent->_projections.size());
615
42.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
42.0k
    for (size_t i = 0; i < _projections.size(); i++) {
619
36
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
36
    }
621
42.0k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
42.0k
    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
42.0k
    return Status::OK();
630
42.0k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
15
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
15
    _conjuncts.resize(_parent->_conjuncts.size());
614
15
    _projections.resize(_parent->_projections.size());
615
15
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
15
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
15
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
15
    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
15
    return Status::OK();
630
15
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
2.28k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
2.28k
    _conjuncts.resize(_parent->_conjuncts.size());
614
2.28k
    _projections.resize(_parent->_projections.size());
615
2.28k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
20.2k
    for (size_t i = 0; i < _projections.size(); i++) {
619
18.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
18.0k
    }
621
2.28k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
2.34k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
64
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
384
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
320
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
320
                    state, _intermediate_projections[i][j]));
627
320
        }
628
64
    }
629
2.28k
    return Status::OK();
630
2.28k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
40
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
40
    _conjuncts.resize(_parent->_conjuncts.size());
614
40
    _projections.resize(_parent->_projections.size());
615
40
    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
    for (size_t i = 0; i < _projections.size(); i++) {
619
44
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
44
    }
621
40
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
40
    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
40
    return Status::OK();
630
40
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
34.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
34.9k
    _conjuncts.resize(_parent->_conjuncts.size());
614
34.9k
    _projections.resize(_parent->_projections.size());
615
36.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
1.24k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
1.24k
    }
618
63.6k
    for (size_t i = 0; i < _projections.size(); i++) {
619
28.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
28.7k
    }
621
34.9k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
34.9k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
57
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
420
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
363
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
363
                    state, _intermediate_projections[i][j]));
627
363
        }
628
57
    }
629
34.9k
    return Status::OK();
630
34.9k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
46
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
46
    _conjuncts.resize(_parent->_conjuncts.size());
614
46
    _projections.resize(_parent->_projections.size());
615
46
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
110
    for (size_t i = 0; i < _projections.size(); i++) {
619
64
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
64
    }
621
46
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
46
    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
46
    return Status::OK();
630
46
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
87.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
87.1k
    _conjuncts.resize(_parent->_conjuncts.size());
614
87.1k
    _projections.resize(_parent->_projections.size());
615
196k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
109k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
109k
    }
618
491k
    for (size_t i = 0; i < _projections.size(); i++) {
619
404k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
404k
    }
621
87.1k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
89.1k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
623
1.98k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
624
12.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
625
10.1k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
626
10.1k
                    state, _intermediate_projections[i][j]));
627
10.1k
        }
628
1.98k
    }
629
87.1k
    return Status::OK();
630
87.1k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
612
2.42k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
2.42k
    _conjuncts.resize(_parent->_conjuncts.size());
614
2.42k
    _projections.resize(_parent->_projections.size());
615
2.42k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
8.10k
    for (size_t i = 0; i < _projections.size(); i++) {
619
5.68k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
5.68k
    }
621
2.42k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
2.42k
    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
2.42k
    return Status::OK();
630
2.42k
}
_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
3.06k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
3.06k
    _conjuncts.resize(_parent->_conjuncts.size());
614
3.06k
    _projections.resize(_parent->_projections.size());
615
4.70k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
1.64k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
1.64k
    }
618
3.06k
    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.06k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
3.06k
    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.06k
    return Status::OK();
630
3.06k
}
_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
75.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
613
75.9k
    _conjuncts.resize(_parent->_conjuncts.size());
614
75.9k
    _projections.resize(_parent->_projections.size());
615
75.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
616
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
617
0
    }
618
75.9k
    for (size_t i = 0; i < _projections.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
620
0
    }
621
75.9k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
622
75.9k
    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
75.9k
    return Status::OK();
630
75.9k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
631
632
template <typename SharedStateArg>
633
1.53k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
1.53k
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
1.53k
    _terminated = true;
638
1.53k
    return Status::OK();
639
1.53k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
48
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
48
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
48
    _terminated = true;
638
48
    return Status::OK();
639
48
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
2
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
2
    _terminated = true;
638
2
    return Status::OK();
639
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
35
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
35
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
35
    _terminated = true;
638
35
    return Status::OK();
639
35
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
10
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
10
    _terminated = true;
638
10
    return Status::OK();
639
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
1.13k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
1.13k
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
1.13k
    _terminated = true;
638
1.13k
    return Status::OK();
639
1.13k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
633
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
1
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
1
    _terminated = true;
638
1
    return Status::OK();
639
1
}
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
303
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
634
303
    if (_terminated) {
635
0
        return Status::OK();
636
0
    }
637
303
    _terminated = true;
638
303
    return Status::OK();
639
303
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
640
641
template <typename SharedStateArg>
642
318k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
318k
    if (_closed) {
644
43.9k
        return Status::OK();
645
43.9k
    }
646
274k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
187k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
187k
    }
649
274k
    _closed = true;
650
274k
    return Status::OK();
651
318k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
27.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
27.1k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
27.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
27.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
27.1k
    }
649
27.1k
    _closed = true;
650
27.1k
    return Status::OK();
651
27.1k
}
_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
83.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
83.7k
    if (_closed) {
644
41.9k
        return Status::OK();
645
41.9k
    }
646
41.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
41.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
41.8k
    }
649
41.8k
    _closed = true;
650
41.8k
    return Status::OK();
651
83.7k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
15
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
15
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
15
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
15
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
15
    }
649
15
    _closed = true;
650
15
    return Status::OK();
651
15
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
2.28k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
2.28k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
2.28k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
2.28k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
2.28k
    }
649
2.28k
    _closed = true;
650
2.28k
    return Status::OK();
651
2.28k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
57
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
57
    if (_closed) {
644
27
        return Status::OK();
645
27
    }
646
30
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
30
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
30
    }
649
30
    _closed = true;
650
30
    return Status::OK();
651
57
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
34.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
34.8k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
34.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
34.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
34.8k
    }
649
34.8k
    _closed = true;
650
34.8k
    return Status::OK();
651
34.8k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
41
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
41
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
41
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
41
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
41
    }
649
41
    _closed = true;
650
41
    return Status::OK();
651
41
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
89.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
89.1k
    if (_closed) {
644
1.99k
        return Status::OK();
645
1.99k
    }
646
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
    }
649
87.1k
    _closed = true;
650
87.1k
    return Status::OK();
651
89.1k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
2.41k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
2.41k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
2.41k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
2.41k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
2.41k
    }
649
2.41k
    _closed = true;
650
2.41k
    return Status::OK();
651
2.41k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
3.06k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
3.06k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
3.06k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
3.06k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
3.06k
    }
649
3.06k
    _closed = true;
650
3.06k
    return Status::OK();
651
3.06k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
642
76.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
643
76.0k
    if (_closed) {
644
0
        return Status::OK();
645
0
    }
646
76.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
647
76.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
648
76.0k
    }
649
76.0k
    _closed = true;
650
76.0k
    return Status::OK();
651
76.0k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
652
653
template <typename SharedState>
654
313k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
313k
    _operator_profile =
657
313k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
313k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
313k
    _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
313k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
313k
    _operator_profile->add_child(_common_profile, true);
666
313k
    _operator_profile->add_child(_custom_profile, true);
667
668
313k
    _operator_profile->set_metadata(_parent->node_id());
669
313k
    _wait_for_finish_dependency_timer =
670
313k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
313k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
313k
    if constexpr (!is_fake_shared) {
673
226k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
226k
            info.shared_state_map.end()) {
675
22.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
19.8k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
19.8k
            }
678
22.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
22.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
22.7k
                                                  ? 0
681
22.7k
                                                  : info.task_idx]
682
22.7k
                                  .get();
683
22.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
204k
        } else {
685
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
18.4E
                DCHECK(false);
687
18.4E
            }
688
204k
            _shared_state = info.shared_state->template cast<SharedState>();
689
204k
            _dependency = _shared_state->create_sink_dependency(
690
204k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
204k
        }
692
226k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
226k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
226k
    }
695
696
313k
    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
313k
    _rows_input_counter =
701
313k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
313k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
313k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
313k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
313k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
313k
    _memory_used_counter =
707
313k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
313k
    _common_profile->add_info_string("IsColocate",
709
313k
                                     std::to_string(_parent->is_colocated_operator()));
710
313k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
313k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
313k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
313k
    return Status::OK();
714
313k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
75.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
75.1k
    _operator_profile =
657
75.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
75.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
75.1k
    _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
75.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
75.1k
    _operator_profile->add_child(_common_profile, true);
666
75.1k
    _operator_profile->add_child(_custom_profile, true);
667
668
75.1k
    _operator_profile->set_metadata(_parent->node_id());
669
75.1k
    _wait_for_finish_dependency_timer =
670
75.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
75.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
75.1k
    if constexpr (!is_fake_shared) {
673
75.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
75.1k
            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
2.92k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
2.92k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
2.92k
                                                  ? 0
681
2.92k
                                                  : info.task_idx]
682
2.92k
                                  .get();
683
2.92k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
72.2k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
72.2k
            _shared_state = info.shared_state->template cast<SharedState>();
689
72.2k
            _dependency = _shared_state->create_sink_dependency(
690
72.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
72.2k
        }
692
75.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
75.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
75.1k
    }
695
696
75.1k
    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
75.1k
    _rows_input_counter =
701
75.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
75.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
75.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
75.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
75.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
75.1k
    _memory_used_counter =
707
75.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
75.1k
    _common_profile->add_info_string("IsColocate",
709
75.1k
                                     std::to_string(_parent->is_colocated_operator()));
710
75.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
75.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
75.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
75.1k
    return Status::OK();
714
75.1k
}
_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
42.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
42.0k
    _operator_profile =
657
42.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
42.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
42.0k
    _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
42.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
42.0k
    _operator_profile->add_child(_common_profile, true);
666
42.0k
    _operator_profile->add_child(_custom_profile, true);
667
668
42.0k
    _operator_profile->set_metadata(_parent->node_id());
669
42.0k
    _wait_for_finish_dependency_timer =
670
42.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
42.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
42.0k
    if constexpr (!is_fake_shared) {
673
42.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
42.0k
            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
42.0k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
42.0k
            _shared_state = info.shared_state->template cast<SharedState>();
689
42.0k
            _dependency = _shared_state->create_sink_dependency(
690
42.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
42.0k
        }
692
42.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
42.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
42.0k
    }
695
696
42.0k
    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
42.0k
    _rows_input_counter =
701
42.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
42.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
42.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
42.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
42.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
42.0k
    _memory_used_counter =
707
42.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
42.0k
    _common_profile->add_info_string("IsColocate",
709
42.0k
                                     std::to_string(_parent->is_colocated_operator()));
710
42.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
42.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
42.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
42.0k
    return Status::OK();
714
42.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
22
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
22
    _operator_profile =
657
22
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
22
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
22
    _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
22
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
22
    _operator_profile->add_child(_common_profile, true);
666
22
    _operator_profile->add_child(_custom_profile, true);
667
668
22
    _operator_profile->set_metadata(_parent->node_id());
669
22
    _wait_for_finish_dependency_timer =
670
22
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
22
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
22
    if constexpr (!is_fake_shared) {
673
22
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
22
            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
22
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
22
            _shared_state = info.shared_state->template cast<SharedState>();
689
22
            _dependency = _shared_state->create_sink_dependency(
690
22
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
22
        }
692
22
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
22
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
22
    }
695
696
22
    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
22
    _rows_input_counter =
701
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
22
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
22
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
22
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
22
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
22
    _memory_used_counter =
707
22
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
22
    _common_profile->add_info_string("IsColocate",
709
22
                                     std::to_string(_parent->is_colocated_operator()));
710
22
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
22
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
22
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
22
    return Status::OK();
714
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
2.28k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
2.28k
    _operator_profile =
657
2.28k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
2.28k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
2.28k
    _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.28k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
2.28k
    _operator_profile->add_child(_common_profile, true);
666
2.28k
    _operator_profile->add_child(_custom_profile, true);
667
668
2.28k
    _operator_profile->set_metadata(_parent->node_id());
669
2.28k
    _wait_for_finish_dependency_timer =
670
2.28k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
2.28k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
2.28k
    if constexpr (!is_fake_shared) {
673
2.28k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
2.28k
            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.28k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
2.28k
            _shared_state = info.shared_state->template cast<SharedState>();
689
2.28k
            _dependency = _shared_state->create_sink_dependency(
690
2.28k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
2.28k
        }
692
2.28k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
2.28k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
2.28k
    }
695
696
2.28k
    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.28k
    _rows_input_counter =
701
2.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
2.28k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
2.28k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
2.28k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
2.28k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
2.28k
    _memory_used_counter =
707
2.28k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
2.28k
    _common_profile->add_info_string("IsColocate",
709
2.28k
                                     std::to_string(_parent->is_colocated_operator()));
710
2.28k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
2.28k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
2.28k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
2.28k
    return Status::OK();
714
2.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
40
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
40
    _operator_profile =
657
40
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
40
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
40
    _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
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
40
    _operator_profile->add_child(_common_profile, true);
666
40
    _operator_profile->add_child(_custom_profile, true);
667
668
40
    _operator_profile->set_metadata(_parent->node_id());
669
40
    _wait_for_finish_dependency_timer =
670
40
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
40
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
40
    if constexpr (!is_fake_shared) {
673
40
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
40
            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
40
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
40
            _shared_state = info.shared_state->template cast<SharedState>();
689
40
            _dependency = _shared_state->create_sink_dependency(
690
40
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
40
        }
692
40
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
40
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
40
    }
695
696
40
    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
    _rows_input_counter =
701
40
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
40
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
40
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
40
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
40
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
40
    _memory_used_counter =
707
40
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
40
    _common_profile->add_info_string("IsColocate",
709
40
                                     std::to_string(_parent->is_colocated_operator()));
710
40
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
40
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
40
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
40
    return Status::OK();
714
40
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
34.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
34.9k
    _operator_profile =
657
34.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
34.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
34.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
34.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
34.9k
    _operator_profile->add_child(_common_profile, true);
666
34.9k
    _operator_profile->add_child(_custom_profile, true);
667
668
34.9k
    _operator_profile->set_metadata(_parent->node_id());
669
34.9k
    _wait_for_finish_dependency_timer =
670
34.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
34.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
34.9k
    if constexpr (!is_fake_shared) {
673
34.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
34.9k
            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
34.9k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
34.9k
            _shared_state = info.shared_state->template cast<SharedState>();
689
34.9k
            _dependency = _shared_state->create_sink_dependency(
690
34.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
34.9k
        }
692
34.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
34.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
34.9k
    }
695
696
34.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
34.9k
    _rows_input_counter =
701
34.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
34.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
34.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
34.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
34.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
34.9k
    _memory_used_counter =
707
34.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
34.9k
    _common_profile->add_info_string("IsColocate",
709
34.9k
                                     std::to_string(_parent->is_colocated_operator()));
710
34.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
34.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
34.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
34.9k
    return Status::OK();
714
34.9k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
52
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
52
    _operator_profile =
657
52
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
52
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
52
    _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
52
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
52
    _operator_profile->add_child(_common_profile, true);
666
52
    _operator_profile->add_child(_custom_profile, true);
667
668
52
    _operator_profile->set_metadata(_parent->node_id());
669
52
    _wait_for_finish_dependency_timer =
670
52
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
52
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
52
    if constexpr (!is_fake_shared) {
673
52
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
52
            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
52
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
52
            _shared_state = info.shared_state->template cast<SharedState>();
689
52
            _dependency = _shared_state->create_sink_dependency(
690
52
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
52
        }
692
52
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
52
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
52
    }
695
696
52
    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
52
    _rows_input_counter =
701
52
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
52
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
52
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
52
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
52
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
52
    _memory_used_counter =
707
52
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
52
    _common_profile->add_info_string("IsColocate",
709
52
                                     std::to_string(_parent->is_colocated_operator()));
710
52
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
52
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
52
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
52
    return Status::OK();
714
52
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
86.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
86.6k
    _operator_profile =
657
86.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
86.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
86.6k
    _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
86.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
86.6k
    _operator_profile->add_child(_common_profile, true);
666
86.6k
    _operator_profile->add_child(_custom_profile, true);
667
668
86.6k
    _operator_profile->set_metadata(_parent->node_id());
669
86.6k
    _wait_for_finish_dependency_timer =
670
86.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
86.6k
    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
86.6k
    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
86.6k
    _rows_input_counter =
701
86.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
86.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
86.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
86.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
86.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
86.6k
    _memory_used_counter =
707
86.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
86.6k
    _common_profile->add_info_string("IsColocate",
709
86.6k
                                     std::to_string(_parent->is_colocated_operator()));
710
86.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
86.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
86.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
86.6k
    return Status::OK();
714
86.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
655
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
655
    _operator_profile =
657
655
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
655
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
655
    _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
655
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
655
    _operator_profile->add_child(_common_profile, true);
666
655
    _operator_profile->add_child(_custom_profile, true);
667
668
655
    _operator_profile->set_metadata(_parent->node_id());
669
655
    _wait_for_finish_dependency_timer =
670
655
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
655
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
655
    if constexpr (!is_fake_shared) {
673
655
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
655
            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
655
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
655
            _shared_state = info.shared_state->template cast<SharedState>();
689
655
            _dependency = _shared_state->create_sink_dependency(
690
655
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
655
        }
692
655
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
655
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
655
    }
695
696
655
    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
655
    _rows_input_counter =
701
655
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
655
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
655
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
655
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
655
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
655
    _memory_used_counter =
707
655
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
655
    _common_profile->add_info_string("IsColocate",
709
655
                                     std::to_string(_parent->is_colocated_operator()));
710
655
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
655
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
655
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
655
    return Status::OK();
714
655
}
_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
1.02k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
1.02k
    _operator_profile =
657
1.02k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
1.02k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
1.02k
    _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.02k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
1.02k
    _operator_profile->add_child(_common_profile, true);
666
1.02k
    _operator_profile->add_child(_custom_profile, true);
667
668
1.02k
    _operator_profile->set_metadata(_parent->node_id());
669
1.02k
    _wait_for_finish_dependency_timer =
670
1.02k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
1.02k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
1.02k
    if constexpr (!is_fake_shared) {
673
1.02k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
1.02k
            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.02k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
1.02k
            _shared_state = info.shared_state->template cast<SharedState>();
689
1.02k
            _dependency = _shared_state->create_sink_dependency(
690
1.02k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
1.02k
        }
692
1.02k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
1.02k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
1.02k
    }
695
696
1.02k
    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.02k
    _rows_input_counter =
701
1.02k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
1.02k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
1.02k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
1.02k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
1.02k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
1.02k
    _memory_used_counter =
707
1.02k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
1.02k
    _common_profile->add_info_string("IsColocate",
709
1.02k
                                     std::to_string(_parent->is_colocated_operator()));
710
1.02k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
1.02k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
1.02k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
1.02k
    return Status::OK();
714
1.02k
}
_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
19.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
19.8k
    _operator_profile =
657
19.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
19.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
19.8k
    _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
19.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
19.8k
    _operator_profile->add_child(_common_profile, true);
666
19.8k
    _operator_profile->add_child(_custom_profile, true);
667
668
19.8k
    _operator_profile->set_metadata(_parent->node_id());
669
19.8k
    _wait_for_finish_dependency_timer =
670
19.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
19.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
19.8k
    if constexpr (!is_fake_shared) {
673
19.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
19.8k
            info.shared_state_map.end()) {
675
19.8k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
676
19.8k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
677
19.8k
            }
678
19.8k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
679
19.8k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
680
19.8k
                                                  ? 0
681
19.8k
                                                  : info.task_idx]
682
19.8k
                                  .get();
683
19.8k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
684
18.4E
        } else {
685
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
18.4E
                DCHECK(false);
687
18.4E
            }
688
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
689
18.4E
            _dependency = _shared_state->create_sink_dependency(
690
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
18.4E
        }
692
19.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
19.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
19.8k
    }
695
696
19.8k
    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
19.8k
    _rows_input_counter =
701
19.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
19.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
19.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
19.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
19.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
19.8k
    _memory_used_counter =
707
19.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
19.8k
    _common_profile->add_info_string("IsColocate",
709
19.8k
                                     std::to_string(_parent->is_colocated_operator()));
710
19.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
19.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
19.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
19.8k
    return Status::OK();
714
19.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
654
50.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
655
    // create profile
656
50.5k
    _operator_profile =
657
50.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
658
50.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
659
50.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
50.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
665
50.5k
    _operator_profile->add_child(_common_profile, true);
666
50.5k
    _operator_profile->add_child(_custom_profile, true);
667
668
50.5k
    _operator_profile->set_metadata(_parent->node_id());
669
50.5k
    _wait_for_finish_dependency_timer =
670
50.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
671
50.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
672
50.5k
    if constexpr (!is_fake_shared) {
673
50.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
674
50.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
50.5k
        } else {
685
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
686
                DCHECK(false);
687
            }
688
50.5k
            _shared_state = info.shared_state->template cast<SharedState>();
689
50.5k
            _dependency = _shared_state->create_sink_dependency(
690
50.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
691
50.5k
        }
692
50.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
693
50.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
694
50.5k
    }
695
696
50.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
50.5k
    _rows_input_counter =
701
50.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
702
50.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
703
50.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
704
50.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
705
50.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
706
50.5k
    _memory_used_counter =
707
50.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
708
50.5k
    _common_profile->add_info_string("IsColocate",
709
50.5k
                                     std::to_string(_parent->is_colocated_operator()));
710
50.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
711
50.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
712
50.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
713
50.5k
    return Status::OK();
714
50.5k
}
_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
312k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
312k
    if (_closed) {
719
2
        return Status::OK();
720
2
    }
721
312k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
226k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
226k
    }
724
312k
    _closed = true;
725
312k
    return Status::OK();
726
312k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
75.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
75.1k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
75.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
75.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
75.1k
    }
724
75.1k
    _closed = true;
725
75.1k
    return Status::OK();
726
75.1k
}
_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
41.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
41.9k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
41.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
41.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
41.9k
    }
724
41.9k
    _closed = true;
725
41.9k
    return Status::OK();
726
41.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
13
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
13
    if (_closed) {
719
2
        return Status::OK();
720
2
    }
721
11
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
11
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
11
    }
724
11
    _closed = true;
725
11
    return Status::OK();
726
13
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
2.28k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
2.28k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
2.28k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
2.28k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
2.28k
    }
724
2.28k
    _closed = true;
725
2.28k
    return Status::OK();
726
2.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
30
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
30
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
30
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
30
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
30
    }
724
30
    _closed = true;
725
30
    return Status::OK();
726
30
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
34.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
34.7k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
34.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
34.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
34.7k
    }
724
34.7k
    _closed = true;
725
34.7k
    return Status::OK();
726
34.7k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
41
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
41
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
41
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
41
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
41
    }
724
41
    _closed = true;
725
41
    return Status::OK();
726
41
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
86.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
86.5k
    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
86.5k
    _closed = true;
725
86.5k
    return Status::OK();
726
86.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
651
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
651
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
651
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
651
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
651
    }
724
651
    _closed = true;
725
651
    return Status::OK();
726
651
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
1.02k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
1.02k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
1.02k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
1.02k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
1.02k
    }
724
1.02k
    _closed = true;
725
1.02k
    return Status::OK();
726
1.02k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
19.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
19.8k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
19.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
19.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
19.8k
    }
724
19.8k
    _closed = true;
725
19.8k
    return Status::OK();
726
19.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
717
50.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
718
50.5k
    if (_closed) {
719
0
        return Status::OK();
720
0
    }
721
50.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
722
50.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
723
50.5k
    }
724
50.5k
    _closed = true;
725
50.5k
    return Status::OK();
726
50.5k
}
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
3.82k
                                                          bool* eos) {
731
3.82k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
3.81k
    return pull(state, block, eos);
733
3.82k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
730
204
                                                          bool* eos) {
731
204
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
204
    return pull(state, block, eos);
733
204
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
730
3.61k
                                                          bool* eos) {
731
3.61k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
732
3.61k
    return pull(state, block, eos);
733
3.61k
}
734
735
template <typename LocalStateType>
736
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
19.4k
                                                         bool* eos) {
738
19.4k
    auto& local_state = get_local_state(state);
739
19.4k
    if (need_more_input_data(state)) {
740
19.4k
        local_state._child_block->clear_column_data(
741
19.4k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
19.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
19.4k
                state, local_state._child_block.get(), &local_state._child_eos));
744
19.4k
        *eos = local_state._child_eos;
745
19.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
2.17k
            return Status::OK();
747
2.17k
        }
748
17.2k
        {
749
17.2k
            SCOPED_TIMER(local_state.exec_time_counter());
750
17.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
17.2k
        }
752
17.2k
    }
753
754
17.3k
    if (!need_more_input_data(state)) {
755
11.8k
        SCOPED_TIMER(local_state.exec_time_counter());
756
11.8k
        bool new_eos = false;
757
11.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
11.8k
        if (new_eos) {
759
8.82k
            *eos = true;
760
8.82k
        } else if (!need_more_input_data(state)) {
761
27
            *eos = false;
762
27
        }
763
11.8k
    }
764
17.3k
    return Status::OK();
765
17.3k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
5.18k
                                                         bool* eos) {
738
5.18k
    auto& local_state = get_local_state(state);
739
5.18k
    if (need_more_input_data(state)) {
740
5.11k
        local_state._child_block->clear_column_data(
741
5.11k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
5.11k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
5.11k
                state, local_state._child_block.get(), &local_state._child_eos));
744
5.11k
        *eos = local_state._child_eos;
745
5.11k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
476
            return Status::OK();
747
476
        }
748
4.63k
        {
749
4.63k
            SCOPED_TIMER(local_state.exec_time_counter());
750
4.63k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
4.63k
        }
752
4.63k
    }
753
754
4.71k
    if (!need_more_input_data(state)) {
755
4.70k
        SCOPED_TIMER(local_state.exec_time_counter());
756
4.70k
        bool new_eos = false;
757
4.70k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
4.70k
        if (new_eos) {
759
3.14k
            *eos = true;
760
3.14k
        } else if (!need_more_input_data(state)) {
761
27
            *eos = false;
762
27
        }
763
4.70k
    }
764
4.71k
    return Status::OK();
765
4.71k
}
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
1.53k
                                                         bool* eos) {
738
1.53k
    auto& local_state = get_local_state(state);
739
1.53k
    if (need_more_input_data(state)) {
740
1.53k
        local_state._child_block->clear_column_data(
741
1.53k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
1.53k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
1.53k
                state, local_state._child_block.get(), &local_state._child_eos));
744
1.53k
        *eos = local_state._child_eos;
745
1.53k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
466
            return Status::OK();
747
466
        }
748
1.06k
        {
749
1.06k
            SCOPED_TIMER(local_state.exec_time_counter());
750
1.06k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
1.06k
        }
752
1.06k
    }
753
754
1.06k
    if (!need_more_input_data(state)) {
755
1.06k
        SCOPED_TIMER(local_state.exec_time_counter());
756
1.06k
        bool new_eos = false;
757
1.06k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
1.06k
        if (new_eos) {
759
467
            *eos = true;
760
598
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
1.06k
    }
764
1.06k
    return Status::OK();
765
1.06k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
8.31k
                                                         bool* eos) {
738
8.31k
    auto& local_state = get_local_state(state);
739
8.31k
    if (need_more_input_data(state)) {
740
8.30k
        local_state._child_block->clear_column_data(
741
8.30k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
8.30k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
8.30k
                state, local_state._child_block.get(), &local_state._child_eos));
744
8.30k
        *eos = local_state._child_eos;
745
8.30k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
193
            return Status::OK();
747
193
        }
748
8.11k
        {
749
8.11k
            SCOPED_TIMER(local_state.exec_time_counter());
750
8.11k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
8.11k
        }
752
8.11k
    }
753
754
8.12k
    if (!need_more_input_data(state)) {
755
2.70k
        SCOPED_TIMER(local_state.exec_time_counter());
756
2.70k
        bool new_eos = false;
757
2.70k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
2.70k
        if (new_eos) {
759
2.70k
            *eos = true;
760
2.70k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
2.70k
    }
764
8.12k
    return Status::OK();
765
8.12k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
314
                                                         bool* eos) {
738
314
    auto& local_state = get_local_state(state);
739
315
    if (need_more_input_data(state)) {
740
315
        local_state._child_block->clear_column_data(
741
315
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
315
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
315
                state, local_state._child_block.get(), &local_state._child_eos));
744
315
        *eos = local_state._child_eos;
745
315
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
17
            return Status::OK();
747
17
        }
748
298
        {
749
298
            SCOPED_TIMER(local_state.exec_time_counter());
750
298
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
298
        }
752
298
    }
753
754
297
    if (!need_more_input_data(state)) {
755
210
        SCOPED_TIMER(local_state.exec_time_counter());
756
210
        bool new_eos = false;
757
210
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
210
        if (new_eos) {
759
210
            *eos = true;
760
210
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
210
    }
764
297
    return Status::OK();
765
297
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
4.13k
                                                         bool* eos) {
738
4.13k
    auto& local_state = get_local_state(state);
739
4.13k
    if (need_more_input_data(state)) {
740
4.13k
        local_state._child_block->clear_column_data(
741
4.13k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
4.13k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
4.13k
                state, local_state._child_block.get(), &local_state._child_eos));
744
4.13k
        *eos = local_state._child_eos;
745
4.13k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
1.02k
            return Status::OK();
747
1.02k
        }
748
3.11k
        {
749
3.11k
            SCOPED_TIMER(local_state.exec_time_counter());
750
3.11k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
3.11k
        }
752
3.11k
    }
753
754
3.11k
    if (!need_more_input_data(state)) {
755
3.11k
        SCOPED_TIMER(local_state.exec_time_counter());
756
3.11k
        bool new_eos = false;
757
3.11k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
3.11k
        if (new_eos) {
759
2.27k
            *eos = true;
760
2.27k
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
3.11k
    }
764
3.11k
    return Status::OK();
765
3.11k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
18
                                                         bool* eos) {
738
18
    auto& local_state = get_local_state(state);
739
18
    if (need_more_input_data(state)) {
740
18
        local_state._child_block->clear_column_data(
741
18
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
742
18
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
743
18
                state, local_state._child_block.get(), &local_state._child_eos));
744
18
        *eos = local_state._child_eos;
745
18
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
746
0
            return Status::OK();
747
0
        }
748
18
        {
749
18
            SCOPED_TIMER(local_state.exec_time_counter());
750
18
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
751
18
        }
752
18
    }
753
754
18
    if (!need_more_input_data(state)) {
755
18
        SCOPED_TIMER(local_state.exec_time_counter());
756
18
        bool new_eos = false;
757
18
        RETURN_IF_ERROR(pull(state, block, &new_eos));
758
18
        if (new_eos) {
759
16
            *eos = true;
760
16
        } else if (!need_more_input_data(state)) {
761
0
            *eos = false;
762
0
        }
763
18
    }
764
18
    return Status::OK();
765
18
}
766
767
template <typename Writer, typename Parent>
768
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
769
11.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
11.5k
    RETURN_IF_ERROR(Base::init(state, info));
771
11.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
11.5k
                                                         "AsyncWriterDependency", true);
773
11.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
11.5k
                             _finish_dependency));
775
776
11.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
11.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
11.5k
    return Status::OK();
779
11.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
82
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
82
    RETURN_IF_ERROR(Base::init(state, info));
771
82
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
82
                                                         "AsyncWriterDependency", true);
773
82
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
82
                             _finish_dependency));
775
776
82
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
82
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
82
    return Status::OK();
779
82
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
44
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
44
    RETURN_IF_ERROR(Base::init(state, info));
771
44
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
44
                                                         "AsyncWriterDependency", true);
773
44
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
44
                             _finish_dependency));
775
776
44
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
44
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
44
    return Status::OK();
779
44
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
1.97k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
1.97k
    RETURN_IF_ERROR(Base::init(state, info));
771
1.97k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
1.97k
                                                         "AsyncWriterDependency", true);
773
1.97k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
1.97k
                             _finish_dependency));
775
776
1.97k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
1.97k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
1.97k
    return Status::OK();
779
1.97k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
4.67k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
4.67k
    RETURN_IF_ERROR(Base::init(state, info));
771
4.67k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
4.67k
                                                         "AsyncWriterDependency", true);
773
4.67k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
4.67k
                             _finish_dependency));
775
776
4.67k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
4.67k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
4.67k
    return Status::OK();
779
4.67k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
2.58k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
2.58k
    RETURN_IF_ERROR(Base::init(state, info));
771
2.58k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
2.58k
                                                         "AsyncWriterDependency", true);
773
2.58k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
2.58k
                             _finish_dependency));
775
776
2.58k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
2.58k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
2.58k
    return Status::OK();
779
2.58k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
1.69k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
1.69k
    RETURN_IF_ERROR(Base::init(state, info));
771
1.69k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
1.69k
                                                         "AsyncWriterDependency", true);
773
1.69k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
1.69k
                             _finish_dependency));
775
776
1.69k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
1.69k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
1.69k
    return Status::OK();
779
1.69k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
16
    RETURN_IF_ERROR(Base::init(state, info));
771
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
16
                                                         "AsyncWriterDependency", true);
773
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
16
                             _finish_dependency));
775
776
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
16
    return Status::OK();
779
16
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
80
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
80
    RETURN_IF_ERROR(Base::init(state, info));
771
80
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
80
                                                         "AsyncWriterDependency", true);
773
80
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
80
                             _finish_dependency));
775
776
80
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
80
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
80
    return Status::OK();
779
80
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
320
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
320
    RETURN_IF_ERROR(Base::init(state, info));
771
320
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
320
                                                         "AsyncWriterDependency", true);
773
320
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
320
                             _finish_dependency));
775
776
320
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
320
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
320
    return Status::OK();
779
320
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
769
78
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
770
78
    RETURN_IF_ERROR(Base::init(state, info));
771
78
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
772
78
                                                         "AsyncWriterDependency", true);
773
78
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
774
78
                             _finish_dependency));
775
776
78
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
777
78
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
778
78
    return Status::OK();
779
78
}
780
781
template <typename Writer, typename Parent>
782
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
783
11.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
11.5k
    RETURN_IF_ERROR(Base::open(state));
785
11.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
126k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
115k
        RETURN_IF_ERROR(
788
115k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
115k
    }
790
11.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
11.5k
    return Status::OK();
792
11.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
82
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
82
    RETURN_IF_ERROR(Base::open(state));
785
82
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
471
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
389
        RETURN_IF_ERROR(
788
389
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
389
    }
790
82
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
82
    return Status::OK();
792
82
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
44
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
44
    RETURN_IF_ERROR(Base::open(state));
785
44
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
206
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
162
        RETURN_IF_ERROR(
788
162
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
162
    }
790
44
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
44
    return Status::OK();
792
44
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
1.97k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
1.97k
    RETURN_IF_ERROR(Base::open(state));
785
1.97k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
4.40k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
2.43k
        RETURN_IF_ERROR(
788
2.43k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
2.43k
    }
790
1.97k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
1.97k
    return Status::OK();
792
1.97k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
4.63k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
4.63k
    RETURN_IF_ERROR(Base::open(state));
785
4.63k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
28.4k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
23.8k
        RETURN_IF_ERROR(
788
23.8k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
23.8k
    }
790
4.63k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
4.63k
    return Status::OK();
792
4.63k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
2.58k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
2.58k
    RETURN_IF_ERROR(Base::open(state));
785
2.58k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
69.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
66.5k
        RETURN_IF_ERROR(
788
66.5k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
66.5k
    }
790
2.58k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
2.58k
    return Status::OK();
792
2.58k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
1.69k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
1.69k
    RETURN_IF_ERROR(Base::open(state));
785
1.69k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
21.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
19.4k
        RETURN_IF_ERROR(
788
19.4k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
19.4k
    }
790
1.69k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
1.69k
    return Status::OK();
792
1.69k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
16
    RETURN_IF_ERROR(Base::open(state));
785
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
64
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
48
        RETURN_IF_ERROR(
788
48
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
48
    }
790
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
16
    return Status::OK();
792
16
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
80
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
80
    RETURN_IF_ERROR(Base::open(state));
785
80
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
240
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
160
        RETURN_IF_ERROR(
788
160
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
160
    }
790
80
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
80
    return Status::OK();
792
80
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
320
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
320
    RETURN_IF_ERROR(Base::open(state));
785
320
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
2.20k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
1.88k
        RETURN_IF_ERROR(
788
1.88k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
1.88k
    }
790
320
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
320
    return Status::OK();
792
320
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
783
78
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
784
78
    RETURN_IF_ERROR(Base::open(state));
785
78
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
786
393
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
787
315
        RETURN_IF_ERROR(
788
315
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
789
315
    }
790
78
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
791
78
    return Status::OK();
792
78
}
793
794
template <typename Writer, typename Parent>
795
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
796
16.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
16.3k
    return _writer->sink(block, eos);
798
16.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
397
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
397
    return _writer->sink(block, eos);
798
397
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
56
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
56
    return _writer->sink(block, eos);
798
56
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
3.40k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
3.40k
    return _writer->sink(block, eos);
798
3.40k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_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_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
3.76k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
3.76k
    return _writer->sink(block, eos);
798
3.76k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
2.67k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
2.67k
    return _writer->sink(block, eos);
798
2.67k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
20
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
20
    return _writer->sink(block, eos);
798
20
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
90
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
90
    return _writer->sink(block, eos);
798
90
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
397
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
397
    return _writer->sink(block, eos);
798
397
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
796
155
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
797
155
    return _writer->sink(block, eos);
798
155
}
799
800
template <typename Writer, typename Parent>
801
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
802
11.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
11.5k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
11.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
11.5k
    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
11.5k
    if (_writer) {
810
11.5k
        Status st = _writer->get_writer_status();
811
11.5k
        if (exec_status.ok()) {
812
11.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
11.4k
                                                       : Status::Cancelled("force close"));
814
11.4k
        } else {
815
65
            _writer->force_close(exec_status);
816
65
        }
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
11.5k
        RETURN_IF_ERROR(st);
821
11.5k
    }
822
11.5k
    return Base::close(state, exec_status);
823
11.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
82
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
82
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
82
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
82
    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
82
    if (_writer) {
810
82
        Status st = _writer->get_writer_status();
811
82
        if (exec_status.ok()) {
812
82
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
82
                                                       : Status::Cancelled("force close"));
814
82
        } 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
82
        RETURN_IF_ERROR(st);
821
82
    }
822
82
    return Base::close(state, exec_status);
823
82
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
44
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
44
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
44
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
44
    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
44
    if (_writer) {
810
44
        Status st = _writer->get_writer_status();
811
44
        if (exec_status.ok()) {
812
44
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
44
                                                       : Status::Cancelled("force close"));
814
44
        } 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
44
        RETURN_IF_ERROR(st);
821
44
    }
822
40
    return Base::close(state, exec_status);
823
44
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
1.97k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
1.97k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
1.97k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
1.97k
    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
1.97k
    if (_writer) {
810
1.97k
        Status st = _writer->get_writer_status();
811
1.97k
        if (exec_status.ok()) {
812
1.97k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
1.97k
                                                       : Status::Cancelled("force close"));
814
1.97k
        } 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
1.97k
        RETURN_IF_ERROR(st);
821
1.97k
    }
822
1.97k
    return Base::close(state, exec_status);
823
1.97k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
4.66k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
4.66k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
4.66k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
4.66k
    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.66k
    if (_writer) {
810
4.66k
        Status st = _writer->get_writer_status();
811
4.66k
        if (exec_status.ok()) {
812
4.60k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
4.60k
                                                       : Status::Cancelled("force close"));
814
4.60k
        } else {
815
65
            _writer->force_close(exec_status);
816
65
        }
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.66k
        RETURN_IF_ERROR(st);
821
4.66k
    }
822
4.66k
    return Base::close(state, exec_status);
823
4.66k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
2.58k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
2.58k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
2.58k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
2.58k
    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
2.58k
    if (_writer) {
810
2.58k
        Status st = _writer->get_writer_status();
811
2.58k
        if (exec_status.ok()) {
812
2.58k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
2.58k
                                                       : Status::Cancelled("force close"));
814
2.58k
        } 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
2.58k
        RETURN_IF_ERROR(st);
821
2.58k
    }
822
2.58k
    return Base::close(state, exec_status);
823
2.58k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
1.69k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
1.69k
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
1.69k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
1.69k
    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
1.69k
    if (_writer) {
810
1.69k
        Status st = _writer->get_writer_status();
811
1.69k
        if (exec_status.ok()) {
812
1.69k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
1.69k
                                                       : Status::Cancelled("force close"));
814
1.69k
        } 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
1.69k
        RETURN_IF_ERROR(st);
821
1.69k
    }
822
1.69k
    return Base::close(state, exec_status);
823
1.69k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
16
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
16
    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
16
    if (_writer) {
810
16
        Status st = _writer->get_writer_status();
811
16
        if (exec_status.ok()) {
812
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
16
                                                       : Status::Cancelled("force close"));
814
16
        } 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
16
        RETURN_IF_ERROR(st);
821
16
    }
822
16
    return Base::close(state, exec_status);
823
16
}
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
80
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
80
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
80
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
80
    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
80
    if (_writer) {
810
80
        Status st = _writer->get_writer_status();
811
80
        if (exec_status.ok()) {
812
80
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
80
                                                       : Status::Cancelled("force close"));
814
80
        } 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
80
        RETURN_IF_ERROR(st);
821
80
    }
822
80
    return Base::close(state, exec_status);
823
80
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
320
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
320
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
320
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
320
    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
320
    if (_writer) {
810
320
        Status st = _writer->get_writer_status();
811
320
        if (exec_status.ok()) {
812
320
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
320
                                                       : Status::Cancelled("force close"));
814
320
        } 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
320
        RETURN_IF_ERROR(st);
821
320
    }
822
320
    return Base::close(state, exec_status);
823
320
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
802
78
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
803
78
    if (_closed) {
804
0
        return Status::OK();
805
0
    }
806
78
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
807
78
    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
78
    if (_writer) {
810
78
        Status st = _writer->get_writer_status();
811
78
        if (exec_status.ok()) {
812
78
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
813
78
                                                       : Status::Cancelled("force close"));
814
78
        } 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
78
        RETURN_IF_ERROR(st);
821
78
    }
822
78
    return Base::close(state, exec_status);
823
78
}
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