Coverage Report

Created: 2026-10-27 14:57

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.73M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.73M
    if (_parent->nereids_id() == -1) {
123
898k
        return fmt::format("(id={})", _parent->node_id());
124
898k
    } else {
125
832k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
832k
    }
127
1.73M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
70.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
70.4k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
70.4k
    } else {
125
70.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
70.4k
    }
127
70.4k
}
_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
237k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
237k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
237k
    } else {
125
237k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
237k
    }
127
237k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
154
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
154
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
154
    } else {
125
154
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
154
    }
127
154
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.64k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.64k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.64k
    } else {
125
5.64k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.64k
    }
127
5.64k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.03k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.03k
    if (_parent->nereids_id() == -1) {
123
59
        return fmt::format("(id={})", _parent->node_id());
124
8.97k
    } else {
125
8.97k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
8.97k
    }
127
9.03k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
101k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
101k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
101k
    } else {
125
101k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
101k
    }
127
101k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
71.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
71.6k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
71.6k
    } else {
125
71.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
71.6k
    }
127
71.6k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
118
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
118
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
118
    } else {
125
118
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
118
    }
127
118
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
539k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
539k
    if (_parent->nereids_id() == -1) {
123
265k
        return fmt::format("(id={})", _parent->node_id());
124
274k
    } else {
125
274k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
274k
    }
127
539k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
55.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
55.7k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
55.7k
    } else {
125
55.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
55.7k
    }
127
55.7k
}
_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.25k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.25k
    if (_parent->nereids_id() == -1) {
123
5.25k
        return fmt::format("(id={})", _parent->node_id());
124
5.25k
    } else {
125
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
3
    }
127
5.25k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
604
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
604
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
502
    } else {
125
502
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
502
    }
127
604
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.29k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.29k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.28k
    } else {
125
5.28k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.28k
    }
127
5.29k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
629k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
629k
    if (_parent->nereids_id() == -1) {
123
627k
        return fmt::format("(id={})", _parent->node_id());
124
627k
    } else {
125
1.21k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
1.21k
    }
127
629k
}
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.21M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.21M
    if (_parent->nereids_id() == -1) {
132
660k
        return fmt::format("(id={})", _parent->node_id());
133
660k
    } else {
134
558k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
558k
    }
136
1.21M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
118k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
118k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
118k
    } else {
134
118k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
118k
    }
136
118k
}
_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
241k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
241k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
241k
    } else {
134
241k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
241k
    }
136
241k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
161
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
161
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
161
    } else {
134
161
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
161
    }
136
161
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.65k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.65k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.65k
    } else {
134
5.65k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.65k
    }
136
5.65k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.13k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.13k
    if (_parent->nereids_id() == -1) {
132
59
        return fmt::format("(id={})", _parent->node_id());
133
9.07k
    } else {
134
9.07k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.07k
    }
136
9.13k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
102k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
102k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
102k
    } else {
134
102k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
102k
    }
136
102k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
71.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
71.4k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
71.4k
    } else {
134
71.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
71.4k
    }
136
71.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
128
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
128
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
128
    } else {
134
128
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
128
    }
136
128
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_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_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
10.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
10.1k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
10.1k
    } else {
134
10.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.1k
    }
136
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
611
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
611
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
509
    } else {
134
509
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
509
    }
136
611
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
13.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
13.0k
    if (_parent->nereids_id() == -1) {
132
13.0k
        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
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
240k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
240k
    if (_parent->nereids_id() == -1) {
132
240k
        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
240k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
405k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
405k
    if (_parent->nereids_id() == -1) {
132
405k
        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
405k
}
_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
32.9k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
32.9k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
32.9k
    _terminated = true;
144
32.9k
    return Status::OK();
145
32.9k
}
_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
3.48k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3.48k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3.48k
    _terminated = true;
144
3.48k
    return Status::OK();
145
3.48k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.80k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.80k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.80k
    _terminated = true;
144
1.80k
    return Status::OK();
145
1.80k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.18k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.18k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.18k
    _terminated = true;
144
2.18k
    return Status::OK();
145
2.18k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
390
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
390
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
390
    _terminated = true;
144
390
    return Status::OK();
145
390
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
392
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
392
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
392
    _terminated = true;
144
392
    return Status::OK();
145
392
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
7
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
7
    _terminated = true;
144
7
    return Status::OK();
145
7
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
120
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
120
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
120
    _terminated = true;
144
120
    return Status::OK();
145
120
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
17
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
17
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
17
    _terminated = true;
144
17
    return Status::OK();
145
17
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
335
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
335
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
335
    _terminated = true;
144
335
    return Status::OK();
145
335
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
133
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
133
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
133
    _terminated = true;
144
133
    return Status::OK();
145
133
}
146
147
307k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
307k
    return _child && _child->is_serial_operator() && !is_source()
149
307k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
307k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
307k
}
152
153
22.5k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
22.5k
    if (!_child) {
155
21.7k
        return false;
156
21.7k
    }
157
790
    if (_child->is_serial_operator()) {
158
42
        return true;
159
42
    }
160
748
    const auto child_distribution = _child->required_data_distribution(state);
161
748
    return child_distribution.need_local_exchange() &&
162
748
           !is_shuffled_exchange(child_distribution.distribution_type);
163
790
}
164
165
template <typename SharedStateArg>
166
16.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.3k
    fmt::memory_buffer debug_string_buffer;
168
16.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.3k
    return fmt::to_string(debug_string_buffer);
170
16.3k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
28
    fmt::memory_buffer debug_string_buffer;
168
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
28
    return fmt::to_string(debug_string_buffer);
170
28
}
_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
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
28
    fmt::memory_buffer debug_string_buffer;
168
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
28
    return fmt::to_string(debug_string_buffer);
170
28
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
91
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
91
    fmt::memory_buffer debug_string_buffer;
168
91
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
91
    return fmt::to_string(debug_string_buffer);
170
91
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
15.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.9k
    fmt::memory_buffer debug_string_buffer;
168
15.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.9k
    return fmt::to_string(debug_string_buffer);
170
15.9k
}
_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
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
168
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
168
    fmt::memory_buffer debug_string_buffer;
168
168
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
168
    return fmt::to_string(debug_string_buffer);
170
168
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
16.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.2k
    fmt::memory_buffer debug_string_buffer;
175
16.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.2k
    return fmt::to_string(debug_string_buffer);
177
16.2k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
28
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
28
    fmt::memory_buffer debug_string_buffer;
175
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
28
    return fmt::to_string(debug_string_buffer);
177
28
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
91
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
91
    fmt::memory_buffer debug_string_buffer;
175
91
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
91
    return fmt::to_string(debug_string_buffer);
177
91
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
112
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
112
    fmt::memory_buffer debug_string_buffer;
175
112
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
112
    return fmt::to_string(debug_string_buffer);
177
112
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
126
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
126
    fmt::memory_buffer debug_string_buffer;
175
126
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
126
    return fmt::to_string(debug_string_buffer);
177
126
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
15.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.8k
    fmt::memory_buffer debug_string_buffer;
175
15.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.8k
    return fmt::to_string(debug_string_buffer);
177
15.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
16.3k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
16.3k
    fmt::memory_buffer debug_string_buffer;
181
16.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
16.3k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
16.3k
                   _is_serial_operator);
184
16.3k
    return fmt::to_string(debug_string_buffer);
185
16.3k
}
186
187
16.3k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
16.3k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
16.3k
}
190
191
685k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
685k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
685k
    _nereids_id = tnode.nereids_id;
194
685k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.77k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.77k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.77k
            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.77k
    }
207
685k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
685k
    _op_name = substr + "_OPERATOR";
209
210
685k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
685k
    } else if (tnode.__isset.conjuncts) {
213
283k
        for (const auto& conjunct : tnode.conjuncts) {
214
283k
            VExprContextSPtr context;
215
283k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
283k
            _conjuncts.emplace_back(context);
217
283k
        }
218
105k
    }
219
220
    // create the projections expr
221
685k
    if (tnode.__isset.projections) {
222
275k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
275k
    }
224
685k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.77k
        DCHECK(has_projection()) << "no final projections";
226
6.77k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.1k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.1k
            VExprContextSPtrs projections;
229
12.1k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.1k
            _projection->intermediate_projections.push_back(projections);
231
12.1k
        }
232
6.77k
    }
233
685k
    return Status::OK();
234
685k
}
235
236
712k
Status OperatorXBase::prepare(RuntimeState* state) {
237
712k
    for (auto& conjunct : _conjuncts) {
238
283k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
283k
    }
240
712k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
662k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
345k
            return a->execute_cost() < b->execute_cost();
243
345k
        });
244
662k
    };
245
246
712k
    if (has_projection()) {
247
275k
        auto& projection = *_projection;
248
287k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.1k
            const auto& input_row_desc =
250
12.1k
                    i == 0 ? operator_row_desc_before_projection()
251
12.1k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.1k
            RETURN_IF_ERROR(
253
12.1k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.1k
        }
255
275k
        const auto& final_projection_input_row_desc =
256
275k
                projection.intermediate_output_row_descriptors.empty()
257
275k
                        ? operator_row_desc_before_projection()
258
275k
                        : projection.intermediate_output_row_descriptors.back();
259
275k
        RETURN_IF_ERROR(
260
275k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
275k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
275k
                                                      projection.output_row_descriptor));
263
275k
    }
264
265
712k
    for (auto& conjunct : _conjuncts) {
266
283k
        RETURN_IF_ERROR(conjunct->open(state));
267
283k
    }
268
712k
    if (has_projection()) {
269
275k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
275k
        for (auto& projections : _projection->intermediate_projections) {
271
12.1k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.1k
        }
273
275k
    }
274
712k
    if (_child && !is_source()) {
275
88.7k
        RETURN_IF_ERROR(_child->prepare(state));
276
88.7k
    }
277
278
712k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
712k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
712k
    return Status::OK();
