Coverage Report

Created: 2026-06-08 06:10

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