Coverage Report

Created: 2026-06-10 18:13

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