284
712k
}
285
286
9.59k
Status OperatorXBase::terminate(RuntimeState* state) {
287
9.59k
    if (_child && !is_source()) {
288
647
        RETURN_IF_ERROR(_child->terminate(state));
289
647
    }
290
9.59k
    auto result = state->get_local_state_result(operator_id());
291
9.59k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
9.59k
    return result.value()->terminate(state);
295
9.59k
}
296
297
4.62M
Status OperatorXBase::close(RuntimeState* state) {
298
4.62M
    if (_child && !is_source()) {
299
673k
        RETURN_IF_ERROR(_child->close(state));
300
673k
    }
301
4.62M
    auto result = state->get_local_state_result(operator_id());
302
4.62M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.62M
    return result.value()->close(state);
306
4.62M
}
307
308
302k
void PipelineXLocalStateBase::clear_origin_block() {
309
302k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
302k
}
311
312
701k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
701k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
701k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
701k
    return Status::OK();
317
701k
}
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
302k
                                     Block* output_block) const {
326
302k
    auto* local_state = state->get_local_state(operator_id());
327
302k
    SCOPED_TIMER(local_state->exec_time_counter());
328
302k
    SCOPED_TIMER(local_state->_projection_timer);
329
302k
    const size_t rows = origin_block->rows();
330
302k
    if (rows == 0) {
331
158k
        return Status::OK();
332
158k
    }
333
144k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
144k
    {
336
144k
        Block input_block = *origin_block;
337
338
144k
        ColumnsWithTypeAndName new_columns;
339
144k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.55k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.55k
            new_columns.resize(projections.size());
345
129k
            for (int i = 0; i < projections.size(); i++) {
346
123k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
123k
                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
123k
            }
355
5.54k
            Block tmp_block {new_columns};
356
5.54k
            input_block.swap(tmp_block);
357
5.54k
        }
358
359
144k
        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
144k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
144k
                output_block, _projection->output_row_descriptor);
368
144k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
144k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
144k
        Columns shared_columns(mutable_columns.size());
371
372
821k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
677k
            ColumnPtr column_ptr;
374
677k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
677k
            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
677k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
677k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
677k
            if (column_ptr->is_exclusive()) {
386
238k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
438k
            } else {
388
438k
                shared_columns[i] = std::move(column_ptr);
389
438k
            }
390
677k
        }
391
392
144k
        scoped_mutable_block.restore();
393
821k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
677k
            if (shared_columns[i]) {
395
439k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
439k
            }
397
677k
        }
398
144k
    }
399
400
0
    origin_block->clear_column_data(
401
144k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
144k
    DCHECK_EQ(output_block->rows(), rows);
403
404
144k
    return Status::OK();
405
144k
}
406
407
3.87M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
3.87M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
3.87M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
3.87M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
3.87M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
3.87M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
3.87M
            if (_debug_point_count++ % 2 == 0) {
414
3.87M
                return Status::OK();
415
3.87M
            }
416
3.87M
        }
417
3.87M
    });
418
419
3.87M
    Status status;
420
3.87M
    auto* local_state = state->get_local_state(operator_id());
421
3.87M
    Defer defer([&]() {
422
3.87M
        if (status.ok()) {
423
3.87M
            local_state->update_output_block_counters(*block);
424
3.87M
        }
425
3.87M
    });
426
3.87M
    if (has_projection()) {
427
302k
        local_state->clear_origin_block();
428
302k
        status = get_block(state, &local_state->_origin_block, eos);
429
302k
        if (UNLIKELY(!status.ok())) {
430
42
            return status;
431
42
        }
432
302k
        status = do_projections(state, &local_state->_origin_block, block);
433
302k
        return status;
434
302k
    }
435
3.57M
    status = get_block(state, block, eos);
436
3.57M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.57M
    return status;
438
3.57M
}
439
440
2.75M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.75M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.98k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.98k
        *eos = true;
444
9.98k
    }
445
446
2.75M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.75M
        auto op_name = to_lower(_parent->_op_name);
448
2.75M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.75M
        arg_op_name = to_lower(arg_op_name);
450
451
2.75M
        if (op_name == arg_op_name) {
452
2.75M
            *eos = true;
453
2.75M
        }
454
2.75M
    });
455
456
2.75M
    if (auto rows = block->rows()) {
457
794k
        _num_rows_returned += rows;
458
794k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
794k
    }
460
2.75M
}
461
462
32.9k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.9k
    auto result = state->get_sink_local_state_result();
464
32.9k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.9k
    return result.value()->terminate(state);
468
32.9k
}
469
470
16.2k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
16.2k
    fmt::memory_buffer debug_string_buffer;
472
473
16.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
16.2k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
16.2k
    return fmt::to_string(debug_string_buffer);
476
16.2k
}
477
478
16.2k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
16.2k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
16.2k
}
481
482
359k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
359k
    std::string op_name = "UNKNOWN_SINK";
484
359k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
359k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
359k
        op_name = it->second;
488
359k
    }
489
359k
    _name = op_name + "_OPERATOR";
490
359k
    return Status::OK();
491
359k
}
492
493
311k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
311k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
311k
    _nereids_id = tnode.nereids_id;
496
311k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
311k
    _name = substr + "_SINK_OPERATOR";
498
311k
    return Status::OK();
499
311k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.73M
                                                            LocalSinkStateInfo& info) {
504
1.73M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.73M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.73M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.73M
    return Status::OK();
508
1.73M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
118k
                                                            LocalSinkStateInfo& info) {
504
118k
    auto local_state = LocalStateType::create_unique(this, state);
505
118k
    RETURN_IF_ERROR(local_state->init(state, info));
506
118k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
118k
    return Status::OK();
508
118k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
357k
                                                            LocalSinkStateInfo& info) {
504
357k
    auto local_state = LocalStateType::create_unique(this, state);
505
357k
    RETURN_IF_ERROR(local_state->init(state, info));
506
357k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
357k
    return Status::OK();
508
357k
}
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
366
                                                            LocalSinkStateInfo& info) {
504
366
    auto local_state = LocalStateType::create_unique(this, state);
505
366
    RETURN_IF_ERROR(local_state->init(state, info));
506
366
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
366
    return Status::OK();
508
366
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.6k
                                                            LocalSinkStateInfo& info) {
504
49.6k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.6k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.6k
    return Status::OK();
508
49.6k
}
_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
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
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
9.05k
                                                            LocalSinkStateInfo& info) {
504
9.05k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.05k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.05k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.05k
    return Status::OK();
508
9.05k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6
                                                            LocalSinkStateInfo& info) {
504
6
    auto local_state = LocalStateType::create_unique(this, state);
505
6
    RETURN_IF_ERROR(local_state->init(state, info));
506
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6
    return Status::OK();
508
6
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
242k
                                                            LocalSinkStateInfo& info) {
504
242k
    auto local_state = LocalStateType::create_unique(this, state);
505
242k
    RETURN_IF_ERROR(local_state->init(state, info));
506
242k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
242k
    return Status::OK();
508
242k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
161
                                                            LocalSinkStateInfo& info) {
504
161
    auto local_state = LocalStateType::create_unique(this, state);
505
161
    RETURN_IF_ERROR(local_state->init(state, info));
506
161
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
161
    return Status::OK();
508
161
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
240k
                                                            LocalSinkStateInfo& info) {
504
240k
    auto local_state = LocalStateType::create_unique(this, state);
505
240k
    RETURN_IF_ERROR(local_state->init(state, info));
506
240k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
240k
    return Status::OK();
508
240k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
102k
                                                            LocalSinkStateInfo& info) {
504
102k
    auto local_state = LocalStateType::create_unique(this, state);
505
102k
    RETURN_IF_ERROR(local_state->init(state, info));
506
102k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
102k
    return Status::OK();
508
102k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
71.5k
                                                            LocalSinkStateInfo& info) {
504
71.5k
    auto local_state = LocalStateType::create_unique(this, state);
505
71.5k
    RETURN_IF_ERROR(local_state->init(state, info));
506
71.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
71.5k
    return Status::OK();
508
71.5k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
128
                                                            LocalSinkStateInfo& info) {
504
128
    auto local_state = LocalStateType::create_unique(this, state);
505
128
    RETURN_IF_ERROR(local_state->init(state, info));
506
128
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
128
    return Status::OK();
508
128
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
510k
                                                            LocalSinkStateInfo& info) {
504
510k
    auto local_state = LocalStateType::create_unique(this, state);
505
510k
    RETURN_IF_ERROR(local_state->init(state, info));
506
510k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
510k
    return Status::OK();
508
510k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.66k
                                                            LocalSinkStateInfo& info) {
504
5.66k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.66k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.66k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.66k
    return Status::OK();
508
5.66k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.1k
                                                            LocalSinkStateInfo& info) {
504
10.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.1k
    return Status::OK();
508
10.1k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.14k
                                                            LocalSinkStateInfo& info) {
504
2.14k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.14k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.14k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.14k
    return Status::OK();
508
2.14k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
504
                                                            LocalSinkStateInfo& info) {
504
504
    auto local_state = LocalStateType::create_unique(this, state);
505
504
    RETURN_IF_ERROR(local_state->init(state, info));
506
504
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
504
    return Status::OK();
508
504
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.97k
                                                            LocalSinkStateInfo& info) {
504
4.97k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.97k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.97k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.97k
    return Status::OK();
508
4.97k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.77k
                                                            LocalSinkStateInfo& info) {
504
2.77k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.77k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.77k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.77k
    return Status::OK();
508
2.77k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.68k
                                                            LocalSinkStateInfo& info) {
504
2.68k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.68k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.68k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.68k
    return Status::OK();
508
2.68k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.57k
                                                            LocalSinkStateInfo& info) {
504
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.57k
    return Status::OK();
508
2.57k
}
_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
568
                                                            LocalSinkStateInfo& info) {
504
568
    auto local_state = LocalStateType::create_unique(this, state);
505
568
    RETURN_IF_ERROR(local_state->init(state, info));
506
568
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
568
    return Status::OK();
508
568
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
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.38M
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.38M
    } else {
519
1.38M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.38M
        ss->id = operator_id();
521
1.38M
        for (auto& dest : dests_id()) {
522
1.37M
            ss->related_op_ids.insert(dest);
523
1.37M
        }
524
1.38M
        return ss;
525
1.38M
    }
526
1.38M
}
_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
100k
            ss->related_op_ids.insert(dest);
523
100k
        }
524
101k
        return ss;
525
101k
    }
526
101k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
358k
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
358k
    } else {
519
358k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
358k
        ss->id = operator_id();
521
358k
        for (auto& dest : dests_id()) {
522
355k
            ss->related_op_ids.insert(dest);
523
355k
        }
524
358k
        return ss;
525
358k
    }
