Coverage Report

Created: 2026-10-09 07:21

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