Coverage Report

Created: 2026-07-21 05:00

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