526
358k
}
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
366
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
366
    } else {
519
366
        auto ss = LocalStateType::SharedStateType::create_shared();
520
366
        ss->id = operator_id();
521
366
        for (auto& dest : dests_id()) {
522
366
            ss->related_op_ids.insert(dest);
523
366
        }
524
366
        return ss;
525
366
    }
526
366
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
49.7k
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
49.7k
    } else {
519
49.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
49.7k
        ss->id = operator_id();
521
49.7k
        for (auto& dest : dests_id()) {
522
49.0k
            ss->related_op_ids.insert(dest);
523
49.0k
        }
524
49.7k
        return ss;
525
49.7k
    }
526
49.7k
}
_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
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
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
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_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_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_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_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9.16k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9.16k
    } else {
519
9.16k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.16k
        ss->id = operator_id();
521
9.16k
        for (auto& dest : dests_id()) {
522
9.15k
            ss->related_op_ids.insert(dest);
523
9.15k
        }
524
9.16k
        return ss;
525
9.16k
    }
526
9.16k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6
    } else {
519
6
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6
        ss->id = operator_id();
521
6
        for (auto& dest : dests_id()) {
522
6
            ss->related_op_ids.insert(dest);
523
6
        }
524
6
        return ss;
525
6
    }
526
6
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
243k
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
243k
    } else {
519
243k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
243k
        ss->id = operator_id();
521
243k
        for (auto& dest : dests_id()) {
522
243k
            ss->related_op_ids.insert(dest);
523
243k
        }
524
243k
        return ss;
525
243k
    }
526
243k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
163
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
163
    } else {
519
163
        auto ss = LocalStateType::SharedStateType::create_shared();
520
163
        ss->id = operator_id();
521
163
        for (auto& dest : dests_id()) {
522
163
            ss->related_op_ids.insert(dest);
523
163
        }
524
163
        return ss;
525
163
    }
526
163
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
102k
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
102k
    } else {
519
102k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
102k
        ss->id = operator_id();
521
102k
        for (auto& dest : dests_id()) {
522
102k
            ss->related_op_ids.insert(dest);
523
102k
        }
524
102k
        return ss;
525
102k
    }
526
102k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
127
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
127
    } else {
519
127
        auto ss = LocalStateType::SharedStateType::create_shared();
520
127
        ss->id = operator_id();
521
127
        for (auto& dest : dests_id()) {
522
127
            ss->related_op_ids.insert(dest);
523
127
        }
524
127
        return ss;
525
127
    }
526
127
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
511k
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
511k
    } else {
519
511k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
511k
        ss->id = operator_id();
521
511k
        for (auto& dest : dests_id()) {
522
501k
            ss->related_op_ids.insert(dest);
523
501k
        }
524
511k
        return ss;
525
511k
    }
526
511k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.67k
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.67k
    } else {
519
5.67k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.67k
        ss->id = operator_id();
521
5.67k
        for (auto& dest : dests_id()) {
522
5.66k
            ss->related_op_ids.insert(dest);
523
5.66k
        }
524
5.67k
        return ss;
525
5.67k
    }
526
5.67k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
612
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
612
    } else {
519
612
        auto ss = LocalStateType::SharedStateType::create_shared();
520
612
        ss->id = operator_id();
521
613
        for (auto& dest : dests_id()) {
522
613
            ss->related_op_ids.insert(dest);
523
613
        }
524
612
        return ss;
525
612
    }
526
612
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.67k
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.67k
    } else {
519
2.67k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.67k
        ss->id = operator_id();
521
2.67k
        for (auto& dest : dests_id()) {
522
2.67k
            ss->related_op_ids.insert(dest);
523
2.67k
        }
524
2.67k
        return ss;
525
2.67k
    }
526
2.67k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.58k
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.58k
    } else {
519
2.58k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.58k
        ss->id = operator_id();
521
2.58k
        for (auto& dest : dests_id()) {
522
2.57k
            ss->related_op_ids.insert(dest);
523
2.57k
        }
524
2.58k
        return ss;
525
2.58k
    }
526
2.58k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
568
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
568
    } else {
519
568
        auto ss = LocalStateType::SharedStateType::create_shared();
520
568
        ss->id = operator_id();
521
568
        for (auto& dest : dests_id()) {
522
558
            ss->related_op_ids.insert(dest);
523
558
        }
524
568
        return ss;
525
568
    }
526
568
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
105
            ss->related_op_ids.insert(dest);
523
105
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.00M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.00M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.00M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.00M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.00M
    return Status::OK();
534
2.00M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
70.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
70.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
70.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
70.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
70.9k
    return Status::OK();
534
70.9k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
250k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
250k
    auto local_state = LocalStateType::create_unique(state, this);
531
250k
    RETURN_IF_ERROR(local_state->init(state, info));
532
250k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
250k
    return Status::OK();
534
250k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
146
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
146
    auto local_state = LocalStateType::create_unique(state, this);
531
146
    RETURN_IF_ERROR(local_state->init(state, info));
532
146
    state->emplace_local_state(operator_id(), std::move(local_state));
533
146
    return Status::OK();
534
146
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.24k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.24k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.24k
    return Status::OK();
534
3.24k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.05k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.05k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.05k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.05k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.05k
    return Status::OK();
534
9.05k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.30k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.30k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.30k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.30k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.30k
    return Status::OK();
534
8.30k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
154
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
154
    auto local_state = LocalStateType::create_unique(state, this);
531
154
    RETURN_IF_ERROR(local_state->init(state, info));
532
154
    state->emplace_local_state(operator_id(), std::move(local_state));
533
154
    return Status::OK();
534
154
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
234k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
234k
    auto local_state = LocalStateType::create_unique(state, this);
531
234k
    RETURN_IF_ERROR(local_state->init(state, info));
532
234k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
234k
    return Status::OK();
534
234k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
102k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
102k
    auto local_state = LocalStateType::create_unique(state, this);
531
102k
    RETURN_IF_ERROR(local_state->init(state, info));
532
102k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
102k
    return Status::OK();
534
102k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
71.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
71.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
71.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
71.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
71.9k
    return Status::OK();
534
71.9k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
118
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
118
    auto local_state = LocalStateType::create_unique(state, this);
531
118
    RETURN_IF_ERROR(local_state->init(state, info));
532
118
    state->emplace_local_state(operator_id(), std::move(local_state));
533
118
    return Status::OK();
534
118
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.59k
    return Status::OK();
534
5.59k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
266k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
266k
    auto local_state = LocalStateType::create_unique(state, this);
531
266k
    RETURN_IF_ERROR(local_state->init(state, info));
532
266k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
266k
    return Status::OK();
534
266k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.50k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.50k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.50k
    return Status::OK();
534
1.50k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.66k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.66k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.66k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.66k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.66k
    return Status::OK();
534
5.66k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
29
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
29
    auto local_state = LocalStateType::create_unique(state, this);
531
29
    RETURN_IF_ERROR(local_state->init(state, info));
532
29
    state->emplace_local_state(operator_id(), std::move(local_state));
533
29
    return Status::OK();
534
29
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.55k
    return Status::OK();
534
1.55k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.0k
    return Status::OK();
534
56.0k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.30k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.30k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.30k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.30k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.30k
    return Status::OK();
534
5.30k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
497
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
497
    auto local_state = LocalStateType::create_unique(state, this);
531
497
    RETURN_IF_ERROR(local_state->init(state, info));
532
497
    state->emplace_local_state(operator_id(), std::move(local_state));
533
497
    return Status::OK();
534
497
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.70k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.70k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.70k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.70k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.70k
    return Status::OK();
534
2.70k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.60k
    return Status::OK();
534
2.60k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
604
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
604
    auto local_state = LocalStateType::create_unique(state, this);
531
604
    RETURN_IF_ERROR(local_state->init(state, info));
532
604
    state->emplace_local_state(operator_id(), std::move(local_state));
533
604
    return Status::OK();
534
604
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.8k
    return Status::OK();
534
10.8k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
636k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
636k
    auto local_state = LocalStateType::create_unique(state, this);
531
636k
    RETURN_IF_ERROR(local_state->init(state, info));
532
636k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
636k
    return Status::OK();
534
636k
}
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
794
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
794
    auto local_state = LocalStateType::create_unique(state, this);
531
794
    RETURN_IF_ERROR(local_state->init(state, info));
532
794
    state->emplace_local_state(operator_id(), std::move(local_state));
533
794
    return Status::OK();
534
794
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
970
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
970
    auto local_state = LocalStateType::create_unique(state, this);
531
970
    RETURN_IF_ERROR(local_state->init(state, info));
532
970
    state->emplace_local_state(operator_id(), std::move(local_state));
533
970
    return Status::OK();
534
970
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.31k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.31k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.31k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.31k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.31k
    return Status::OK();
534
7.31k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
241k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
241k
    auto local_state = LocalStateType::create_unique(state, this);
531
241k
    RETURN_IF_ERROR(local_state->init(state, info));
532
241k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
241k
    return Status::OK();
534
241k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.72M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.98M
        : _num_rows_returned(0),
542
1.98M
          _rows_returned_counter(nullptr),
543
1.98M
          _parent(parent),
544
1.98M
          _state(state),
545
1.98M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.00M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.00M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.00M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.00M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.00M
    _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
2.00M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.00M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.00M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.00M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.00M
    if constexpr (!is_fake_shared) {
560
1.20M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
720k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
720k
                                    .first.get()
563
720k
                                    ->template cast<SharedStateArg>();
564
565
720k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
720k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
720k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
720k
        } else if (info.shared_state) {
569
418k
            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
418k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
418k
            _dependency = _shared_state->create_source_dependency(
576
418k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
418k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
418k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
418k
        } else {
580
70.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.65k
                DCHECK(false);
582
7.65k
            }
583
70.6k
        }
584
1.20M
    }
585
586
2.00M
    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
2.00M
    _rows_returned_counter =
591
2.00M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.00M
    _blocks_returned_counter =
593
2.00M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.00M
    _output_block_bytes_counter =
595
2.00M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.00M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.00M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.00M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.00M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.00M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.00M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.00M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.00M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.00M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.00M
    _memory_used_counter =
