Coverage Report

Created: 2026-04-20 07:36

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