Coverage Report

Created: 2026-06-10 09:47

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