606
2.00M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.00M
    _common_profile->add_info_string("IsColocate",
608
2.00M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.00M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.00M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.00M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.00M
    return Status::OK();
613
2.00M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
71.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
71.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
71.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
71.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
71.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
71.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
71.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
71.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
71.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
71.1k
    if constexpr (!is_fake_shared) {
560
71.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
17.4k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
17.4k
                                    .first.get()
563
17.4k
                                    ->template cast<SharedStateArg>();
564
565
17.4k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
17.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
17.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
53.7k
        } 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
52.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
52.4k
            _dependency = _shared_state->create_source_dependency(
576
52.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
52.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
52.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
52.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.27k
        }
584
71.1k
    }
585
586
71.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
71.1k
    _rows_returned_counter =
591
71.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
71.1k
    _blocks_returned_counter =
593
71.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
71.1k
    _output_block_bytes_counter =
595
71.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
71.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
71.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
71.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
71.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
71.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
71.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
71.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
71.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
71.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
71.1k
    _memory_used_counter =
606
71.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
71.1k
    _common_profile->add_info_string("IsColocate",
608
71.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
71.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
71.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
71.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
71.1k
    return Status::OK();
613
71.1k
}
_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
243k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
243k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
243k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
243k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
243k
    _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
243k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
243k
    _operator_profile->add_child(_common_profile.get(), true);
557
243k
    _operator_profile->add_child(_custom_profile.get(), true);
558
243k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
243k
    if constexpr (!is_fake_shared) {
560
243k
        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
243k
        } 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
235k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
235k
            _dependency = _shared_state->create_source_dependency(
576
235k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
235k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
235k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
235k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
7.70k
        }
584
243k
    }
585
586
243k
    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
243k
    _rows_returned_counter =
591
243k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
243k
    _blocks_returned_counter =
593
243k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
243k
    _output_block_bytes_counter =
595
243k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
243k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
243k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
243k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
243k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
243k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
243k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
243k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
243k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
243k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
243k
    _memory_used_counter =
606
243k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
243k
    _common_profile->add_info_string("IsColocate",
608
243k
                                     std::to_string(_parent->is_colocated_operator()));
609
243k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
243k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
243k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
243k
    return Status::OK();
613
243k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
154
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
154
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
154
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
154
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
154
    _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
154
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
154
    _operator_profile->add_child(_common_profile.get(), true);
557
154
    _operator_profile->add_child(_custom_profile.get(), true);
558
154
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
154
    if constexpr (!is_fake_shared) {
560
154
        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
154
        } 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
154
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
154
            _dependency = _shared_state->create_source_dependency(
576
154
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
154
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
154
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
154
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
154
    }
585
586
154
    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
154
    _rows_returned_counter =
591
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
154
    _blocks_returned_counter =
593
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
154
    _output_block_bytes_counter =
595
154
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
154
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
154
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
154
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
154
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
154
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
154
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
154
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
154
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
154
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
154
    _memory_used_counter =
606
154
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
154
    _common_profile->add_info_string("IsColocate",
608
154
                                     std::to_string(_parent->is_colocated_operator()));
609
154
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
154
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
154
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
154
    return Status::OK();
613
154
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.67k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.67k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.67k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.67k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.67k
    _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.67k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.67k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.67k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.67k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.67k
    if constexpr (!is_fake_shared) {
560
5.67k
        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.67k
        } 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
22
        }
584
5.67k
    }
585
586
5.67k
    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.67k
    _rows_returned_counter =
591
5.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.67k
    _blocks_returned_counter =
593
5.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.67k
    _output_block_bytes_counter =
595
5.67k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.67k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.67k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.67k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.67k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.67k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.67k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.67k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.67k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.67k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.67k
    _memory_used_counter =
606
5.67k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.67k
    _common_profile->add_info_string("IsColocate",
608
5.67k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.67k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.67k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.67k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.67k
    return Status::OK();
613
5.67k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.15k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.15k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.15k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.15k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.15k
    _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
9.15k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.15k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.15k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.15k
    if constexpr (!is_fake_shared) {
560
9.15k
        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
9.15k
        } 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
9.04k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.04k
            _dependency = _shared_state->create_source_dependency(
576
9.04k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.04k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.04k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.04k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
115
        }
584
9.15k
    }
585
586
9.15k
    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
9.15k
    _rows_returned_counter =
591
9.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.15k
    _blocks_returned_counter =
593
9.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.15k
    _output_block_bytes_counter =
595
9.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.15k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.15k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.15k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.15k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.15k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.15k
    _memory_used_counter =
606
9.15k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.15k
    _common_profile->add_info_string("IsColocate",
608
9.15k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.15k
    return Status::OK();
613
9.15k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
102k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
102k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
102k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
102k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
102k
    _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
102k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
102k
    _operator_profile->add_child(_common_profile.get(), true);
557
102k
    _operator_profile->add_child(_custom_profile.get(), true);
558
102k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
102k
    if constexpr (!is_fake_shared) {
560
102k
        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
102k
        } 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
100k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
100k
            _dependency = _shared_state->create_source_dependency(
576
100k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
100k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
100k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
100k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2.29k
        }
584
102k
    }
585
586
102k
    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
102k
    _rows_returned_counter =
591
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
102k
    _blocks_returned_counter =
593
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
102k
    _output_block_bytes_counter =
595
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
102k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
102k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
102k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
102k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
102k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
102k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
102k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
102k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
102k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
102k
    _memory_used_counter =
606
102k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
102k
    _common_profile->add_info_string("IsColocate",
608
102k
                                     std::to_string(_parent->is_colocated_operator()));
609
102k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
102k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
102k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
102k
    return Status::OK();
613
102k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
71.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
71.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
71.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
71.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
71.8k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
71.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
71.8k
    _operator_profile->add_child(_common_profile.get(), true);
557
71.8k
    _operator_profile->add_child(_custom_profile.get(), true);
558
71.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
71.8k
    if constexpr (!is_fake_shared) {
560
71.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
71.8k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
71.8k
                                    .first.get()
563
71.8k
                                    ->template cast<SharedStateArg>();
564
565
71.8k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
71.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
71.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
71.8k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
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
10
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
10
        }
584
71.8k
    }
585
586
71.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
71.8k
    _rows_returned_counter =
591
71.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
71.8k
    _blocks_returned_counter =
593
71.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
71.8k
    _output_block_bytes_counter =
595
71.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
71.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
71.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
71.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
71.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
71.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
71.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
71.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
71.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
71.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
71.8k
    _memory_used_counter =
606
71.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
71.8k
    _common_profile->add_info_string("IsColocate",
608
71.8k
                                     std::to_string(_parent->is_colocated_operator()));
609
71.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
71.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
71.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
71.8k
    return Status::OK();
613
71.8k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
118
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
118
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
118
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
118
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
118
    _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
118
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
118
    _operator_profile->add_child(_common_profile.get(), true);
557
118
    _operator_profile->add_child(_custom_profile.get(), true);
558
118
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
118
    if constexpr (!is_fake_shared) {
560
118
        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
118
        } 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
118
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
118
            _dependency = _shared_state->create_source_dependency(
576
118
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
118
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
118
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
118
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
118
    }
585
586
118
    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
118
    _rows_returned_counter =
591
118
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
118
    _blocks_returned_counter =
593
118
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
118
    _output_block_bytes_counter =
595
118
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
118
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
118
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
118
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
118
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
118
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
118
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
118
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
118
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
118
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
118
    _memory_used_counter =
606
118
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
118
    _common_profile->add_info_string("IsColocate",
608
118
                                     std::to_string(_parent->is_colocated_operator()));
609
118
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
118
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
118
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
118
    return Status::OK();
613
118
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
792k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
792k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
792k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
792k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
792k
    _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
792k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
792k
    _operator_profile->add_child(_common_profile.get(), true);
557
792k
    _operator_profile->add_child(_custom_profile.get(), true);
558
792k
    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
792k
    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
792k
    _rows_returned_counter =
591
792k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
792k
    _blocks_returned_counter =
593
792k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
792k
    _output_block_bytes_counter =
595
792k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
792k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
792k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
792k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
792k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
792k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
792k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
792k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
792k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
792k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
792k
    _memory_used_counter =
606
792k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
792k
    _common_profile->add_info_string("IsColocate",
608
792k
                                     std::to_string(_parent->is_colocated_operator()));
609
792k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
792k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
792k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
792k
    return Status::OK();
613
792k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
55.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
55.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
55.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
55.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
55.8k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
55.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
55.8k
    _operator_profile->add_child(_common_profile.get(), true);
557
55.8k
    _operator_profile->add_child(_custom_profile.get(), true);
558
55.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
55.8k
    if constexpr (!is_fake_shared) {
560
55.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
55.8k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.37k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.37k
            _dependency = _shared_state->create_source_dependency(
576
4.37k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.37k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.37k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.4k
        }
584
55.8k
    }
585
586
55.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
55.8k
    _rows_returned_counter =
591
55.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
55.8k
    _blocks_returned_counter =
593
55.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
55.8k
    _output_block_bytes_counter =
595
55.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
55.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
55.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
55.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
55.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
55.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
55.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
55.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
55.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
55.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
55.8k
    _memory_used_counter =
606
55.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
55.8k
    _common_profile->add_info_string("IsColocate",
608
55.8k
                                     std::to_string(_parent->is_colocated_operator()));
609
55.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
55.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
55.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
55.8k
    return Status::OK();
613
55.8k
}
_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.31k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.31k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.31k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.31k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.31k
    _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.31k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.31k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.31k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.31k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.31k
    if constexpr (!is_fake_shared) {
560
5.31k
        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.31k
        } 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.24k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.24k
            _dependency = _shared_state->create_source_dependency(
576
5.24k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.24k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.24k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.24k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
76
        }
584
5.31k
    }
585
586
5.31k
    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.31k
    _rows_returned_counter =
591
5.31k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.31k
    _blocks_returned_counter =
593
5.31k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.31k
    _output_block_bytes_counter =
595
5.31k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.31k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.31k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.31k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.31k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.31k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.31k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.31k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.31k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.31k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.31k
    _memory_used_counter =
