Coverage Report

Created: 2026-06-05 03:43

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