Coverage Report

Created: 2026-09-13 13:09

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