606
5.31k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.31k
    _common_profile->add_info_string("IsColocate",
608
5.31k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.31k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.31k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.31k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.31k
    return Status::OK();
613
5.31k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
610
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
610
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
610
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
610
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
610
    _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
610
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
610
    _operator_profile->add_child(_common_profile.get(), true);
557
610
    _operator_profile->add_child(_custom_profile.get(), true);
558
610
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
610
    if constexpr (!is_fake_shared) {
560
610
        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
610
        } 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
610
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
610
            _dependency = _shared_state->create_source_dependency(
576
610
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
610
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
610
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
610
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
610
    }
585
586
610
    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
610
    _rows_returned_counter =
591
610
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
610
    _blocks_returned_counter =
593
610
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
610
    _output_block_bytes_counter =
595
610
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
610
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
610
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
610
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
610
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
610
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
610
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
610
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
610
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
610
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
610
    _memory_used_counter =
606
610
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
610
    _common_profile->add_info_string("IsColocate",
608
610
                                     std::to_string(_parent->is_colocated_operator()));
609
610
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
610
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
610
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
610
    return Status::OK();
613
610
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.34k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.34k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.34k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.34k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.34k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.34k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.34k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.34k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.34k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.34k
    if constexpr (!is_fake_shared) {
560
5.34k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.34k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.28k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.28k
            _dependency = _shared_state->create_source_dependency(
576
5.28k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.28k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.28k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.28k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
53
        }
584
5.34k
    }
585
586
5.34k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.34k
    _rows_returned_counter =
591
5.34k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.34k
    _blocks_returned_counter =
593
5.34k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.34k
    _output_block_bytes_counter =
595
5.34k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.34k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.34k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.34k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.34k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.34k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.34k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.34k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.34k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.34k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.34k
    _memory_used_counter =
606
5.34k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.34k
    _common_profile->add_info_string("IsColocate",
608
5.34k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.34k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.34k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.34k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.34k
    return Status::OK();
613
5.34k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
638k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
638k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
638k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
638k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
638k
    _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
638k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
638k
    _operator_profile->add_child(_common_profile.get(), true);
557
638k
    _operator_profile->add_child(_custom_profile.get(), true);
558
638k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
638k
    if constexpr (!is_fake_shared) {
560
638k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
631k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
631k
                                    .first.get()
563
631k
                                    ->template cast<SharedStateArg>();
564
565
631k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
631k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
631k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
631k
        } 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
7.65k
        } else {
580
7.65k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.65k
                DCHECK(false);
582
7.65k
            }
583
7.65k
        }
584
638k
    }
585
586
638k
    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
638k
    _rows_returned_counter =
591
638k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
638k
    _blocks_returned_counter =
593
638k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
638k
    _output_block_bytes_counter =
595
638k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
638k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
638k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
638k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
638k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
638k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
638k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
638k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
638k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
638k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
638k
    _memory_used_counter =
606
638k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
638k
    _common_profile->add_info_string("IsColocate",
608
638k
                                     std::to_string(_parent->is_colocated_operator()));
609
638k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
638k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
638k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
638k
    return Status::OK();
613
638k
}
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
2.01M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.01M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.32M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
314k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
314k
    }
621
2.01M
    if (_parent->has_projection()) {
622
392k
        const auto& projection = *_parent->_projection;
623
392k
        _projections.resize(projection.projections.size());
624
2.43M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.04M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.04M
        }
627
392k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
414k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
22.0k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
441k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
419k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
419k
                        state, _intermediate_projections[i][j]));
633
419k
            }
634
22.0k
        }
635
392k
    }
636
2.01M
    return Status::OK();
637
2.01M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
71.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
71.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
72.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.70k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.70k
    }
621
71.1k
    if (_parent->has_projection()) {
622
71.1k
        const auto& projection = *_parent->_projection;
623
71.1k
        _projections.resize(projection.projections.size());
624
396k
        for (size_t i = 0; i < _projections.size(); i++) {
625
325k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325k
        }
627
71.1k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
82.3k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.1k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
377k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
365k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
365k
                        state, _intermediate_projections[i][j]));
633
365k
            }
634
11.1k
        }
635
71.1k
    }
636
71.1k
    return Status::OK();
637
71.1k
}
_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
244k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
244k
    _conjuncts.resize(_parent->_conjuncts.size());
618
244k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
244k
    if (_parent->has_projection()) {
622
134
        const auto& projection = *_parent->_projection;
623
134
        _projections.resize(projection.projections.size());
624
624
        for (size_t i = 0; i < _projections.size(); i++) {
625
490
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
490
        }
627
134
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
134
        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
134
    }
636
244k
    return Status::OK();
637
244k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
145
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
145
    _conjuncts.resize(_parent->_conjuncts.size());
618
145
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
145
    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
145
    return Status::OK();
637
145
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.68k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.68k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.72k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
41
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
41
    }
621
5.68k
    if (_parent->has_projection()) {
622
5.68k
        const auto& projection = *_parent->_projection;
623
5.68k
        _projections.resize(projection.projections.size());
624
25.3k
        for (size_t i = 0; i < _projections.size(); i++) {
625
19.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
19.6k
        }
627
5.68k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.69k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
14
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
104
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
90
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
90
                        state, _intermediate_projections[i][j]));
633
90
            }
634
14
        }
635
5.68k
    }
636
5.68k
    return Status::OK();
637
5.68k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.18k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.18k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.01k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.01k
    }
621
9.18k
    if (_parent->has_projection()) {
622
4.39k
        const auto& projection = *_parent->_projection;
623
4.39k
        _projections.resize(projection.projections.size());
624
19.0k
        for (size_t i = 0; i < _projections.size(); i++) {
625
14.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
14.6k
        }
627
4.39k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.49k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
95
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
721
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
626
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
626
                        state, _intermediate_projections[i][j]));
633
626
            }
634
95
        }
635
4.39k
    }
636
9.18k
    return Status::OK();
637
9.18k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
102k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
102k
    _conjuncts.resize(_parent->_conjuncts.size());
618
105k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
2.17k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
2.17k
    }
621
102k
    if (_parent->has_projection()) {
622
31.9k
        const auto& projection = *_parent->_projection;
623
31.9k
        _projections.resize(projection.projections.size());
624
293k
        for (size_t i = 0; i < _projections.size(); i++) {
625
261k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
261k
        }
627
31.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
32.6k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
720
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.47k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.75k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.75k
                        state, _intermediate_projections[i][j]));
633
3.75k
            }
634
720
        }
635
31.9k
    }
636
102k
    return Status::OK();
637
102k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
72.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
72.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
72.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
8
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
8
    }
621
72.0k
    if (_parent->has_projection()) {
622
275
        const auto& projection = *_parent->_projection;
623
275
        _projections.resize(projection.projections.size());
624
1.17k
        for (size_t i = 0; i < _projections.size(); i++) {
625
897
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
897
        }
627
275
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
277
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
2
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
9
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
9
                        state, _intermediate_projections[i][j]));
633
9
            }
634
2
        }
635
275
    }
636
72.0k
    return Status::OK();
637
72.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
122
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
122
    _conjuncts.resize(_parent->_conjuncts.size());
618
122
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
122
    if (_parent->has_projection()) {
622
1
        const auto& projection = *_parent->_projection;
623
1
        _projections.resize(projection.projections.size());
624
3
        for (size_t i = 0; i < _projections.size(); i++) {
625
2
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2
        }
627
1
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
1
        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
1
    }
636
122
    return Status::OK();
637
122
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
797k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
797k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.10M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
308k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
308k
    }
621
797k
    if (_parent->has_projection()) {
622
266k
        const auto& projection = *_parent->_projection;
623
266k
        _projections.resize(projection.projections.size());
624
1.58M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.31M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.31M
        }
627
266k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
276k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.93k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
57.5k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
47.6k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
47.6k
                        state, _intermediate_projections[i][j]));
633
47.6k
            }
634
9.93k
        }
635
266k
    }
636
797k
    return Status::OK();
637
797k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
56.2k
    if (_parent->has_projection()) {
622
11.9k
        const auto& projection = *_parent->_projection;
623
11.9k
        _projections.resize(projection.projections.size());
624
115k
        for (size_t i = 0; i < _projections.size(); i++) {
625
103k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
103k
        }
627
11.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
110
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.92k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.81k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.81k
                        state, _intermediate_projections[i][j]));
633
1.81k
            }
634
110
        }
635
11.9k
    }
636
56.2k
    return Status::OK();
637
56.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.32k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.32k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.87k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
549
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
549
    }
621
5.32k
    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.32k
    return Status::OK();
637
5.32k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
613
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
613
    _conjuncts.resize(_parent->_conjuncts.size());
618
613
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
613
    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
613
    return Status::OK();
637
613
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.34k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.34k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.34k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.34k
    if (_parent->has_projection()) {
622
90
        const auto& projection = *_parent->_projection;
623
90
        _projections.resize(projection.projections.size());
624
290
        for (size_t i = 0; i < _projections.size(); i++) {
625
200
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
200
        }
627
90
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
90
        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
90
    }
636
5.34k
    return Status::OK();
637
5.34k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
643k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
643k
    _conjuncts.resize(_parent->_conjuncts.size());
618
643k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
643k
    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
643k
    return Status::OK();
637
643k
}
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
9.59k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9.59k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9.59k
    _terminated = true;
645
9.59k
    return Status::OK();
646
9.59k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
440
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
440
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
440
    _terminated = true;
645
440
    return Status::OK();
646
440
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
21
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
21
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
21
    _terminated = true;
645
21
    return Status::OK();
646
21
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
59
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
59
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
59
    _terminated = true;
645
59
    return Status::OK();
646
59
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
146
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
146
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
146
    _terminated = true;
645
146
    return Status::OK();
646
146
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7.73k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.73k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.73k
    _terminated = true;
645
7.73k
    return Status::OK();
646
7.73k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
54
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
54
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
54
    _terminated = true;
645
54
    return Status::OK();
646
54
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.09k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.09k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.09k
    _terminated = true;
645
1.09k
    return Status::OK();
646
1.09k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
35
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
35
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
35
    _terminated = true;
645
35
    return Status::OK();
646
35
}
647
648
template <typename SharedStateArg>
649
2.27M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.27M
    if (_closed) {
651
266k
        return Status::OK();
652
266k
    }
653
2.01M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.21M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.21M
    }
656
2.01M
    _closed = true;
657
2.01M
    return Status::OK();
658
2.27M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
71.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
71.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
71.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
71.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
71.1k
    }
656
71.1k
    _closed = true;
657
71.1k
    return Status::OK();
658
71.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
483k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
483k
    if (_closed) {
651
242k
        return Status::OK();
652
242k
    }
653
240k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
240k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
240k
    }
656
240k
    _closed = true;
657
240k
    return Status::OK();
658
483k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
153
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
153
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
153
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
153
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
153
    }
656
153
    _closed = true;
657
153
    return Status::OK();
658
153
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.67k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.67k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.67k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.67k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.67k
    }
656
5.67k
    _closed = true;
657
5.67k
    return Status::OK();
658
5.67k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.11k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.11k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.11k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.11k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.11k
    }
656
9.11k
    _closed = true;
657
9.11k
    return Status::OK();
658
9.11k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
102k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
102k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
102k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
102k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
102k
    }
656
102k
    _closed = true;
657
102k
    return Status::OK();
658
102k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
71.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
71.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
71.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
71.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
71.7k
    }
656
71.7k
    _closed = true;
657
71.7k
    return Status::OK();
658
71.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
117
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
117
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
117
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
117
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
117
    }
656
117
    _closed = true;
657
117
    return Status::OK();
658
117
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
815k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
815k
    if (_closed) {
651
17.3k
        return Status::OK();
652
17.3k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
798k
    _closed = true;
657
798k
    return Status::OK();
658
815k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.3k
    }
656
56.3k
    _closed = true;
657
56.3k
    return Status::OK();
658
56.3k
}
_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.29k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.29k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.29k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.29k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.29k
    }
656
5.29k
    _closed = true;
657
5.29k
    return Status::OK();
658
5.29k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.01k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.01k
    if (_closed) {
651
510
        return Status::OK();
652
510
    }
653
508
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
508
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
508
    }
656
508
    _closed = true;
657
508
    return Status::OK();
658
1.01k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
11.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
11.0k
    if (_closed) {
651
5.74k
        return Status::OK();
652
5.74k
    }
653
5.33k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.33k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.33k
    }
656
5.33k
    _closed = true;
657
5.33k
    return Status::OK();
658
11.0k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
644k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
644k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
644k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
644k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
644k
    }
656
644k
    _closed = true;
657
644k
    return Status::OK();
658
644k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
336
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
336
    if (_closed) {
651
176
        return Status::OK();
652
176
    }
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
336
}
659
660
template <typename SharedState>
661
1.73M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.73M
    _operator_profile =
664
1.73M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.73M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.73M
    _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.73M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.73M
    _operator_profile->add_child(_common_profile, true);
673
1.73M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.73M
    _operator_profile->set_metadata(_parent->node_id());
676
1.73M
    _wait_for_finish_dependency_timer =
677
1.73M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.73M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.73M
    if constexpr (!is_fake_shared) {
680
1.22M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.22M
            info.shared_state_map.end()) {
682
330k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
241k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
241k
            }
685
330k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
330k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
330k
                                                  ? 0
688
330k
                                                  : info.task_idx]
689
330k
                                  .get();
690
330k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
894k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
894k
            _shared_state = info.shared_state->template cast<SharedState>();
696
894k
            _dependency = _shared_state->create_sink_dependency(
697
894k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
894k
        }
699
1.22M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.22M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.22M
    }
702
703
1.73M
    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.73M
    _rows_input_counter =
708
1.73M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.73M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.73M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.73M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.73M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.73M
    _memory_used_counter =
714
1.73M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.73M
    _common_profile->add_info_string("IsColocate",
716
1.73M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.73M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.73M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.73M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.73M
    return Status::OK();
721
1.73M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
118k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
118k
    _operator_profile =
664
118k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
118k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
118k
    _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
118k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
118k
    _operator_profile->add_child(_common_profile, true);
673
118k
    _operator_profile->add_child(_custom_profile, true);
674
675
118k
    _operator_profile->set_metadata(_parent->node_id());
676
118k
    _wait_for_finish_dependency_timer =
677
118k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
118k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
118k
    if constexpr (!is_fake_shared) {
680
118k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
118k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
17.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
17.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
17.6k
                                                  ? 0
688
17.6k
                                                  : info.task_idx]
689
17.6k
                                  .get();
690
17.6k
            _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
118k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
118k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
118k
    }
702
703
118k
    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
118k
    _rows_input_counter =
708
118k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
118k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
118k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
118k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
118k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
118k
    _memory_used_counter =
714
118k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
118k
    _common_profile->add_info_string("IsColocate",
716
118k
                                     std::to_string(_parent->is_colocated_operator()));
717
118k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
118k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
118k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
118k
    return Status::OK();
721
118k
}
_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
242k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
242k
    _operator_profile =
664
242k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
242k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
242k
    _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
242k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
242k
    _operator_profile->add_child(_common_profile, true);
673
242k
    _operator_profile->add_child(_custom_profile, true);
674
675
242k
    _operator_profile->set_metadata(_parent->node_id());
676
242k
    _wait_for_finish_dependency_timer =
677
242k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
242k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
242k
    if constexpr (!is_fake_shared) {
680
242k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
242k
            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
242k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
242k
            _shared_state = info.shared_state->template cast<SharedState>();
696
242k
            _dependency = _shared_state->create_sink_dependency(
697
242k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
242k
        }
699
242k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
242k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
242k
    }
702
703
242k
    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
242k
    _rows_input_counter =
708
242k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
242k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
242k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
242k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
242k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
242k
    _memory_used_counter =
714
242k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
242k
    _common_profile->add_info_string("IsColocate",
716
242k
                                     std::to_string(_parent->is_colocated_operator()));
717
242k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
242k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
242k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
242k
    return Status::OK();
721
242k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
161
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
161
    _operator_profile =
664
161
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
161
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
161
    _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
161
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
161
    _operator_profile->add_child(_common_profile, true);
673
161
    _operator_profile->add_child(_custom_profile, true);
674
675
161
    _operator_profile->set_metadata(_parent->node_id());
676
161
    _wait_for_finish_dependency_timer =
677
161
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
161
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
161
    if constexpr (!is_fake_shared) {
680
161
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
161
            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
161
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
161
            _shared_state = info.shared_state->template cast<SharedState>();
696
161
            _dependency = _shared_state->create_sink_dependency(
697
161
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
161
        }
699
161
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
161
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
161
    }
702
703
161
    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
161
    _rows_input_counter =
708
161
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
161
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
161
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
161
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
161
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
161
    _memory_used_counter =
714
161
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
161
    _common_profile->add_info_string("IsColocate",
716
161
                                     std::to_string(_parent->is_colocated_operator()));
717
161
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
161
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
161
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
161
    return Status::OK();
721
161
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.66k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.66k
    _operator_profile =
664
5.66k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.66k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.66k
    _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.66k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.66k
    _operator_profile->add_child(_common_profile, true);
673
5.66k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.66k
    _operator_profile->set_metadata(_parent->node_id());
676
5.66k
    _wait_for_finish_dependency_timer =
677
5.66k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.66k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.66k
    if constexpr (!is_fake_shared) {
680
5.66k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.66k
            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.66k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.66k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.66k
            _dependency = _shared_state->create_sink_dependency(
697
5.66k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.66k
        }
699
5.66k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.66k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.66k
    }
702
703
5.66k
    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.66k
    _rows_input_counter =
708
5.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.66k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.66k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.66k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.66k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.66k
    _memory_used_counter =
714
5.66k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.66k
    _common_profile->add_info_string("IsColocate",
716
5.66k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.66k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.66k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.66k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.66k
    return Status::OK();
721
5.66k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.17k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.17k
    _operator_profile =
664
9.17k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.17k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.17k
    _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.17k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.17k
    _operator_profile->add_child(_common_profile, true);
673
9.17k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.17k
    _operator_profile->set_metadata(_parent->node_id());
676
9.17k
    _wait_for_finish_dependency_timer =
677
9.17k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.17k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.17k
    if constexpr (!is_fake_shared) {
680
9.17k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.17k
            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.17k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.17k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.17k
            _dependency = _shared_state->create_sink_dependency(
697
9.17k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.17k
        }
699
9.17k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.17k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.17k
    }
702
703
9.17k
    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.17k
    _rows_input_counter =
708
9.17k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.17k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.17k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.17k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.17k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.17k
    _memory_used_counter =
714
9.17k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.17k
    _common_profile->add_info_string("IsColocate",
716
9.17k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.17k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.17k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.17k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.17k
    return Status::OK();
721
9.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
102k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
102k
    _operator_profile =
664
102k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
102k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
102k
    _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
102k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
102k
    _operator_profile->add_child(_common_profile, true);
673
102k
    _operator_profile->add_child(_custom_profile, true);
674
675
102k
    _operator_profile->set_metadata(_parent->node_id());
676
102k
    _wait_for_finish_dependency_timer =
677
102k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
102k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
102k
    if constexpr (!is_fake_shared) {
680
102k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
102k
            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
102k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
102k
            _shared_state = info.shared_state->template cast<SharedState>();
696
102k
            _dependency = _shared_state->create_sink_dependency(
697
102k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
102k
        }
699
102k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
102k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
102k
    }
702
703
102k
    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
102k
    _rows_input_counter =
708
102k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
102k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
102k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
102k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
102k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
102k
    _memory_used_counter =
714
102k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
102k
    _common_profile->add_info_string("IsColocate",
716
102k
                                     std::to_string(_parent->is_colocated_operator()));
717
102k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
102k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
102k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
102k
    return Status::OK();
721
102k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
71.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
71.7k
    _operator_profile =
664
71.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
71.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
71.7k
    _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
71.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
71.7k
    _operator_profile->add_child(_common_profile, true);
673
71.7k
    _operator_profile->add_child(_custom_profile, true);
674
675
71.7k
    _operator_profile->set_metadata(_parent->node_id());
676
71.7k
    _wait_for_finish_dependency_timer =
677
71.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
71.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
71.7k
    if constexpr (!is_fake_shared) {
680
71.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
71.9k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
71.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
71.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
71.9k
                                                  ? 0
688
71.9k
                                                  : info.task_idx]
689
71.9k
                                  .get();
690
71.9k
            _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
71.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
71.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
71.7k
    }
702
703
71.7k
    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
71.7k
    _rows_input_counter =
708
71.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
71.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
71.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
71.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
71.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
71.7k
    _memory_used_counter =
714
71.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
71.7k
    _common_profile->add_info_string("IsColocate",
716
71.7k
                                     std::to_string(_parent->is_colocated_operator()));
717
71.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
71.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
71.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
71.7k
    return Status::OK();
721
71.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
128
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
128
    _operator_profile =
664
128
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
128
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
128
    _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
128
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
128
    _operator_profile->add_child(_common_profile, true);
673
128
    _operator_profile->add_child(_custom_profile, true);
674
675
128
    _operator_profile->set_metadata(_parent->node_id());
676
128
    _wait_for_finish_dependency_timer =
677
128
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
128
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
128
    if constexpr (!is_fake_shared) {
680
128
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
128
            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
128
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
128
            _shared_state = info.shared_state->template cast<SharedState>();
696
128
            _dependency = _shared_state->create_sink_dependency(
697
128
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
128
        }
699
128
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
128
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
128
    }
702
703
128
    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
128
    _rows_input_counter =
708
128
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
128
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
128
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
128
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
128
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
128
    _memory_used_counter =
714
128
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
128
    _common_profile->add_info_string("IsColocate",
716
128
                                     std::to_string(_parent->is_colocated_operator()));
717
128
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
128
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
128
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
128
    return Status::OK();
721
128
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
511k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
511k
    _operator_profile =
664
511k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
511k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
511k
    _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
511k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
511k
    _operator_profile->add_child(_common_profile, true);
673
511k
    _operator_profile->add_child(_custom_profile, true);
674
675
511k
    _operator_profile->set_metadata(_parent->node_id());
676
511k
    _wait_for_finish_dependency_timer =
677
511k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
511k
    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
511k
    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
511k
    _rows_input_counter =
708
511k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
511k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
511k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
511k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
511k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
511k
    _memory_used_counter =
714
511k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
511k
    _common_profile->add_info_string("IsColocate",
716
511k
                                     std::to_string(_parent->is_colocated_operator()));
717
511k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
511k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
511k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
511k
    return Status::OK();
721
511k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.1k
    _operator_profile =
664
10.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.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
10.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.1k
    _operator_profile->add_child(_common_profile, true);
673
10.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.1k
    _operator_profile->set_metadata(_parent->node_id());
676
10.1k
    _wait_for_finish_dependency_timer =
677
10.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.1k
    if constexpr (!is_fake_shared) {
680
10.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.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
10.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.1k
            _dependency = _shared_state->create_sink_dependency(
697
10.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.1k
        }
699
10.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.1k
    }
702
703
10.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
10.1k
    _rows_input_counter =
708
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.1k
    _memory_used_counter =
714
10.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.1k
    _common_profile->add_info_string("IsColocate",
716
10.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.1k
    return Status::OK();
721
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
608
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
608
    _operator_profile =
664
608
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
608
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
608
    _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
608
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
608
    _operator_profile->add_child(_common_profile, true);
673
608
    _operator_profile->add_child(_custom_profile, true);
674
675
608
    _operator_profile->set_metadata(_parent->node_id());
676
608
    _wait_for_finish_dependency_timer =
677
608
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
608
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
608
    if constexpr (!is_fake_shared) {
680
608
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
608
            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
608
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
608
            _shared_state = info.shared_state->template cast<SharedState>();
696
608
            _dependency = _shared_state->create_sink_dependency(
697
608
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
608
        }
699
608
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
608
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
608
    }
702
703
609
    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
608
    _rows_input_counter =
708
608
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
608
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
608
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
608
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
608
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
608
    _memory_used_counter =
714
608
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
608
    _common_profile->add_info_string("IsColocate",
716
608
                                     std::to_string(_parent->is_colocated_operator()));
717
608
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
608
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
608
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
608
    return Status::OK();
721
608
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.07k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.07k
    _operator_profile =
664
2.07k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.07k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.07k
    _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.07k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.07k
    _operator_profile->add_child(_common_profile, true);
673
2.07k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.07k
    _operator_profile->set_metadata(_parent->node_id());
676
2.07k
    _wait_for_finish_dependency_timer =
677
2.07k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.07k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.07k
    if constexpr (!is_fake_shared) {
680
2.07k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.07k
            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.07k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.07k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.07k
            _dependency = _shared_state->create_sink_dependency(
697
2.07k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.07k
        }
699
2.07k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.07k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.07k
    }
702
703
2.10k
    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.07k
    _rows_input_counter =
708
2.07k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.07k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.07k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.07k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.07k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.07k
    _memory_used_counter =
714
2.07k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.07k
    _common_profile->add_info_string("IsColocate",
716
2.07k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.07k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.07k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.07k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.07k
    return Status::OK();
721
2.07k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
13.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
13.1k
    _operator_profile =
664
13.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
13.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
13.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
13.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
13.1k
    _operator_profile->add_child(_common_profile, true);
673
13.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
13.1k
    _operator_profile->set_metadata(_parent->node_id());
676
13.1k
    _wait_for_finish_dependency_timer =
677
13.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
13.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
13.1k
    if constexpr (!is_fake_shared) {
680
13.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
13.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
13.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
13.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
13.1k
            _dependency = _shared_state->create_sink_dependency(
697
13.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
13.1k
        }
699
13.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
13.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
13.1k
    }
702
703
13.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
13.1k
    _rows_input_counter =
708
13.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
13.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
13.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
13.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
13.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
13.1k
    _memory_used_counter =
714
13.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
13.1k
    _common_profile->add_info_string("IsColocate",
716
13.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
13.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
13.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
13.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
13.1k
    return Status::OK();
721
13.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
240k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
240k
    _operator_profile =
664
240k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
240k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
240k
    _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
240k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
240k
    _operator_profile->add_child(_common_profile, true);
673
240k
    _operator_profile->add_child(_custom_profile, true);
674
675
240k
    _operator_profile->set_metadata(_parent->node_id());
676
240k
    _wait_for_finish_dependency_timer =
677
240k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
240k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
240k
    if constexpr (!is_fake_shared) {
680
240k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
241k
            info.shared_state_map.end()) {
682
241k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
241k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
241k
            }
685
241k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
241k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
241k
                                                  ? 0
688
241k
                                                  : info.task_idx]
689
241k
                                  .get();
690
241k
            _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
240k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
240k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
240k
    }
702
703
240k
    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
240k
    _rows_input_counter =
708
240k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
240k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
240k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
240k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
240k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
240k
    _memory_used_counter =
714
240k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
240k
    _common_profile->add_info_string("IsColocate",
716
240k
                                     std::to_string(_parent->is_colocated_operator()));
717
240k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
240k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
240k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
240k
    return Status::OK();
721
240k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
407k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
407k
    _operator_profile =
664
407k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
407k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
407k
    _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
407k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
407k
    _operator_profile->add_child(_common_profile, true);
673
407k
    _operator_profile->add_child(_custom_profile, true);
674
675
407k
    _operator_profile->set_metadata(_parent->node_id());
676
407k
    _wait_for_finish_dependency_timer =
677
407k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
407k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
407k
    if constexpr (!is_fake_shared) {
680
407k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
407k
            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
407k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
407k
            _shared_state = info.shared_state->template cast<SharedState>();
696
407k
            _dependency = _shared_state->create_sink_dependency(
697
407k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
407k
        }
699
407k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
407k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
407k
    }
702
703
407k
    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
407k
    _rows_input_counter =
708
407k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
407k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
407k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
407k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
407k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
407k
    _memory_used_counter =
714
407k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
407k
    _common_profile->add_info_string("IsColocate",
716
407k
                                     std::to_string(_parent->is_colocated_operator()));
717
407k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
407k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
407k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
407k
    return Status::OK();
721
407k
}
_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.74M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.74M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.74M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.22M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.22M
    }
731
1.74M
    _closed = true;
732
1.74M
    return Status::OK();
733
1.74M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
118k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
118k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
118k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
118k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
118k
    }
731
118k
    _closed = true;
732
118k
    return Status::OK();
733
118k
}
_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
243k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
243k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
243k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
243k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
243k
    }
731
243k
    _closed = true;
732
243k
    return Status::OK();
733
243k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
151
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
151
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
149
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
149
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
149
    }
731
149
    _closed = true;
732
149
    return Status::OK();
733
151
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.63k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.63k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.63k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.63k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.63k
    }
731
5.63k
    _closed = true;
732
5.63k
    return Status::OK();
733
5.63k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.10k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.10k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.10k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.10k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.10k
    }
731
9.10k
    _closed = true;
732
9.10k
    return Status::OK();
733
9.10k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
102k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
102k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
102k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
102k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
102k
    }
731
102k
    _closed = true;
732
102k
    return Status::OK();
733
102k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
71.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
71.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
71.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
71.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
71.6k
    }
731
71.6k
    _closed = true;
732
71.6k
    return Status::OK();
733
71.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
117
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
117
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
117
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
117
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
117
    }
731
117
    _closed = true;
732
117
    return Status::OK();
733
117
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
515k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
515k
    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
515k
    _closed = true;
732
515k
    return Status::OK();
733
515k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.1k
    }
731
10.1k
    _closed = true;
732
10.1k
    return Status::OK();
733
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
507
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
507
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
507
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
507
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
507
    }
731
507
    _closed = true;
732
507
    return Status::OK();
733
507
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.17k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.17k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.17k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.17k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.17k
    }
731
2.17k
    _closed = true;
732
2.17k
    return Status::OK();
733
2.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
13.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
13.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
13.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
13.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
13.1k
    }
731
13.1k
    _closed = true;
732
13.1k
    return Status::OK();
733
13.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
242k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
242k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
242k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
242k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
242k
    }
731
242k
    _closed = true;
732
242k
    return Status::OK();
733
242k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
409k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
409k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
409k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
409k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
409k
    }
731
409k
    _closed = true;
732
409k
    return Status::OK();
733
409k
}
_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
1.53k
                                                          bool* eos) {
738
1.53k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.52k
    return pull(state, block, eos);
740
1.53k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
41
                                                          bool* eos) {
738
41
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
41
    return pull(state, block, eos);
740
41
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.49k
                                                          bool* eos) {
738
1.49k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.48k
    return pull(state, block, eos);
740
1.49k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
488k
                                                         bool* eos) {
745
488k
    auto& local_state = get_local_state(state);
746
488k
    if (need_more_input_data(state)) {
747
457k
        local_state._child_block->clear_column_data(
748
457k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
457k
                        .num_slots());
750
457k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
457k
                state, local_state._child_block.get(), &local_state._child_eos));
752
457k
        *eos = local_state._child_eos;
753
457k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
77.9k
            return Status::OK();
755
77.9k
        }
756
379k
        {
757
379k
            SCOPED_TIMER(local_state.exec_time_counter());
758
379k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
379k
        }
760
379k
    }
761
762
410k
    if (!need_more_input_data(state)) {
763
385k
        SCOPED_TIMER(local_state.exec_time_counter());
764
385k
        bool new_eos = false;
765
385k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
385k
        if (new_eos) {
767
308k
            *eos = true;
768
308k
        } else if (!need_more_input_data(state)) {
769
24.4k
            *eos = false;
770
24.4k
        }
771
385k
    }
772
410k
    return Status::OK();
773
410k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
142k
                                                         bool* eos) {
745
142k
    auto& local_state = get_local_state(state);
746
142k
    if (need_more_input_data(state)) {
747
122k
        local_state._child_block->clear_column_data(
748
122k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
122k
                        .num_slots());
750
122k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
122k
                state, local_state._child_block.get(), &local_state._child_eos));
752
122k
        *eos = local_state._child_eos;
753
122k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
39.2k
            return Status::OK();
755
39.2k
        }
756
83.6k
        {
757
83.6k
            SCOPED_TIMER(local_state.exec_time_counter());
758
83.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
83.6k
        }
760
83.6k
    }
761
762
103k
    if (!need_more_input_data(state)) {
763
103k
        SCOPED_TIMER(local_state.exec_time_counter());
764
103k
        bool new_eos = false;
765
103k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
103k
        if (new_eos) {
767
46.5k
            *eos = true;
768
56.6k
        } else if (!need_more_input_data(state)) {
769
11.4k
            *eos = false;
770
11.4k
        }
771
103k
    }
772
103k
    return Status::OK();
773
103k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.70k
                                                         bool* eos) {
745
4.70k
    auto& local_state = get_local_state(state);
746
4.70k
    if (need_more_input_data(state)) {
747
2.81k
        local_state._child_block->clear_column_data(
748
2.81k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.81k
                        .num_slots());
750
2.81k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.81k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.81k
        *eos = local_state._child_eos;
753
2.81k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
722
            return Status::OK();
755
722
        }
756
2.09k
        {
757
2.09k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.09k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.09k
        }
760
2.09k
    }
761
762
3.99k
    if (!need_more_input_data(state)) {
763
3.99k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.99k
        bool new_eos = false;
765
3.99k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.99k
        if (new_eos) {
767
1.51k
            *eos = true;
768
2.47k
        } else if (!need_more_input_data(state)) {
769
1.89k
            *eos = false;
770
1.89k
        }
771
3.99k
    }
772
3.98k
    return Status::OK();
773
3.98k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.92k
                                                         bool* eos) {
745
1.92k
    auto& local_state = get_local_state(state);
746
1.92k
    if (need_more_input_data(state)) {
747
1.92k
        local_state._child_block->clear_column_data(
748
1.92k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.92k
                        .num_slots());
750
1.92k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.92k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.92k
        *eos = local_state._child_eos;
753
1.92k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
778
            return Status::OK();
755
778
        }
756
1.14k
        {
757
1.14k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.14k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.14k
        }
760
1.14k
    }
761
762
1.14k
    if (!need_more_input_data(state)) {
763
1.14k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.14k
        bool new_eos = false;
765
1.14k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.14k
        if (new_eos) {
767
795
            *eos = true;
768
795
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.14k
    }
772
1.14k
    return Status::OK();
773
1.14k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
16.2k
                                                         bool* eos) {
745
16.2k
    auto& local_state = get_local_state(state);
746
16.2k
    if (need_more_input_data(state)) {
747
16.2k
        local_state._child_block->clear_column_data(
748
16.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
16.2k
                        .num_slots());
750
16.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
16.2k
                state, local_state._child_block.get(), &local_state._child_eos));
752
16.2k
        *eos = local_state._child_eos;
753
16.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.04k
            return Status::OK();
755
3.04k
        }
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
7.39k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.39k
        bool new_eos = false;
765
7.39k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.39k
        if (new_eos) {
767
7.26k
            *eos = true;
768
7.26k
        } else if (!need_more_input_data(state)) {
769
13
            *eos = false;
770
13
        }
771
7.39k
    }
772
13.1k
    return Status::OK();
773
13.1k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
294k
                                                         bool* eos) {
745
294k
    auto& local_state = get_local_state(state);
746
294k
    if (need_more_input_data(state)) {
747
294k
        local_state._child_block->clear_column_data(
748
294k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
294k
                        .num_slots());
750
294k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
294k
                state, local_state._child_block.get(), &local_state._child_eos));
752
294k
        *eos = local_state._child_eos;
753
294k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
32.8k
            return Status::OK();
755
32.8k
        }
756
262k
        {
757
262k
            SCOPED_TIMER(local_state.exec_time_counter());
758
262k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
262k
        }
760
262k
    }
761
762
261k
    if (!need_more_input_data(state)) {
763
242k
        SCOPED_TIMER(local_state.exec_time_counter());
764
242k
        bool new_eos = false;
765
242k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
242k
        if (new_eos) {
767
241k
            *eos = true;
768
241k
        } else if (!need_more_input_data(state)) {
769
7
            *eos = false;
770
7
        }
771
242k
    }
772
261k
    return Status::OK();
773
261k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.6k
                                                         bool* eos) {
745
20.6k
    auto& local_state = get_local_state(state);
746
20.6k
    if (need_more_input_data(state)) {
747
9.96k
        local_state._child_block->clear_column_data(
748
9.96k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.96k
                        .num_slots());
750
9.96k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.96k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.96k
        *eos = local_state._child_eos;
753
9.96k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
445
            return Status::OK();
755
445
        }
756
9.52k
        {
757
9.52k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.52k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.52k
        }
760
9.52k
    }
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.64k
            *eos = true;
768
13.9k
        } else if (!need_more_input_data(state)) {
769
10.7k
            *eos = false;
770
10.7k
        }
771
19.6k
    }
772
20.2k
    return Status::OK();
773
20.2k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
8.65k
                                                         bool* eos) {
745
8.65k
    auto& local_state = get_local_state(state);
746
8.65k
    if (need_more_input_data(state)) {
747
8.29k
        local_state._child_block->clear_column_data(
748
8.29k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
8.29k
                        .num_slots());
750
8.29k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
8.29k
                state, local_state._child_block.get(), &local_state._child_eos));
752
8.29k
        *eos = local_state._child_eos;
753
8.29k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
832
            return Status::OK();
755
832
        }
756
7.46k
        {
757
7.46k
            SCOPED_TIMER(local_state.exec_time_counter());
758
7.46k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
7.46k
        }
760
7.46k
    }
761
762
7.82k
    if (!need_more_input_data(state)) {
763
7.82k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.82k
        bool new_eos = false;
765
7.82k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.82k
        if (new_eos) {
767
5.37k
            *eos = true;
768
5.37k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.82k
    }
772
7.82k
    return Status::OK();
773
7.82k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.6k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.6k
                                                         "AsyncWriterDependency", true);
781
49.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.6k
                             _finish_dependency));
783
784
49.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.6k
    return Status::OK();
787
49.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
366
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
366
    RETURN_IF_ERROR(Base::init(state, info));
779
366
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
366
                                                         "AsyncWriterDependency", true);
781
366
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
366
                             _finish_dependency));
783
784
366
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
366
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
366
    return Status::OK();
787
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.2k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.2k
                                                         "AsyncWriterDependency", true);
781
49.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.2k
                             _finish_dependency));
783
784
49.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.2k
    return Status::OK();
787
49.2k
}
_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_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.3k
    RETURN_IF_ERROR(Base::open(state));
793
50.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
397k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
346k
        RETURN_IF_ERROR(
796
346k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
346k
    }
798
50.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.3k
    return Status::OK();
800
50.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
366
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
366
    RETURN_IF_ERROR(Base::open(state));
793
366
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
366
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
366
    return Status::OK();
800
366
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
49.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
49.9k
    RETURN_IF_ERROR(Base::open(state));
793
49.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
394k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
345k
        RETURN_IF_ERROR(
796
345k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
345k
    }
798
49.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
49.9k
    return Status::OK();
800
49.9k
}
_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_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
66.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
66.0k
    return _writer->sink(block, eos);
806
66.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.81k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.81k
    return _writer->sink(block, eos);
806
1.81k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
64.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.1k
    return _writer->sink(block, eos);
806
64.1k
}
_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_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.4k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.4k
    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
50.4k
    if (_writer) {
818
50.4k
        Status st = _writer->get_writer_status();
819
50.4k
        if (exec_status.ok()) {
820
50.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.3k
                                                       : Status::Cancelled("force close"));
822
50.3k
        } else {
823
98
            _writer->force_close(exec_status);
824
98
        }
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
50.4k
        RETURN_IF_ERROR(st);
829
50.4k
    }
830
50.3k
    return Base::close(state, exec_status);
831
50.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
355
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
355
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
355
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
355
    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
355
    if (_writer) {
818
355
        Status st = _writer->get_writer_status();
819
355
        if (exec_status.ok()) {
820
355
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
355
                                                       : Status::Cancelled("force close"));
822
355
        } 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
355
        RETURN_IF_ERROR(st);
829
355
    }
830
355
    return Base::close(state, exec_status);
831
355
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
50.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.0k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.0k
    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
50.0k
    if (_writer) {
818
50.0k
        Status st = _writer->get_writer_status();
819
50.0k
        if (exec_status.ok()) {
820
49.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
49.9k
                                                       : Status::Cancelled("force close"));
822
49.9k
        } else {
823
98
            _writer->force_close(exec_status);
824
98
        }
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
50.0k
        RETURN_IF_ERROR(st);
829
50.0k
    }
830
49.9k
    return Base::close(state, exec_status);
831
50.0k
}
_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_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
16
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
16
    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
16
    if (_writer) {
818
16
        Status st = _writer->get_writer_status();
819
16
        if (exec_status.ok()) {
820
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
16
                                                       : Status::Cancelled("force close"));
822
16
        } 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
16
        RETURN_IF_ERROR(st);
829
16
    }
830
16
    return Base::close(state, exec_status);
831
16
}
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::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
976
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
977
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
978
979
#ifdef BE_TEST
980
template class OperatorX<DummyOperatorLocalState>;
981
template class DataSinkOperatorX<DummySinkLocalState>;
982
#endif
983
984
} // namespace doris