Coverage Report

Created: 2026-05-26 07:14

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.31M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.31M
    if (_parent->nereids_id() == -1) {
120
1.20M
        return fmt::format("(id={})", _parent->node_id());
121
1.20M
    } else {
122
1.11M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.11M
    }
124
2.31M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
67.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
67.0k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
67.0k
    } else {
122
67.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
67.0k
    }
124
67.0k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1
    if (_parent->nereids_id() == -1) {
120
1
        return fmt::format("(id={})", _parent->node_id());
121
1
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
257k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
257k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
257k
    } else {
122
257k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
257k
    }
124
257k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
24
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
24
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
24
    } else {
122
24
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
24
    }
124
24
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
30.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
30.2k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
30.2k
    } else {
122
30.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
30.2k
    }
124
30.2k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
6.34k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
6.34k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
6.33k
    } else {
122
6.33k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
6.33k
    }
124
6.34k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
188k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
188k
    if (_parent->nereids_id() == -1) {
120
29
        return fmt::format("(id={})", _parent->node_id());
121
188k
    } else {
122
188k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
188k
    }
124
188k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
397
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
397
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
397
    } else {
122
397
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
397
    }
124
397
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
205
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
205
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
205
    } else {
122
205
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
205
    }
124
205
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
957k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
957k
    if (_parent->nereids_id() == -1) {
120
454k
        return fmt::format("(id={})", _parent->node_id());
121
502k
    } else {
122
502k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
502k
    }
124
957k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
54.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
54.2k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
54.2k
    } else {
122
54.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
54.2k
    }
124
54.2k
}
_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
41.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
41.3k
    if (_parent->nereids_id() == -1) {
120
41.2k
        return fmt::format("(id={})", _parent->node_id());
121
41.2k
    } else {
122
23
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
23
    }
124
41.3k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
391
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
391
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
289
    } else {
122
289
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
289
    }
124
391
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.69k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.69k
    if (_parent->nereids_id() == -1) {
120
13
        return fmt::format("(id={})", _parent->node_id());
121
4.68k
    } else {
122
4.68k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.68k
    }
124
4.69k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
706k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
706k
    if (_parent->nereids_id() == -1) {
120
705k
        return fmt::format("(id={})", _parent->node_id());
121
705k
    } else {
122
969
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
969
    }
124
706k
}
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.36M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.36M
    if (_parent->nereids_id() == -1) {
129
762k
        return fmt::format("(id={})", _parent->node_id());
130
762k
    } else {
131
604k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
604k
    }
133
1.36M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
115k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
115k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
115k
    } else {
131
115k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
115k
    }
133
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
2
    if (_parent->nereids_id() == -1) {
129
1
        return fmt::format("(id={})", _parent->node_id());
130
1
    } else {
131
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1
    }
133
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
258k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
258k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
258k
    } else {
131
258k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
258k
    }
133
258k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
30
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
30
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
30
    } else {
131
30
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
30
    }
133
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
30.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
30.4k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
30.4k
    } else {
131
30.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
30.4k
    }
133
30.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.35k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.35k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
6.34k
    } else {
131
6.34k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.34k
    }
133
6.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
188k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
188k
    if (_parent->nereids_id() == -1) {
129
29
        return fmt::format("(id={})", _parent->node_id());
130
188k
    } else {
131
188k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
188k
    }
133
188k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
349
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
349
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
349
    } else {
131
349
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
349
    }
133
349
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
215
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
215
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
215
    } else {
131
215
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
215
    }
133
215
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
104
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
104
    if (_parent->nereids_id() == -1) {
129
104
        return fmt::format("(id={})", _parent->node_id());
130
104
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
104
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
5.26k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
5.26k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
5.25k
    } else {
131
5.25k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
5.25k
    }
133
5.26k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
393
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
393
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
291
    } else {
131
291
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
291
    }
133
393
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.2k
    if (_parent->nereids_id() == -1) {
129
12.2k
        return fmt::format("(id={})", _parent->node_id());
130
12.2k
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
254k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
254k
    if (_parent->nereids_id() == -1) {
129
254k
        return fmt::format("(id={})", _parent->node_id());
130
254k
    } else {
131
99
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
99
    }
133
254k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
495k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
495k
    if (_parent->nereids_id() == -1) {
129
495k
        return fmt::format("(id={})", _parent->node_id());
130
495k
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
495k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
17
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
17
    if (_parent->nereids_id() == -1) {
129
17
        return fmt::format("(id={})", _parent->node_id());
130
17
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
302
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
302
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
302
    } else {
131
302
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
302
    }
133
302
}
134
135
template <typename SharedStateArg>
136
32.7k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
32.7k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
32.7k
    _terminated = true;
141
32.7k
    return Status::OK();
142
32.7k
}
_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
643
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
643
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
643
    _terminated = true;
141
643
    return Status::OK();
142
643
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4
    _terminated = true;
141
4
    return Status::OK();
142
4
}
_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
4.01k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4.01k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4.01k
    _terminated = true;
141
4.01k
    return Status::OK();
142
4.01k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
5
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
5
    _terminated = true;
141
5
    return Status::OK();
142
5
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2
    _terminated = true;
141
2
    return Status::OK();
142
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
585
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
585
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
585
    _terminated = true;
141
585
    return Status::OK();
142
585
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
32
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
32
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
32
    _terminated = true;
141
32
    return Status::OK();
142
32
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
3.03k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
3.03k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
3.03k
    _terminated = true;
141
3.03k
    return Status::OK();
142
3.03k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
193
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
193
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
193
    _terminated = true;
141
193
    return Status::OK();
142
193
}
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
1.11M
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
1.11M
    return _child && _child->is_serial_operator() && !is_source()
146
1.11M
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
1.11M
                   : DataDistribution(ExchangeType::NOOP);
148
1.11M
}
149
150
81.7k
const RowDescriptor& OperatorBase::row_desc() const {
151
81.7k
    return _child->row_desc();
152
81.7k
}
153
154
template <typename SharedStateArg>
155
20.3k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
20.3k
    fmt::memory_buffer debug_string_buffer;
157
20.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
20.3k
    return fmt::to_string(debug_string_buffer);
159
20.3k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
6
    fmt::memory_buffer debug_string_buffer;
157
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
6
    return fmt::to_string(debug_string_buffer);
159
6
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
3
    fmt::memory_buffer debug_string_buffer;
157
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
3
    return fmt::to_string(debug_string_buffer);
159
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
4
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
4
    fmt::memory_buffer debug_string_buffer;
157
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
4
    return fmt::to_string(debug_string_buffer);
159
4
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
3
    fmt::memory_buffer debug_string_buffer;
157
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
3
    return fmt::to_string(debug_string_buffer);
159
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
8
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
8
    fmt::memory_buffer debug_string_buffer;
157
8
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
8
    return fmt::to_string(debug_string_buffer);
159
8
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
20.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
20.2k
    fmt::memory_buffer debug_string_buffer;
157
20.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
20.2k
    return fmt::to_string(debug_string_buffer);
159
20.2k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
1
    fmt::memory_buffer debug_string_buffer;
157
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
1
    return fmt::to_string(debug_string_buffer);
159
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
155
39
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
39
    fmt::memory_buffer debug_string_buffer;
157
39
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
39
    return fmt::to_string(debug_string_buffer);
159
39
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
160
161
template <typename SharedStateArg>
162
20.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20.3k
    fmt::memory_buffer debug_string_buffer;
164
20.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20.3k
    return fmt::to_string(debug_string_buffer);
166
20.3k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
2
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
2
    fmt::memory_buffer debug_string_buffer;
164
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
2
    return fmt::to_string(debug_string_buffer);
166
2
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
4
    fmt::memory_buffer debug_string_buffer;
164
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
4
    return fmt::to_string(debug_string_buffer);
166
4
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
2
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
2
    fmt::memory_buffer debug_string_buffer;
164
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
2
    return fmt::to_string(debug_string_buffer);
166
2
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
7
    fmt::memory_buffer debug_string_buffer;
164
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
7
    return fmt::to_string(debug_string_buffer);
166
7
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
42
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
42
    fmt::memory_buffer debug_string_buffer;
164
42
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
42
    return fmt::to_string(debug_string_buffer);
166
42
}
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
162
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
4
    fmt::memory_buffer debug_string_buffer;
164
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
4
    return fmt::to_string(debug_string_buffer);
166
4
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
20.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20.2k
    fmt::memory_buffer debug_string_buffer;
164
20.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20.2k
    return fmt::to_string(debug_string_buffer);
166
20.2k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
167
168
20.5k
std::string OperatorXBase::debug_string(int indentation_level) const {
169
20.5k
    fmt::memory_buffer debug_string_buffer;
170
20.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
171
20.5k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
172
20.5k
                   _is_serial_operator);
173
20.5k
    return fmt::to_string(debug_string_buffer);
174
20.5k
}
175
176
20.3k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
177
20.3k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
178
20.3k
}
179
180
889k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
181
889k
    std::string node_name = print_plan_node_type(tnode.node_type);
182
889k
    _nereids_id = tnode.nereids_id;
183
889k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
184
5.74k
        if (!tnode.__isset.output_tuple_id) {
185
0
            return Status::InternalError("no final output tuple id");
186
0
        }
187
5.74k
        if (tnode.intermediate_output_tuple_id_list.size() !=
188
5.74k
            tnode.intermediate_projections_list.size()) {
189
0
            return Status::InternalError(
190
0
                    "intermediate_output_tuple_id_list size:{} not match "
191
0
                    "intermediate_projections_list size:{}",
192
0
                    tnode.intermediate_output_tuple_id_list.size(),
193
0
                    tnode.intermediate_projections_list.size());
194
0
        }
195
5.74k
    }
196
889k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
197
889k
    _op_name = substr + "_OPERATOR";
198
199
889k
    if (tnode.__isset.vconjunct) {
200
0
        return Status::InternalError("vconjunct is not supported yet");
201
889k
    } else if (tnode.__isset.conjuncts) {
202
439k
        for (const auto& conjunct : tnode.conjuncts) {
203
439k
            VExprContextSPtr context;
204
439k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
205
439k
            _conjuncts.emplace_back(context);
206
439k
        }
207
141k
    }
208
209
    // create the projections expr
210
889k
    if (tnode.__isset.projections) {
211
353k
        DCHECK(tnode.__isset.output_tuple_id);
212
353k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
213
353k
    }
214
889k
    if (!tnode.intermediate_projections_list.empty()) {
215
5.75k
        DCHECK(tnode.__isset.projections) << "no final projections";
216
5.75k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
217
17.7k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
218
17.7k
            VExprContextSPtrs projections;
219
17.7k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
220
17.7k
            _intermediate_projections.push_back(projections);
221
17.7k
        }
222
5.75k
    }
223
889k
    return Status::OK();
224
889k
}
225
226
953k
Status OperatorXBase::prepare(RuntimeState* state) {
227
953k
    for (auto& conjunct : _conjuncts) {
228
439k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
229
439k
    }
230
953k
    if (state->enable_adjust_conjunct_order_by_cost()) {
231
902k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
232
594k
            return a->execute_cost() < b->execute_cost();
233
594k
        });
234
902k
    };
235
236
971k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
237
17.7k
        RETURN_IF_ERROR(
238
17.7k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
239
17.7k
    }
240
953k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
241
242
953k
    if (has_output_row_desc()) {
243
353k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
244
353k
    }
245
246
953k
    for (auto& conjunct : _conjuncts) {
247
438k
        RETURN_IF_ERROR(conjunct->open(state));
248
438k
    }
249
953k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
250
953k
    for (auto& projections : _intermediate_projections) {
251
17.7k
        RETURN_IF_ERROR(VExpr::open(projections, state));
252
17.7k
    }
253
953k
    if (_child && !is_source()) {
254
176k
        RETURN_IF_ERROR(_child->prepare(state));
255
176k
    }
256
257
953k
    if (VExpr::contains_blockable_function(_conjuncts) ||
258
953k
        VExpr::contains_blockable_function(_projections)) {
259
0
        _blockable = true;
260
0
    }
261
262
953k
    return Status::OK();
263
953k
}
264
265
13.4k
Status OperatorXBase::terminate(RuntimeState* state) {
266
13.4k
    if (_child && !is_source()) {
267
4.75k
        RETURN_IF_ERROR(_child->terminate(state));
268
4.75k
    }
269
13.4k
    auto result = state->get_local_state_result(operator_id());
270
13.4k
    if (!result) {
271
0
        return result.error();
272
0
    }
273
13.4k
    return result.value()->terminate(state);
274
13.4k
}
275
276
6.43M
Status OperatorXBase::close(RuntimeState* state) {
277
6.43M
    if (_child && !is_source()) {
278
1.18M
        RETURN_IF_ERROR(_child->close(state));
279
1.18M
    }
280
6.43M
    auto result = state->get_local_state_result(operator_id());
281
6.43M
    if (!result) {
282
0
        return result.error();
283
0
    }
284
6.43M
    return result.value()->close(state);
285
6.43M
}
286
287
352k
void PipelineXLocalStateBase::clear_origin_block() {
288
352k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
289
352k
}
290
291
739k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
292
739k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
293
294
739k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
295
739k
    return Status::OK();
296
739k
}
297
298
0
bool PipelineXLocalStateBase::is_blockable() const {
299
0
    return std::any_of(_projections.begin(), _projections.end(),
300
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
301
0
}
302
303
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
304
352k
                                     Block* output_block) const {
305
352k
    auto* local_state = state->get_local_state(operator_id());
306
352k
    SCOPED_TIMER(local_state->exec_time_counter());
307
352k
    SCOPED_TIMER(local_state->_projection_timer);
308
352k
    const size_t rows = origin_block->rows();
309
352k
    if (rows == 0) {
310
173k
        return Status::OK();
311
173k
    }
312
179k
    Block input_block = *origin_block;
313
314
179k
    size_t bytes_usage = 0;
315
179k
    ColumnsWithTypeAndName new_columns;
316
179k
    for (const auto& projections : local_state->_intermediate_projections) {
317
1.13k
        if (projections.empty()) {
318
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
319
0
                                         node_id());
320
0
        }
321
1.13k
        new_columns.resize(projections.size());
322
8.38k
        for (int i = 0; i < projections.size(); i++) {
323
7.24k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
324
7.24k
            if (new_columns[i].column->size() != rows) {
325
0
                return Status::InternalError(
326
0
                        "intermediate projection result column size {} not equal input rows {}, "
327
0
                        "expr: {}",
328
0
                        new_columns[i].column->size(), rows,
329
0
                        projections[i]->root()->debug_string());
330
0
            }
331
7.24k
        }
332
1.13k
        Block tmp_block {new_columns};
333
1.13k
        bytes_usage += tmp_block.allocated_bytes();
334
1.13k
        input_block.swap(tmp_block);
335
1.13k
    }
336
337
179k
    if (input_block.rows() != rows) {
338
0
        return Status::InternalError(
339
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
340
0
                "input_block: {}",
341
0
                input_block.rows(), rows, input_block.dump_structure());
342
0
    }
343
847k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
344
847k
        if (to->is_nullable() && !from->is_nullable()) {
345
0
            if (_keep_origin || !from->is_exclusive()) {
346
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
347
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
348
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
349
0
                bytes_usage += null_column.allocated_bytes();
350
0
            } else {
351
0
                to = make_nullable(from, false)->assert_mutable();
352
0
            }
353
847k
        } else {
354
847k
            if (_keep_origin || !from->is_exclusive()) {
355
826k
                to->insert_range_from(*from, 0, rows);
356
826k
                bytes_usage += from->allocated_bytes();
357
826k
            } else {
358
20.9k
                to = from->assert_mutable();
359
20.9k
            }
360
847k
        }
361
847k
    };
362
363
179k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
364
179k
            output_block, *_output_row_descriptor);
365
179k
    auto& mutable_block = scoped_mutable_block.mutable_block();
366
179k
    auto& mutable_columns = mutable_block.mutable_columns();
367
179k
    if (rows != 0) {
368
179k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
369
1.02M
        for (int i = 0; i < mutable_columns.size(); ++i) {
370
847k
            ColumnPtr column_ptr;
371
847k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
372
847k
            if (column_ptr->size() != rows) {
373
0
                return Status::InternalError(
374
0
                        "projection result column size {} not equal input rows {}, expr: {}",
375
0
                        column_ptr->size(), rows,
376
0
                        local_state->_projections[i]->root()->debug_string());
377
0
            }
378
847k
            column_ptr = column_ptr->convert_to_full_column_if_const();
379
847k
            bytes_usage += column_ptr->allocated_bytes();
380
847k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
381
847k
        }
382
179k
        DCHECK(mutable_block.rows() == rows);
383
179k
    }
384
179k
    local_state->_estimate_memory_usage += bytes_usage;
385
386
179k
    return Status::OK();
387
179k
}
388
389
5.26M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
390
5.26M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
391
5.26M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
392
5.26M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
393
5.26M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
394
5.26M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
395
5.26M
            if (_debug_point_count++ % 2 == 0) {
396
5.26M
                return Status::OK();
397
5.26M
            }
398
5.26M
        }
399
5.26M
    });
400
401
5.26M
    Status status;
402
5.26M
    auto* local_state = state->get_local_state(operator_id());
403
5.26M
    Defer defer([&]() {
404
5.26M
        if (status.ok()) {
405
5.26M
            local_state->update_output_block_counters(*block);
406
5.26M
        }
407
5.26M
    });
408
5.26M
    if (_output_row_descriptor) {
409
352k
        local_state->clear_origin_block();
410
352k
        status = get_block(state, &local_state->_origin_block, eos);
411
352k
        if (UNLIKELY(!status.ok())) {
412
19
            return status;
413
19
        }
414
352k
        status = do_projections(state, &local_state->_origin_block, block);
415
352k
        return status;
416
352k
    }
417
4.90M
    status = get_block(state, block, eos);
418
4.90M
    RETURN_IF_ERROR(block->check_type_and_column());
419
4.90M
    return status;
420
4.90M
}
421
422
3.17M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
423
3.17M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
424
7.16k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
425
7.16k
        *eos = true;
426
7.16k
    }
427
428
3.17M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
429
3.17M
        auto op_name = to_lower(_parent->_op_name);
430
3.17M
        auto arg_op_name = dp->param<std::string>("op_name");
431
3.17M
        arg_op_name = to_lower(arg_op_name);
432
433
3.17M
        if (op_name == arg_op_name) {
434
3.17M
            *eos = true;
435
3.17M
        }
436
3.17M
    });
437
438
3.17M
    if (auto rows = block->rows()) {
439
908k
        _num_rows_returned += rows;
440
908k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
441
908k
    }
442
3.17M
}
443
444
32.6k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
445
32.6k
    auto result = state->get_sink_local_state_result();
446
32.6k
    if (!result) {
447
0
        return result.error();
448
0
    }
449
32.6k
    return result.value()->terminate(state);
450
32.6k
}
451
452
20.5k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
453
20.5k
    fmt::memory_buffer debug_string_buffer;
454
455
20.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
456
20.5k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
457
20.5k
    return fmt::to_string(debug_string_buffer);
458
20.5k
}
459
460
20.3k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
461
20.3k
    return state->get_sink_local_state()->debug_string(indentation_level);
462
20.3k
}
463
464
539k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
465
539k
    std::string op_name = "UNKNOWN_SINK";
466
539k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
467
468
539k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
469
539k
        op_name = it->second;
470
539k
    }
471
539k
    _name = op_name + "_OPERATOR";
472
539k
    return Status::OK();
473
539k
}
474
475
281k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
476
281k
    std::string op_name = print_plan_node_type(tnode.node_type);
477
281k
    _nereids_id = tnode.nereids_id;
478
281k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
479
281k
    _name = substr + "_SINK_OPERATOR";
480
281k
    return Status::OK();
481
281k
}
482
483
template <typename LocalStateType>
484
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
485
2.12M
                                                            LocalSinkStateInfo& info) {
486
2.12M
    auto local_state = LocalStateType::create_unique(this, state);
487
2.12M
    RETURN_IF_ERROR(local_state->init(state, info));
488
2.12M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
2.12M
    return Status::OK();
490
2.12M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
115k
                                                            LocalSinkStateInfo& info) {
486
115k
    auto local_state = LocalStateType::create_unique(this, state);
487
115k
    RETURN_IF_ERROR(local_state->init(state, info));
488
115k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
115k
    return Status::OK();
490
115k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
433k
                                                            LocalSinkStateInfo& info) {
486
433k
    auto local_state = LocalStateType::create_unique(this, state);
487
433k
    RETURN_IF_ERROR(local_state->init(state, info));
488
433k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
433k
    return Status::OK();
490
433k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
88
                                                            LocalSinkStateInfo& info) {
486
88
    auto local_state = LocalStateType::create_unique(this, state);
487
88
    RETURN_IF_ERROR(local_state->init(state, info));
488
88
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
88
    return Status::OK();
490
88
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
3
                                                            LocalSinkStateInfo& info) {
486
3
    auto local_state = LocalStateType::create_unique(this, state);
487
3
    RETURN_IF_ERROR(local_state->init(state, info));
488
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
3
    return Status::OK();
490
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
512
                                                            LocalSinkStateInfo& info) {
486
512
    auto local_state = LocalStateType::create_unique(this, state);
487
512
    RETURN_IF_ERROR(local_state->init(state, info));
488
512
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
512
    return Status::OK();
490
512
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
44.4k
                                                            LocalSinkStateInfo& info) {
486
44.4k
    auto local_state = LocalStateType::create_unique(this, state);
487
44.4k
    RETURN_IF_ERROR(local_state->init(state, info));
488
44.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
44.4k
    return Status::OK();
490
44.4k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
8.84k
                                                            LocalSinkStateInfo& info) {
486
8.84k
    auto local_state = LocalStateType::create_unique(this, state);
487
8.84k
    RETURN_IF_ERROR(local_state->init(state, info));
488
8.84k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
8.84k
    return Status::OK();
490
8.84k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
5.15k
                                                            LocalSinkStateInfo& info) {
486
5.15k
    auto local_state = LocalStateType::create_unique(this, state);
487
5.15k
    RETURN_IF_ERROR(local_state->init(state, info));
488
5.15k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
5.15k
    return Status::OK();
490
5.15k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
156
                                                            LocalSinkStateInfo& info) {
486
156
    auto local_state = LocalStateType::create_unique(this, state);
487
156
    RETURN_IF_ERROR(local_state->init(state, info));
488
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
156
    return Status::OK();
490
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
3.38k
                                                            LocalSinkStateInfo& info) {
486
3.38k
    auto local_state = LocalStateType::create_unique(this, state);
487
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
488
3.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
3.38k
    return Status::OK();
490
3.38k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
160
                                                            LocalSinkStateInfo& info) {
486
160
    auto local_state = LocalStateType::create_unique(this, state);
487
160
    RETURN_IF_ERROR(local_state->init(state, info));
488
160
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
160
    return Status::OK();
490
160
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
640
                                                            LocalSinkStateInfo& info) {
486
640
    auto local_state = LocalStateType::create_unique(this, state);
487
640
    RETURN_IF_ERROR(local_state->init(state, info));
488
640
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
640
    return Status::OK();
490
640
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
6.35k
                                                            LocalSinkStateInfo& info) {
486
6.35k
    auto local_state = LocalStateType::create_unique(this, state);
487
6.35k
    RETURN_IF_ERROR(local_state->init(state, info));
488
6.35k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
6.35k
    return Status::OK();
490
6.35k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
101
                                                            LocalSinkStateInfo& info) {
486
101
    auto local_state = LocalStateType::create_unique(this, state);
487
101
    RETURN_IF_ERROR(local_state->init(state, info));
488
101
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
101
    return Status::OK();
490
101
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
259k
                                                            LocalSinkStateInfo& info) {
486
259k
    auto local_state = LocalStateType::create_unique(this, state);
487
259k
    RETURN_IF_ERROR(local_state->init(state, info));
488
259k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
259k
    return Status::OK();
490
259k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
30
                                                            LocalSinkStateInfo& info) {
486
30
    auto local_state = LocalStateType::create_unique(this, state);
487
30
    RETURN_IF_ERROR(local_state->init(state, info));
488
30
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
30
    return Status::OK();
490
30
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
255k
                                                            LocalSinkStateInfo& info) {
486
255k
    auto local_state = LocalStateType::create_unique(this, state);
487
255k
    RETURN_IF_ERROR(local_state->init(state, info));
488
255k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
255k
    return Status::OK();
490
255k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
188k
                                                            LocalSinkStateInfo& info) {
486
188k
    auto local_state = LocalStateType::create_unique(this, state);
487
188k
    RETURN_IF_ERROR(local_state->init(state, info));
488
188k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
188k
    return Status::OK();
490
188k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
348
                                                            LocalSinkStateInfo& info) {
486
348
    auto local_state = LocalStateType::create_unique(this, state);
487
348
    RETURN_IF_ERROR(local_state->init(state, info));
488
348
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
348
    return Status::OK();
490
348
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
215
                                                            LocalSinkStateInfo& info) {
486
215
    auto local_state = LocalStateType::create_unique(this, state);
487
215
    RETURN_IF_ERROR(local_state->init(state, info));
488
215
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
215
    return Status::OK();
490
215
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
742k
                                                            LocalSinkStateInfo& info) {
486
742k
    auto local_state = LocalStateType::create_unique(this, state);
487
742k
    RETURN_IF_ERROR(local_state->init(state, info));
488
742k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
742k
    return Status::OK();
490
742k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
30.4k
                                                            LocalSinkStateInfo& info) {
486
30.4k
    auto local_state = LocalStateType::create_unique(this, state);
487
30.4k
    RETURN_IF_ERROR(local_state->init(state, info));
488
30.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
30.4k
    return Status::OK();
490
30.4k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
5.25k
                                                            LocalSinkStateInfo& info) {
486
5.25k
    auto local_state = LocalStateType::create_unique(this, state);
487
5.25k
    RETURN_IF_ERROR(local_state->init(state, info));
488
5.25k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
5.25k
    return Status::OK();
490
5.25k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
13.9k
                                                            LocalSinkStateInfo& info) {
486
13.9k
    auto local_state = LocalStateType::create_unique(this, state);
487
13.9k
    RETURN_IF_ERROR(local_state->init(state, info));
488
13.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
13.9k
    return Status::OK();
490
13.9k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
290
                                                            LocalSinkStateInfo& info) {
486
290
    auto local_state = LocalStateType::create_unique(this, state);
487
290
    RETURN_IF_ERROR(local_state->init(state, info));
488
290
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
290
    return Status::OK();
490
290
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
4.62k
                                                            LocalSinkStateInfo& info) {
486
4.62k
    auto local_state = LocalStateType::create_unique(this, state);
487
4.62k
    RETURN_IF_ERROR(local_state->init(state, info));
488
4.62k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
4.62k
    return Status::OK();
490
4.62k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
2.57k
                                                            LocalSinkStateInfo& info) {
486
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
487
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
488
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
2.57k
    return Status::OK();
490
2.57k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
2.44k
                                                            LocalSinkStateInfo& info) {
486
2.44k
    auto local_state = LocalStateType::create_unique(this, state);
487
2.44k
    RETURN_IF_ERROR(local_state->init(state, info));
488
2.44k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
2.44k
    return Status::OK();
490
2.44k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
2.53k
                                                            LocalSinkStateInfo& info) {
486
2.53k
    auto local_state = LocalStateType::create_unique(this, state);
487
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
488
2.53k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
2.53k
    return Status::OK();
490
2.53k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
1
                                                            LocalSinkStateInfo& info) {
486
1
    auto local_state = LocalStateType::create_unique(this, state);
487
1
    RETURN_IF_ERROR(local_state->init(state, info));
488
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
1
    return Status::OK();
490
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
166
                                                            LocalSinkStateInfo& info) {
486
166
    auto local_state = LocalStateType::create_unique(this, state);
487
166
    RETURN_IF_ERROR(local_state->init(state, info));
488
166
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
166
    return Status::OK();
490
166
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
14
                                                            LocalSinkStateInfo& info) {
486
14
    auto local_state = LocalStateType::create_unique(this, state);
487
14
    RETURN_IF_ERROR(local_state->init(state, info));
488
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
14
    return Status::OK();
490
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
104
                                                            LocalSinkStateInfo& info) {
486
104
    auto local_state = LocalStateType::create_unique(this, state);
487
104
    RETURN_IF_ERROR(local_state->init(state, info));
488
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
104
    return Status::OK();
490
104
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
151
                                                            LocalSinkStateInfo& info) {
486
151
    auto local_state = LocalStateType::create_unique(this, state);
487
151
    RETURN_IF_ERROR(local_state->init(state, info));
488
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
151
    return Status::OK();
490
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
485
151
                                                            LocalSinkStateInfo& info) {
486
151
    auto local_state = LocalStateType::create_unique(this, state);
487
151
    RETURN_IF_ERROR(local_state->init(state, info));
488
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
489
151
    return Status::OK();
490
151
}
491
492
template <typename LocalStateType>
493
1.82M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
0
                                 LocalExchangeSharedState>) {
496
0
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
0
                                        MultiCastSharedState>) {
499
0
        throw Exception(Status::FatalError("should not reach here!"));
500
1.82M
    } else {
501
1.82M
        auto ss = LocalStateType::SharedStateType::create_shared();
502
1.82M
        ss->id = operator_id();
503
1.82M
        for (auto& dest : dests_id()) {
504
1.81M
            ss->related_op_ids.insert(dest);
505
1.81M
        }
506
1.82M
        return ss;
507
1.82M
    }
508
1.82M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
95.5k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
95.5k
    } else {
501
95.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
95.5k
        ss->id = operator_id();
503
95.5k
        for (auto& dest : dests_id()) {
504
95.4k
            ss->related_op_ids.insert(dest);
505
95.4k
        }
506
95.5k
        return ss;
507
95.5k
    }
508
95.5k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
434k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
434k
    } else {
501
434k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
434k
        ss->id = operator_id();
503
434k
        for (auto& dest : dests_id()) {
504
432k
            ss->related_op_ids.insert(dest);
505
432k
        }
506
434k
        return ss;
507
434k
    }
508
434k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
88
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
88
    } else {
501
88
        auto ss = LocalStateType::SharedStateType::create_shared();
502
88
        ss->id = operator_id();
503
88
        for (auto& dest : dests_id()) {
504
88
            ss->related_op_ids.insert(dest);
505
88
        }
506
88
        return ss;
507
88
    }
508
88
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
3
    } else {
501
3
        auto ss = LocalStateType::SharedStateType::create_shared();
502
3
        ss->id = operator_id();
503
3
        for (auto& dest : dests_id()) {
504
3
            ss->related_op_ids.insert(dest);
505
3
        }
506
3
        return ss;
507
3
    }
508
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
512
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
512
    } else {
501
512
        auto ss = LocalStateType::SharedStateType::create_shared();
502
512
        ss->id = operator_id();
503
512
        for (auto& dest : dests_id()) {
504
512
            ss->related_op_ids.insert(dest);
505
512
        }
506
512
        return ss;
507
512
    }
508
512
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
44.5k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
44.5k
    } else {
501
44.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
44.5k
        ss->id = operator_id();
503
44.5k
        for (auto& dest : dests_id()) {
504
44.3k
            ss->related_op_ids.insert(dest);
505
44.3k
        }
506
44.5k
        return ss;
507
44.5k
    }
508
44.5k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
493
8.84k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
8.84k
    } else {
501
8.84k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
8.84k
        ss->id = operator_id();
503
8.84k
        for (auto& dest : dests_id()) {
504
8.84k
            ss->related_op_ids.insert(dest);
505
8.84k
        }
506
8.84k
        return ss;
507
8.84k
    }
508
8.84k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
5.15k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
5.15k
    } else {
501
5.15k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
5.15k
        ss->id = operator_id();
503
5.15k
        for (auto& dest : dests_id()) {
504
5.15k
            ss->related_op_ids.insert(dest);
505
5.15k
        }
506
5.15k
        return ss;
507
5.15k
    }
508
5.15k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
156
    } else {
501
156
        auto ss = LocalStateType::SharedStateType::create_shared();
502
156
        ss->id = operator_id();
503
156
        for (auto& dest : dests_id()) {
504
156
            ss->related_op_ids.insert(dest);
505
156
        }
506
156
        return ss;
507
156
    }
508
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
3.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
3.38k
    } else {
501
3.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
3.38k
        ss->id = operator_id();
503
3.38k
        for (auto& dest : dests_id()) {
504
3.37k
            ss->related_op_ids.insert(dest);
505
3.37k
        }
506
3.38k
        return ss;
507
3.38k
    }
508
3.38k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
160
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
160
    } else {
501
160
        auto ss = LocalStateType::SharedStateType::create_shared();
502
160
        ss->id = operator_id();
503
160
        for (auto& dest : dests_id()) {
504
160
            ss->related_op_ids.insert(dest);
505
160
        }
506
160
        return ss;
507
160
    }
508
160
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
640
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
640
    } else {
501
640
        auto ss = LocalStateType::SharedStateType::create_shared();
502
640
        ss->id = operator_id();
503
640
        for (auto& dest : dests_id()) {
504
640
            ss->related_op_ids.insert(dest);
505
640
        }
506
640
        return ss;
507
640
    }
508
640
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
6.36k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
6.36k
    } else {
501
6.36k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
6.36k
        ss->id = operator_id();
503
6.36k
        for (auto& dest : dests_id()) {
504
6.35k
            ss->related_op_ids.insert(dest);
505
6.35k
        }
506
6.36k
        return ss;
507
6.36k
    }
508
6.36k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
101
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
101
    } else {
501
101
        auto ss = LocalStateType::SharedStateType::create_shared();
502
101
        ss->id = operator_id();
503
101
        for (auto& dest : dests_id()) {
504
101
            ss->related_op_ids.insert(dest);
505
101
        }
506
101
        return ss;
507
101
    }
508
101
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
259k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
259k
    } else {
501
259k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
259k
        ss->id = operator_id();
503
259k
        for (auto& dest : dests_id()) {
504
259k
            ss->related_op_ids.insert(dest);
505
259k
        }
506
259k
        return ss;
507
259k
    }
508
259k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
32
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
32
    } else {
501
32
        auto ss = LocalStateType::SharedStateType::create_shared();
502
32
        ss->id = operator_id();
503
32
        for (auto& dest : dests_id()) {
504
32
            ss->related_op_ids.insert(dest);
505
32
        }
506
32
        return ss;
507
32
    }
508
32
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
188k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
188k
    } else {
501
188k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
188k
        ss->id = operator_id();
503
188k
        for (auto& dest : dests_id()) {
504
188k
            ss->related_op_ids.insert(dest);
505
188k
        }
506
188k
        return ss;
507
188k
    }
508
188k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
214
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
214
    } else {
501
214
        auto ss = LocalStateType::SharedStateType::create_shared();
502
214
        ss->id = operator_id();
503
214
        for (auto& dest : dests_id()) {
504
214
            ss->related_op_ids.insert(dest);
505
214
        }
506
214
        return ss;
507
214
    }
508
214
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
742k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
742k
    } else {
501
742k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
742k
        ss->id = operator_id();
503
742k
        for (auto& dest : dests_id()) {
504
737k
            ss->related_op_ids.insert(dest);
505
737k
        }
506
742k
        return ss;
507
742k
    }
508
742k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
30.4k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
30.4k
    } else {
501
30.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
30.4k
        ss->id = operator_id();
503
30.4k
        for (auto& dest : dests_id()) {
504
30.4k
            ss->related_op_ids.insert(dest);
505
30.4k
        }
506
30.4k
        return ss;
507
30.4k
    }
508
30.4k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
394
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
394
    } else {
501
394
        auto ss = LocalStateType::SharedStateType::create_shared();
502
394
        ss->id = operator_id();
503
394
        for (auto& dest : dests_id()) {
504
394
            ss->related_op_ids.insert(dest);
505
394
        }
506
394
        return ss;
507
394
    }
508
394
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
493
2.46k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
2.46k
    } else {
501
2.46k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
2.46k
        ss->id = operator_id();
503
2.47k
        for (auto& dest : dests_id()) {
504
2.47k
            ss->related_op_ids.insert(dest);
505
2.47k
        }
506
2.46k
        return ss;
507
2.46k
    }
508
2.46k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
493
2.55k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
2.55k
    } else {
501
2.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
502
2.55k
        ss->id = operator_id();
503
2.56k
        for (auto& dest : dests_id()) {
504
2.56k
            ss->related_op_ids.insert(dest);
505
2.56k
        }
506
2.55k
        return ss;
507
2.55k
    }
508
2.55k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
166
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
166
    } else {
501
166
        auto ss = LocalStateType::SharedStateType::create_shared();
502
166
        ss->id = operator_id();
503
166
        for (auto& dest : dests_id()) {
504
166
            ss->related_op_ids.insert(dest);
505
166
        }
506
166
        return ss;
507
166
    }
508
166
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
493
104
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
494
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
495
                                 LocalExchangeSharedState>) {
496
        return nullptr;
497
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                        MultiCastSharedState>) {
499
        throw Exception(Status::FatalError("should not reach here!"));
500
104
    } else {
501
104
        auto ss = LocalStateType::SharedStateType::create_shared();
502
104
        ss->id = operator_id();
503
104
        for (auto& dest : dests_id()) {
504
104
            ss->related_op_ids.insert(dest);
505
104
        }
506
104
        return ss;
507
104
    }
508
104
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
509
510
template <typename LocalStateType>
511
2.65M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
2.65M
    auto local_state = LocalStateType::create_unique(state, this);
513
2.65M
    RETURN_IF_ERROR(local_state->init(state, info));
514
2.65M
    state->emplace_local_state(operator_id(), std::move(local_state));
515
2.65M
    return Status::OK();
516
2.65M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
67.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
67.1k
    auto local_state = LocalStateType::create_unique(state, this);
513
67.1k
    RETURN_IF_ERROR(local_state->init(state, info));
514
67.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
67.1k
    return Status::OK();
516
67.1k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
288k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
288k
    auto local_state = LocalStateType::create_unique(state, this);
513
288k
    RETURN_IF_ERROR(local_state->init(state, info));
514
288k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
288k
    return Status::OK();
516
288k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
80
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
80
    auto local_state = LocalStateType::create_unique(state, this);
513
80
    RETURN_IF_ERROR(local_state->init(state, info));
514
80
    state->emplace_local_state(operator_id(), std::move(local_state));
515
80
    return Status::OK();
516
80
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
32.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
32.7k
    auto local_state = LocalStateType::create_unique(state, this);
513
32.7k
    RETURN_IF_ERROR(local_state->init(state, info));
514
32.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
32.7k
    return Status::OK();
516
32.7k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
6.34k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
6.34k
    auto local_state = LocalStateType::create_unique(state, this);
513
6.34k
    RETURN_IF_ERROR(local_state->init(state, info));
514
6.34k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
6.34k
    return Status::OK();
516
6.34k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
6.74k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
6.74k
    auto local_state = LocalStateType::create_unique(state, this);
513
6.74k
    RETURN_IF_ERROR(local_state->init(state, info));
514
6.74k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
6.74k
    return Status::OK();
516
6.74k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
24
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
24
    auto local_state = LocalStateType::create_unique(state, this);
513
24
    RETURN_IF_ERROR(local_state->init(state, info));
514
24
    state->emplace_local_state(operator_id(), std::move(local_state));
515
24
    return Status::OK();
516
24
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
251k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
251k
    auto local_state = LocalStateType::create_unique(state, this);
513
251k
    RETURN_IF_ERROR(local_state->init(state, info));
514
251k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
251k
    return Status::OK();
516
251k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
188k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
188k
    auto local_state = LocalStateType::create_unique(state, this);
513
188k
    RETURN_IF_ERROR(local_state->init(state, info));
514
188k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
188k
    return Status::OK();
516
188k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
398
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
398
    auto local_state = LocalStateType::create_unique(state, this);
513
398
    RETURN_IF_ERROR(local_state->init(state, info));
514
398
    state->emplace_local_state(operator_id(), std::move(local_state));
515
398
    return Status::OK();
516
398
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
205
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
205
    auto local_state = LocalStateType::create_unique(state, this);
513
205
    RETURN_IF_ERROR(local_state->init(state, info));
514
205
    state->emplace_local_state(operator_id(), std::move(local_state));
515
205
    return Status::OK();
516
205
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
4.07k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
4.07k
    auto local_state = LocalStateType::create_unique(state, this);
513
4.07k
    RETURN_IF_ERROR(local_state->init(state, info));
514
4.07k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
4.07k
    return Status::OK();
516
4.07k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
457k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
457k
    auto local_state = LocalStateType::create_unique(state, this);
513
457k
    RETURN_IF_ERROR(local_state->init(state, info));
514
457k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
457k
    return Status::OK();
516
457k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
1.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
1.27k
    auto local_state = LocalStateType::create_unique(state, this);
513
1.27k
    RETURN_IF_ERROR(local_state->init(state, info));
514
1.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
1.27k
    return Status::OK();
516
1.27k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
30.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
30.4k
    auto local_state = LocalStateType::create_unique(state, this);
513
30.4k
    RETURN_IF_ERROR(local_state->init(state, info));
514
30.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
30.4k
    return Status::OK();
516
30.4k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
221
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
221
    auto local_state = LocalStateType::create_unique(state, this);
513
221
    RETURN_IF_ERROR(local_state->init(state, info));
514
221
    state->emplace_local_state(operator_id(), std::move(local_state));
515
221
    return Status::OK();
516
221
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
513
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
514
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
1.95k
    return Status::OK();
516
1.95k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
54.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
54.3k
    auto local_state = LocalStateType::create_unique(state, this);
513
54.3k
    RETURN_IF_ERROR(local_state->init(state, info));
514
54.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
54.3k
    return Status::OK();
516
54.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
41.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
41.3k
    auto local_state = LocalStateType::create_unique(state, this);
513
41.3k
    RETURN_IF_ERROR(local_state->init(state, info));
514
41.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
41.3k
    return Status::OK();
516
41.3k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
288
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
288
    auto local_state = LocalStateType::create_unique(state, this);
513
288
    RETURN_IF_ERROR(local_state->init(state, info));
514
288
    state->emplace_local_state(operator_id(), std::move(local_state));
515
288
    return Status::OK();
516
288
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
2.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
2.38k
    auto local_state = LocalStateType::create_unique(state, this);
513
2.38k
    RETURN_IF_ERROR(local_state->init(state, info));
514
2.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
2.38k
    return Status::OK();
516
2.38k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
2.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
2.44k
    auto local_state = LocalStateType::create_unique(state, this);
513
2.44k
    RETURN_IF_ERROR(local_state->init(state, info));
514
2.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
2.44k
    return Status::OK();
516
2.44k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
466
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
466
    auto local_state = LocalStateType::create_unique(state, this);
513
466
    RETURN_IF_ERROR(local_state->init(state, info));
514
466
    state->emplace_local_state(operator_id(), std::move(local_state));
515
466
    return Status::OK();
516
466
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
2.02k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
2.02k
    auto local_state = LocalStateType::create_unique(state, this);
513
2.02k
    RETURN_IF_ERROR(local_state->init(state, info));
514
2.02k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
2.02k
    return Status::OK();
516
2.02k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
6.58k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
6.58k
    auto local_state = LocalStateType::create_unique(state, this);
513
6.58k
    RETURN_IF_ERROR(local_state->init(state, info));
514
6.58k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
6.58k
    return Status::OK();
516
6.58k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
710k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
710k
    auto local_state = LocalStateType::create_unique(state, this);
513
710k
    RETURN_IF_ERROR(local_state->init(state, info));
514
710k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
710k
    return Status::OK();
516
710k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
14
    auto local_state = LocalStateType::create_unique(state, this);
513
14
    RETURN_IF_ERROR(local_state->init(state, info));
514
14
    state->emplace_local_state(operator_id(), std::move(local_state));
515
14
    return Status::OK();
516
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
151
    auto local_state = LocalStateType::create_unique(state, this);
513
151
    RETURN_IF_ERROR(local_state->init(state, info));
514
151
    state->emplace_local_state(operator_id(), std::move(local_state));
515
151
    return Status::OK();
516
151
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
513
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
514
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
1.95k
    return Status::OK();
516
1.95k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
513
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
514
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
1.60k
    return Status::OK();
516
1.60k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
13.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
13.3k
    auto local_state = LocalStateType::create_unique(state, this);
513
13.3k
    RETURN_IF_ERROR(local_state->init(state, info));
514
13.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
13.3k
    return Status::OK();
516
13.3k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
15.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
15.9k
    auto local_state = LocalStateType::create_unique(state, this);
513
15.9k
    RETURN_IF_ERROR(local_state->init(state, info));
514
15.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
15.9k
    return Status::OK();
516
15.9k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
511
459k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
512
459k
    auto local_state = LocalStateType::create_unique(state, this);
513
459k
    RETURN_IF_ERROR(local_state->init(state, info));
514
459k
    state->emplace_local_state(operator_id(), std::move(local_state));
515
459k
    return Status::OK();
516
459k
}
517
518
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
519
                                                         RuntimeState* state)
520
2.12M
        : _parent(parent), _state(state) {}
521
522
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
523
2.64M
        : _num_rows_returned(0),
524
2.64M
          _rows_returned_counter(nullptr),
525
2.64M
          _parent(parent),
526
2.64M
          _state(state),
527
2.64M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
528
529
template <typename SharedStateArg>
530
2.64M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
2.64M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
2.64M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
2.64M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
2.64M
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
2.64M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
2.64M
    _operator_profile->add_child(_common_profile.get(), true);
539
2.64M
    _operator_profile->add_child(_custom_profile.get(), true);
540
2.64M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
2.64M
    if constexpr (!is_fake_shared) {
542
1.36M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
725k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
725k
                                    .first.get()
545
725k
                                    ->template cast<SharedStateArg>();
546
547
725k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
725k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
725k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
725k
        } else if (info.shared_state) {
551
574k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
0
                DCHECK(false);
553
0
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
574k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
574k
            _dependency = _shared_state->create_source_dependency(
558
574k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
574k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
574k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
574k
        } else {
562
65.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
6.33k
                DCHECK(false);
564
6.33k
            }
565
65.1k
        }
566
1.36M
    }
567
568
2.64M
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
2.64M
    _rows_returned_counter =
573
2.64M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
2.64M
    _blocks_returned_counter =
575
2.64M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
2.64M
    _output_block_bytes_counter =
577
2.64M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
2.64M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
2.64M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
2.64M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
2.64M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
2.64M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
2.64M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
2.64M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
2.64M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
2.64M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
2.64M
    _memory_used_counter =
588
2.64M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
2.64M
    _common_profile->add_info_string("IsColocate",
590
2.64M
                                     std::to_string(_parent->is_colocated_operator()));
591
2.64M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
2.64M
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
2.64M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
2.64M
    return Status::OK();
595
2.64M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
67.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
67.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
67.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
67.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
67.3k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
67.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
67.3k
    _operator_profile->add_child(_common_profile.get(), true);
539
67.3k
    _operator_profile->add_child(_custom_profile.get(), true);
540
67.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
67.3k
    if constexpr (!is_fake_shared) {
542
67.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
19.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
19.6k
                                    .first.get()
545
19.6k
                                    ->template cast<SharedStateArg>();
546
547
19.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
19.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
19.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
47.6k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
47.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
47.0k
            _dependency = _shared_state->create_source_dependency(
558
47.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
47.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
47.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
47.0k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
634
        }
566
67.3k
    }
567
568
67.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
67.3k
    _rows_returned_counter =
573
67.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
67.3k
    _blocks_returned_counter =
575
67.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
67.3k
    _output_block_bytes_counter =
577
67.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
67.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
67.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
67.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
67.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
67.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
67.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
67.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
67.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
67.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
67.3k
    _memory_used_counter =
588
67.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
67.3k
    _common_profile->add_info_string("IsColocate",
590
67.3k
                                     std::to_string(_parent->is_colocated_operator()));
591
67.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
67.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
67.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
67.3k
    return Status::OK();
595
67.3k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
1
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
1
    _operator_profile->add_child(_common_profile.get(), true);
539
1
    _operator_profile->add_child(_custom_profile.get(), true);
540
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
1
    if constexpr (!is_fake_shared) {
542
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
1
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
1
            _dependency = _shared_state->create_source_dependency(
558
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
1
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
1
    }
567
568
1
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
1
    _rows_returned_counter =
573
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
1
    _blocks_returned_counter =
575
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
1
    _output_block_bytes_counter =
577
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
1
    _memory_used_counter =
588
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
1
    _common_profile->add_info_string("IsColocate",
590
1
                                     std::to_string(_parent->is_colocated_operator()));
591
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
1
    return Status::OK();
595
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
259k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
259k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
259k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
259k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
259k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
259k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
259k
    _operator_profile->add_child(_common_profile.get(), true);
539
259k
    _operator_profile->add_child(_custom_profile.get(), true);
540
259k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
259k
    if constexpr (!is_fake_shared) {
542
259k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
259k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
254k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
254k
            _dependency = _shared_state->create_source_dependency(
558
254k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
254k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
254k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
254k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
4.16k
        }
566
259k
    }
567
568
259k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
259k
    _rows_returned_counter =
573
259k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
259k
    _blocks_returned_counter =
575
259k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
259k
    _output_block_bytes_counter =
577
259k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
259k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
259k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
259k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
259k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
259k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
259k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
259k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
259k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
259k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
259k
    _memory_used_counter =
588
259k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
259k
    _common_profile->add_info_string("IsColocate",
590
259k
                                     std::to_string(_parent->is_colocated_operator()));
591
259k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
259k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
259k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
259k
    return Status::OK();
595
259k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
24
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
24
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
24
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
24
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
24
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
24
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
24
    _operator_profile->add_child(_common_profile.get(), true);
539
24
    _operator_profile->add_child(_custom_profile.get(), true);
540
24
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
24
    if constexpr (!is_fake_shared) {
542
24
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
24
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
24
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
24
            _dependency = _shared_state->create_source_dependency(
558
24
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
24
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
24
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
24
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
24
    }
567
568
24
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
24
    _rows_returned_counter =
573
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
24
    _blocks_returned_counter =
575
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
24
    _output_block_bytes_counter =
577
24
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
24
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
24
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
24
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
24
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
24
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
24
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
24
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
24
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
24
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
24
    _memory_used_counter =
588
24
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
24
    _common_profile->add_info_string("IsColocate",
590
24
                                     std::to_string(_parent->is_colocated_operator()));
591
24
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
24
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
24
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
24
    return Status::OK();
595
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
30.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
30.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
30.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
30.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
30.3k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
30.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
30.3k
    _operator_profile->add_child(_common_profile.get(), true);
539
30.3k
    _operator_profile->add_child(_custom_profile.get(), true);
540
30.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
30.3k
    if constexpr (!is_fake_shared) {
542
30.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
30.3k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
30.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
30.2k
            _dependency = _shared_state->create_source_dependency(
558
30.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
30.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
30.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
30.2k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
91
        }
566
30.3k
    }
567
568
30.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
30.3k
    _rows_returned_counter =
573
30.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
30.3k
    _blocks_returned_counter =
575
30.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
30.3k
    _output_block_bytes_counter =
577
30.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
30.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
30.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
30.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
30.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
30.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
30.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
30.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
30.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
30.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
30.3k
    _memory_used_counter =
588
30.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
30.3k
    _common_profile->add_info_string("IsColocate",
590
30.3k
                                     std::to_string(_parent->is_colocated_operator()));
591
30.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
30.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
30.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
30.3k
    return Status::OK();
595
30.3k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
6.37k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
6.37k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
6.37k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
6.37k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
6.37k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
6.37k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
6.37k
    _operator_profile->add_child(_common_profile.get(), true);
539
6.37k
    _operator_profile->add_child(_custom_profile.get(), true);
540
6.37k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
6.37k
    if constexpr (!is_fake_shared) {
542
6.37k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
6.37k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
6.29k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
6.29k
            _dependency = _shared_state->create_source_dependency(
558
6.29k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
6.29k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
6.29k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
6.29k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
73
        }
566
6.37k
    }
567
568
6.37k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
6.37k
    _rows_returned_counter =
573
6.37k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
6.37k
    _blocks_returned_counter =
575
6.37k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
6.37k
    _output_block_bytes_counter =
577
6.37k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
6.37k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
6.37k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
6.37k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
6.37k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
6.37k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
6.37k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
6.37k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
6.37k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
6.37k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
6.37k
    _memory_used_counter =
588
6.37k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
6.37k
    _common_profile->add_info_string("IsColocate",
590
6.37k
                                     std::to_string(_parent->is_colocated_operator()));
591
6.37k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
6.37k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
6.37k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
6.37k
    return Status::OK();
595
6.37k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
188k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
188k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
188k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
188k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
188k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
188k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
188k
    _operator_profile->add_child(_common_profile.get(), true);
539
188k
    _operator_profile->add_child(_custom_profile.get(), true);
540
188k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
188k
    if constexpr (!is_fake_shared) {
542
188k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
188k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
187k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
187k
            _dependency = _shared_state->create_source_dependency(
558
187k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
187k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
187k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
187k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
1.37k
        }
566
188k
    }
567
568
188k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
188k
    _rows_returned_counter =
573
188k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
188k
    _blocks_returned_counter =
575
188k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
188k
    _output_block_bytes_counter =
577
188k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
188k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
188k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
188k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
188k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
188k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
188k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
188k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
188k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
188k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
188k
    _memory_used_counter =
588
188k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
188k
    _common_profile->add_info_string("IsColocate",
590
188k
                                     std::to_string(_parent->is_colocated_operator()));
591
188k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
188k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
188k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
188k
    return Status::OK();
595
188k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
402
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
402
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
402
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
402
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
402
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
402
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
402
    _operator_profile->add_child(_common_profile.get(), true);
539
402
    _operator_profile->add_child(_custom_profile.get(), true);
540
402
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
402
    if constexpr (!is_fake_shared) {
542
402
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
393
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
393
                                    .first.get()
545
393
                                    ->template cast<SharedStateArg>();
546
547
393
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
393
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
393
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
393
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
0
            _dependency = _shared_state->create_source_dependency(
558
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
9
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
9
        }
566
402
    }
567
568
402
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
402
    _rows_returned_counter =
573
402
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
402
    _blocks_returned_counter =
575
402
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
402
    _output_block_bytes_counter =
577
402
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
402
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
402
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
402
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
402
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
402
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
402
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
402
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
402
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
402
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
402
    _memory_used_counter =
588
402
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
402
    _common_profile->add_info_string("IsColocate",
590
402
                                     std::to_string(_parent->is_colocated_operator()));
591
402
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
402
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
402
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
402
    return Status::OK();
595
402
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
205
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
205
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
205
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
205
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
205
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
205
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
205
    _operator_profile->add_child(_common_profile.get(), true);
539
205
    _operator_profile->add_child(_custom_profile.get(), true);
540
205
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
205
    if constexpr (!is_fake_shared) {
542
205
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
205
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
205
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
205
            _dependency = _shared_state->create_source_dependency(
558
205
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
205
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
205
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
205
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
205
    }
567
568
205
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
205
    _rows_returned_counter =
573
205
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
205
    _blocks_returned_counter =
575
205
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
205
    _output_block_bytes_counter =
577
205
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
205
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
205
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
205
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
205
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
205
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
205
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
205
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
205
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
205
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
205
    _memory_used_counter =
588
205
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
205
    _common_profile->add_info_string("IsColocate",
590
205
                                     std::to_string(_parent->is_colocated_operator()));
591
205
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
205
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
205
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
205
    return Status::OK();
595
205
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
1.28M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
1.28M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
1.28M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
1.28M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
1.28M
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
1.28M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
1.28M
    _operator_profile->add_child(_common_profile.get(), true);
539
1.28M
    _operator_profile->add_child(_custom_profile.get(), true);
540
1.28M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
    if constexpr (!is_fake_shared) {
542
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
                                    .first.get()
545
                                    ->template cast<SharedStateArg>();
546
547
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
            _dependency = _shared_state->create_source_dependency(
558
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
        }
566
    }
567
568
1.28M
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
1.28M
    _rows_returned_counter =
573
1.28M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
1.28M
    _blocks_returned_counter =
575
1.28M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
1.28M
    _output_block_bytes_counter =
577
1.28M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
1.28M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
1.28M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
1.28M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
1.28M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
1.28M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
1.28M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
1.28M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
1.28M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
1.28M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
1.28M
    _memory_used_counter =
588
1.28M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
1.28M
    _common_profile->add_info_string("IsColocate",
590
1.28M
                                     std::to_string(_parent->is_colocated_operator()));
591
1.28M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
1.28M
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
1.28M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
1.28M
    return Status::OK();
595
1.28M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
54.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
54.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
54.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
54.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
54.2k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
54.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
54.2k
    _operator_profile->add_child(_common_profile.get(), true);
539
54.2k
    _operator_profile->add_child(_custom_profile.get(), true);
540
54.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
54.2k
    if constexpr (!is_fake_shared) {
542
54.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
54.2k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
2.49k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
2.49k
            _dependency = _shared_state->create_source_dependency(
558
2.49k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
2.49k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
2.49k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
51.7k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
51.7k
        }
566
54.2k
    }
567
568
54.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
54.2k
    _rows_returned_counter =
573
54.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
54.2k
    _blocks_returned_counter =
575
54.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
54.2k
    _output_block_bytes_counter =
577
54.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
54.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
54.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
54.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
54.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
54.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
54.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
54.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
54.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
54.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
54.2k
    _memory_used_counter =
588
54.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
54.2k
    _common_profile->add_info_string("IsColocate",
590
54.2k
                                     std::to_string(_parent->is_colocated_operator()));
591
54.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
54.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
54.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
54.2k
    return Status::OK();
595
54.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
17
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
17
    _operator_profile->add_child(_common_profile.get(), true);
539
17
    _operator_profile->add_child(_custom_profile.get(), true);
540
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
17
    if constexpr (!is_fake_shared) {
542
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
17
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
17
            _dependency = _shared_state->create_source_dependency(
558
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
17
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
17
    }
567
568
17
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
17
    _rows_returned_counter =
573
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
17
    _blocks_returned_counter =
575
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
17
    _output_block_bytes_counter =
577
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
17
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
17
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
17
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
17
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
17
    _memory_used_counter =
588
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
17
    _common_profile->add_info_string("IsColocate",
590
17
                                     std::to_string(_parent->is_colocated_operator()));
591
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
17
    return Status::OK();
595
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
41.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
41.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
41.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
41.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
41.3k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
41.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
41.3k
    _operator_profile->add_child(_common_profile.get(), true);
539
41.3k
    _operator_profile->add_child(_custom_profile.get(), true);
540
41.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
41.3k
    if constexpr (!is_fake_shared) {
542
41.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
41.3k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
41.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
41.2k
            _dependency = _shared_state->create_source_dependency(
558
41.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
41.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
41.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
41.2k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
102
        }
566
41.3k
    }
567
568
41.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
41.3k
    _rows_returned_counter =
573
41.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
41.3k
    _blocks_returned_counter =
575
41.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
41.3k
    _output_block_bytes_counter =
577
41.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
41.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
41.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
41.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
41.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
41.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
41.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
41.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
41.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
41.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
41.3k
    _memory_used_counter =
588
41.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
41.3k
    _common_profile->add_info_string("IsColocate",
590
41.3k
                                     std::to_string(_parent->is_colocated_operator()));
591
41.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
41.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
41.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
41.3k
    return Status::OK();
595
41.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
394
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
394
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
394
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
394
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
394
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
394
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
394
    _operator_profile->add_child(_common_profile.get(), true);
539
394
    _operator_profile->add_child(_custom_profile.get(), true);
540
394
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
394
    if constexpr (!is_fake_shared) {
542
394
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
394
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
394
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
394
            _dependency = _shared_state->create_source_dependency(
558
394
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
394
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
394
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
394
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
394
    }
567
568
394
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
394
    _rows_returned_counter =
573
394
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
394
    _blocks_returned_counter =
575
394
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
394
    _output_block_bytes_counter =
577
394
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
394
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
394
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
394
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
394
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
394
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
394
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
394
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
394
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
394
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
394
    _memory_used_counter =
588
394
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
394
    _common_profile->add_info_string("IsColocate",
590
394
                                     std::to_string(_parent->is_colocated_operator()));
591
394
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
394
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
394
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
394
    return Status::OK();
595
394
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
4.99k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
4.99k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
4.99k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
4.99k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
4.99k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
4.99k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
4.99k
    _operator_profile->add_child(_common_profile.get(), true);
539
4.99k
    _operator_profile->add_child(_custom_profile.get(), true);
540
4.99k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
4.99k
    if constexpr (!is_fake_shared) {
542
4.99k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
4.99k
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
4.42k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
4.42k
            _dependency = _shared_state->create_source_dependency(
558
4.42k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
4.42k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
4.42k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
4.42k
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
573
        }
566
4.99k
    }
567
568
4.99k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
4.99k
    _rows_returned_counter =
573
4.99k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
4.99k
    _blocks_returned_counter =
575
4.99k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
4.99k
    _output_block_bytes_counter =
577
4.99k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
4.99k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
4.99k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
4.99k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
4.99k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
4.99k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
4.99k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
4.99k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
4.99k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
4.99k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
4.99k
    _memory_used_counter =
588
4.99k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
4.99k
    _common_profile->add_info_string("IsColocate",
590
4.99k
                                     std::to_string(_parent->is_colocated_operator()));
591
4.99k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
4.99k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
4.99k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
4.99k
    return Status::OK();
595
4.99k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
712k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
712k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
712k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
712k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
712k
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
712k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
712k
    _operator_profile->add_child(_common_profile.get(), true);
539
712k
    _operator_profile->add_child(_custom_profile.get(), true);
540
712k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
712k
    if constexpr (!is_fake_shared) {
542
712k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
705k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
705k
                                    .first.get()
545
705k
                                    ->template cast<SharedStateArg>();
546
547
705k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
705k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
705k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
705k
        } else if (info.shared_state) {
551
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
0
                DCHECK(false);
553
0
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
0
            _dependency = _shared_state->create_source_dependency(
558
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
6.33k
        } else {
562
6.33k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
6.33k
                DCHECK(false);
564
6.33k
            }
565
6.33k
        }
566
712k
    }
567
568
712k
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
712k
    _rows_returned_counter =
573
712k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
712k
    _blocks_returned_counter =
575
712k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
712k
    _output_block_bytes_counter =
577
712k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
712k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
712k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
712k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
712k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
712k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
712k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
712k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
712k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
712k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
712k
    _memory_used_counter =
588
712k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
712k
    _common_profile->add_info_string("IsColocate",
590
712k
                                     std::to_string(_parent->is_colocated_operator()));
591
712k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
712k
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
712k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
712k
    return Status::OK();
595
712k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
151
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
531
151
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
532
151
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
533
151
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
534
151
    _operator_profile->set_metadata(_parent->node_id());
535
    // indent is false so that source operator will have same
536
    // indentation_level with its parent operator.
537
151
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
538
151
    _operator_profile->add_child(_common_profile.get(), true);
539
151
    _operator_profile->add_child(_custom_profile.get(), true);
540
151
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
541
151
    if constexpr (!is_fake_shared) {
542
151
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
543
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
544
0
                                    .first.get()
545
0
                                    ->template cast<SharedStateArg>();
546
547
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
548
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
549
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
550
151
        } else if (info.shared_state) {
551
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
552
                DCHECK(false);
553
            }
554
            // For UnionSourceOperator without children, there is no shared state.
555
151
            _shared_state = info.shared_state->template cast<SharedStateArg>();
556
557
151
            _dependency = _shared_state->create_source_dependency(
558
151
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
559
151
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
560
151
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
561
151
        } else {
562
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
563
                DCHECK(false);
564
            }
565
0
        }
566
151
    }
567
568
151
    if (must_set_shared_state() && _shared_state == nullptr) {
569
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
570
0
    }
571
572
151
    _rows_returned_counter =
573
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
574
151
    _blocks_returned_counter =
575
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
576
151
    _output_block_bytes_counter =
577
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
578
151
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
579
151
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
580
151
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
581
151
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
582
151
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
583
151
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
584
151
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
585
151
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
586
151
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
587
151
    _memory_used_counter =
588
151
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
589
151
    _common_profile->add_info_string("IsColocate",
590
151
                                     std::to_string(_parent->is_colocated_operator()));
591
151
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
592
151
    _common_profile->add_info_string("FollowedByShuffledOperator",
593
151
                                     std::to_string(_parent->followed_by_shuffled_operator()));
594
151
    return Status::OK();
595
151
}
596
597
template <typename SharedStateArg>
598
2.66M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
2.66M
    _conjuncts.resize(_parent->_conjuncts.size());
600
2.66M
    _projections.resize(_parent->_projections.size());
601
3.15M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
495k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
495k
    }
604
5.48M
    for (size_t i = 0; i < _projections.size(); i++) {
605
2.82M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
2.82M
    }
607
2.66M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
2.68M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
20.8k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
132k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
111k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
111k
                    state, _intermediate_projections[i][j]));
613
111k
        }
614
20.8k
    }
615
2.66M
    return Status::OK();
616
2.66M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
67.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
67.4k
    _conjuncts.resize(_parent->_conjuncts.size());
600
67.4k
    _projections.resize(_parent->_projections.size());
601
68.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
778
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
778
    }
604
328k
    for (size_t i = 0; i < _projections.size(); i++) {
605
260k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
260k
    }
607
67.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
68.6k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
1.21k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
13.3k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
12.1k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
12.1k
                    state, _intermediate_projections[i][j]));
613
12.1k
        }
614
1.21k
    }
615
67.4k
    return Status::OK();
616
67.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
3
    _conjuncts.resize(_parent->_conjuncts.size());
600
3
    _projections.resize(_parent->_projections.size());
601
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
3
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
3
    return Status::OK();
616
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
259k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
259k
    _conjuncts.resize(_parent->_conjuncts.size());
600
259k
    _projections.resize(_parent->_projections.size());
601
259k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
260k
    for (size_t i = 0; i < _projections.size(); i++) {
605
355
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
355
    }
607
259k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
259k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
259k
    return Status::OK();
616
259k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
24
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
24
    _conjuncts.resize(_parent->_conjuncts.size());
600
24
    _projections.resize(_parent->_projections.size());
601
24
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
24
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
24
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
24
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
24
    return Status::OK();
616
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
30.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
30.4k
    _conjuncts.resize(_parent->_conjuncts.size());
600
30.4k
    _projections.resize(_parent->_projections.size());
601
30.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
74
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
74
    }
604
256k
    for (size_t i = 0; i < _projections.size(); i++) {
605
225k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
225k
    }
607
30.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
30.6k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
155
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
972
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
817
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
817
                    state, _intermediate_projections[i][j]));
613
817
        }
614
155
    }
615
30.4k
    return Status::OK();
616
30.4k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
6.38k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
6.38k
    _conjuncts.resize(_parent->_conjuncts.size());
600
6.38k
    _projections.resize(_parent->_projections.size());
601
6.98k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
608
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
608
    }
604
17.4k
    for (size_t i = 0; i < _projections.size(); i++) {
605
11.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
11.0k
    }
607
6.38k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
6.47k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
95
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
726
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
631
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
631
                    state, _intermediate_projections[i][j]));
613
631
        }
614
95
    }
615
6.38k
    return Status::OK();
616
6.38k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
188k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
188k
    _conjuncts.resize(_parent->_conjuncts.size());
600
188k
    _projections.resize(_parent->_projections.size());
601
192k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
3.98k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
3.98k
    }
604
462k
    for (size_t i = 0; i < _projections.size(); i++) {
605
274k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
274k
    }
607
188k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
189k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
264
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
2.00k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
1.73k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
1.73k
                    state, _intermediate_projections[i][j]));
613
1.73k
        }
614
264
    }
615
188k
    return Status::OK();
616
188k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
410
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
410
    _conjuncts.resize(_parent->_conjuncts.size());
600
410
    _projections.resize(_parent->_projections.size());
601
420
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
10
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
10
    }
604
1.65k
    for (size_t i = 0; i < _projections.size(); i++) {
605
1.24k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
1.24k
    }
607
410
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
410
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
410
    return Status::OK();
616
410
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
209
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
209
    _conjuncts.resize(_parent->_conjuncts.size());
600
209
    _projections.resize(_parent->_projections.size());
601
209
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
453
    for (size_t i = 0; i < _projections.size(); i++) {
605
244
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
244
    }
607
209
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
209
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
209
    return Status::OK();
616
209
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
1.29M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
1.29M
    _conjuncts.resize(_parent->_conjuncts.size());
600
1.29M
    _projections.resize(_parent->_projections.size());
601
1.76M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
475k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
475k
    }
604
3.24M
    for (size_t i = 0; i < _projections.size(); i++) {
605
1.95M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
1.95M
    }
607
1.29M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
1.31M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
19.1k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
115k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
96.1k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
96.1k
                    state, _intermediate_projections[i][j]));
613
96.1k
        }
614
19.1k
    }
615
1.29M
    return Status::OK();
616
1.29M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
54.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
54.5k
    _conjuncts.resize(_parent->_conjuncts.size());
600
54.5k
    _projections.resize(_parent->_projections.size());
601
54.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
147k
    for (size_t i = 0; i < _projections.size(); i++) {
605
93.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
93.4k
    }
607
54.5k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
54.5k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
54.5k
    return Status::OK();
616
54.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
17
    _conjuncts.resize(_parent->_conjuncts.size());
600
17
    _projections.resize(_parent->_projections.size());
601
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
17
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
17
    return Status::OK();
616
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
41.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
41.3k
    _conjuncts.resize(_parent->_conjuncts.size());
600
41.3k
    _projections.resize(_parent->_projections.size());
601
56.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
15.0k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
15.0k
    }
604
41.3k
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
41.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
41.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
41.3k
    return Status::OK();
616
41.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
394
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
394
    _conjuncts.resize(_parent->_conjuncts.size());
600
394
    _projections.resize(_parent->_projections.size());
601
394
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
394
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
394
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
394
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
394
    return Status::OK();
616
394
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
5.08k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
5.08k
    _conjuncts.resize(_parent->_conjuncts.size());
600
5.08k
    _projections.resize(_parent->_projections.size());
601
5.08k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
5.08k
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
5.08k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
5.08k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
5.08k
    return Status::OK();
616
5.08k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
714k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
714k
    _conjuncts.resize(_parent->_conjuncts.size());
600
714k
    _projections.resize(_parent->_projections.size());
601
714k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
0
    }
604
714k
    for (size_t i = 0; i < _projections.size(); i++) {
605
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
0
    }
607
714k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
714k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
0
                    state, _intermediate_projections[i][j]));
613
0
        }
614
0
    }
615
714k
    return Status::OK();
616
714k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
598
151
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
599
151
    _conjuncts.resize(_parent->_conjuncts.size());
600
151
    _projections.resize(_parent->_projections.size());
601
158
    for (size_t i = 0; i < _conjuncts.size(); i++) {
602
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
603
7
    }
604
447
    for (size_t i = 0; i < _projections.size(); i++) {
605
296
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
606
296
    }
607
151
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
608
152
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
609
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
610
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
611
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
612
2
                    state, _intermediate_projections[i][j]));
613
2
        }
614
1
    }
615
151
    return Status::OK();
616
151
}
617
618
template <typename SharedStateArg>
619
13.4k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
13.4k
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
13.4k
    _terminated = true;
624
13.4k
    return Status::OK();
625
13.4k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
1.33k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
1.33k
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
1.33k
    _terminated = true;
624
1.33k
    return Status::OK();
625
1.33k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
28
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
28
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
28
    _terminated = true;
624
28
    return Status::OK();
625
28
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
319
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
319
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
319
    _terminated = true;
624
319
    return Status::OK();
625
319
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
84
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
84
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
84
    _terminated = true;
624
84
    return Status::OK();
625
84
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
10.5k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
10.5k
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
10.5k
    _terminated = true;
624
10.5k
    return Status::OK();
625
10.5k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
9
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
9
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
9
    _terminated = true;
624
9
    return Status::OK();
625
9
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
5
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
5
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
5
    _terminated = true;
624
5
    return Status::OK();
625
5
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
237
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
237
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
237
    _terminated = true;
624
237
    return Status::OK();
625
237
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
873
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
873
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
873
    _terminated = true;
624
873
    return Status::OK();
625
873
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
619
16
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
620
16
    if (_terminated) {
621
0
        return Status::OK();
622
0
    }
623
16
    _terminated = true;
624
16
    return Status::OK();
625
16
}
626
627
template <typename SharedStateArg>
628
2.96M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
2.96M
    if (_closed) {
630
300k
        return Status::OK();
631
300k
    }
632
2.66M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
1.36M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
1.36M
    }
635
2.66M
    _closed = true;
636
2.66M
    return Status::OK();
637
2.96M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
67.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
67.3k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
67.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
67.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
67.3k
    }
635
67.3k
    _closed = true;
636
67.3k
    return Status::OK();
637
67.3k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
4
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
4
    }
635
4
    _closed = true;
636
4
    return Status::OK();
637
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
516k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
516k
    if (_closed) {
630
258k
        return Status::OK();
631
258k
    }
632
258k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
258k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
258k
    }
635
258k
    _closed = true;
636
258k
    return Status::OK();
637
516k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
24
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
24
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
24
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
24
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
24
    }
635
24
    _closed = true;
636
24
    return Status::OK();
637
24
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
30.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
30.5k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
30.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
30.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
30.5k
    }
635
30.5k
    _closed = true;
636
30.5k
    return Status::OK();
637
30.5k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
12.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
12.8k
    if (_closed) {
630
6.45k
        return Status::OK();
631
6.45k
    }
632
6.36k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
6.36k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
6.36k
    }
635
6.36k
    _closed = true;
636
6.36k
    return Status::OK();
637
12.8k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
188k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
188k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
188k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
188k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
188k
    }
635
188k
    _closed = true;
636
188k
    return Status::OK();
637
188k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
410
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
410
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
410
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
410
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
410
    }
635
410
    _closed = true;
636
410
    return Status::OK();
637
410
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
204
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
204
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
204
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
204
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
204
    }
635
204
    _closed = true;
636
204
    return Status::OK();
637
204
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
1.32M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
1.32M
    if (_closed) {
630
28.9k
        return Status::OK();
631
28.9k
    }
632
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
    }
635
1.29M
    _closed = true;
636
1.29M
    return Status::OK();
637
1.32M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
54.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
54.5k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
54.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
54.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
54.5k
    }
635
54.5k
    _closed = true;
636
54.5k
    return Status::OK();
637
54.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
28
    if (_closed) {
630
14
        return Status::OK();
631
14
    }
632
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
14
    }
635
14
    _closed = true;
636
14
    return Status::OK();
637
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
41.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
41.0k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
41.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
41.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
41.0k
    }
635
41.0k
    _closed = true;
636
41.0k
    return Status::OK();
637
41.0k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
580
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
580
    if (_closed) {
630
290
        return Status::OK();
631
290
    }
632
290
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
290
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
290
    }
635
290
    _closed = true;
636
290
    return Status::OK();
637
580
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
10.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
10.6k
    if (_closed) {
630
5.57k
        return Status::OK();
631
5.57k
    }
632
5.07k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
5.07k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
5.07k
    }
635
5.07k
    _closed = true;
636
5.07k
    return Status::OK();
637
10.6k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
716k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
716k
    if (_closed) {
630
0
        return Status::OK();
631
0
    }
632
716k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
716k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
716k
    }
635
716k
    _closed = true;
636
716k
    return Status::OK();
637
716k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
628
353
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
629
353
    if (_closed) {
630
210
        return Status::OK();
631
210
    }
632
143
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
633
143
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
634
143
    }
635
143
    _closed = true;
636
143
    return Status::OK();
637
353
}
638
639
template <typename SharedState>
640
2.12M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
2.12M
    _operator_profile =
643
2.12M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
2.12M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
2.12M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
2.12M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
2.12M
    _operator_profile->add_child(_common_profile, true);
652
2.12M
    _operator_profile->add_child(_custom_profile, true);
653
654
2.12M
    _operator_profile->set_metadata(_parent->node_id());
655
2.12M
    _wait_for_finish_dependency_timer =
656
2.12M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
2.12M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
2.12M
    if constexpr (!is_fake_shared) {
659
1.38M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
1.38M
            info.shared_state_map.end()) {
661
275k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
255k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
255k
            }
664
275k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
275k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
275k
                                                  ? 0
667
275k
                                                  : info.task_idx]
668
275k
                                  .get();
669
275k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
1.10M
        } else {
671
1.10M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
328
                DCHECK(false);
673
328
            }
674
1.10M
            _shared_state = info.shared_state->template cast<SharedState>();
675
1.10M
            _dependency = _shared_state->create_sink_dependency(
676
1.10M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
1.10M
        }
678
1.38M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
1.38M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
1.38M
    }
681
682
2.12M
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
2.12M
    _rows_input_counter =
687
2.12M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
2.12M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
2.12M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
2.12M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
2.12M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
2.12M
    _memory_used_counter =
693
2.12M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
2.12M
    _common_profile->add_info_string("IsColocate",
695
2.12M
                                     std::to_string(_parent->is_colocated_operator()));
696
2.12M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
2.12M
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
2.12M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
2.12M
    return Status::OK();
700
2.12M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
115k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
115k
    _operator_profile =
643
115k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
115k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
115k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
115k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
115k
    _operator_profile->add_child(_common_profile, true);
652
115k
    _operator_profile->add_child(_custom_profile, true);
653
654
115k
    _operator_profile->set_metadata(_parent->node_id());
655
115k
    _wait_for_finish_dependency_timer =
656
115k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
115k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
115k
    if constexpr (!is_fake_shared) {
659
115k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
115k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
19.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
19.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
19.7k
                                                  ? 0
667
19.7k
                                                  : info.task_idx]
668
19.7k
                                  .get();
669
19.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
95.5k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
95.5k
            _shared_state = info.shared_state->template cast<SharedState>();
675
95.5k
            _dependency = _shared_state->create_sink_dependency(
676
95.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
95.5k
        }
678
115k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
115k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
115k
    }
681
682
115k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
115k
    _rows_input_counter =
687
115k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
115k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
115k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
115k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
115k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
115k
    _memory_used_counter =
693
115k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
115k
    _common_profile->add_info_string("IsColocate",
695
115k
                                     std::to_string(_parent->is_colocated_operator()));
696
115k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
115k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
115k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
115k
    return Status::OK();
700
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
2
    _operator_profile =
643
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
2
    _operator_profile->add_child(_common_profile, true);
652
2
    _operator_profile->add_child(_custom_profile, true);
653
654
2
    _operator_profile->set_metadata(_parent->node_id());
655
2
    _wait_for_finish_dependency_timer =
656
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
2
    if constexpr (!is_fake_shared) {
659
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
2
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
2
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
2
            _shared_state = info.shared_state->template cast<SharedState>();
675
2
            _dependency = _shared_state->create_sink_dependency(
676
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
2
        }
678
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
2
    }
681
682
2
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
2
    _rows_input_counter =
687
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
2
    _memory_used_counter =
693
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
2
    _common_profile->add_info_string("IsColocate",
695
2
                                     std::to_string(_parent->is_colocated_operator()));
696
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
2
    return Status::OK();
700
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
258k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
258k
    _operator_profile =
643
258k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
258k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
258k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
258k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
258k
    _operator_profile->add_child(_common_profile, true);
652
258k
    _operator_profile->add_child(_custom_profile, true);
653
654
258k
    _operator_profile->set_metadata(_parent->node_id());
655
258k
    _wait_for_finish_dependency_timer =
656
258k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
258k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
258k
    if constexpr (!is_fake_shared) {
659
258k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
258k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
258k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
258k
            _shared_state = info.shared_state->template cast<SharedState>();
675
258k
            _dependency = _shared_state->create_sink_dependency(
676
258k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
258k
        }
678
258k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
258k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
258k
    }
681
682
258k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
258k
    _rows_input_counter =
687
258k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
258k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
258k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
258k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
258k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
258k
    _memory_used_counter =
693
258k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
258k
    _common_profile->add_info_string("IsColocate",
695
258k
                                     std::to_string(_parent->is_colocated_operator()));
696
258k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
258k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
258k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
258k
    return Status::OK();
700
258k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
30
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
30
    _operator_profile =
643
30
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
30
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
30
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
30
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
30
    _operator_profile->add_child(_common_profile, true);
652
30
    _operator_profile->add_child(_custom_profile, true);
653
654
30
    _operator_profile->set_metadata(_parent->node_id());
655
30
    _wait_for_finish_dependency_timer =
656
30
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
30
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
30
    if constexpr (!is_fake_shared) {
659
30
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
30
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
30
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
30
            _shared_state = info.shared_state->template cast<SharedState>();
675
30
            _dependency = _shared_state->create_sink_dependency(
676
30
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
30
        }
678
30
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
30
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
30
    }
681
682
30
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
30
    _rows_input_counter =
687
30
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
30
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
30
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
30
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
30
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
30
    _memory_used_counter =
693
30
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
30
    _common_profile->add_info_string("IsColocate",
695
30
                                     std::to_string(_parent->is_colocated_operator()));
696
30
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
30
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
30
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
30
    return Status::OK();
700
30
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
30.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
30.3k
    _operator_profile =
643
30.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
30.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
30.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
30.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
30.3k
    _operator_profile->add_child(_common_profile, true);
652
30.3k
    _operator_profile->add_child(_custom_profile, true);
653
654
30.3k
    _operator_profile->set_metadata(_parent->node_id());
655
30.3k
    _wait_for_finish_dependency_timer =
656
30.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
30.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
30.3k
    if constexpr (!is_fake_shared) {
659
30.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
30.3k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
30.3k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
30.3k
            _shared_state = info.shared_state->template cast<SharedState>();
675
30.3k
            _dependency = _shared_state->create_sink_dependency(
676
30.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
30.3k
        }
678
30.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
30.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
30.3k
    }
681
682
30.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
30.3k
    _rows_input_counter =
687
30.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
30.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
30.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
30.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
30.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
30.3k
    _memory_used_counter =
693
30.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
30.3k
    _common_profile->add_info_string("IsColocate",
695
30.3k
                                     std::to_string(_parent->is_colocated_operator()));
696
30.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
30.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
30.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
30.3k
    return Status::OK();
700
30.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
6.37k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
6.37k
    _operator_profile =
643
6.37k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
6.37k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
6.37k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
6.37k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
6.37k
    _operator_profile->add_child(_common_profile, true);
652
6.37k
    _operator_profile->add_child(_custom_profile, true);
653
654
6.37k
    _operator_profile->set_metadata(_parent->node_id());
655
6.37k
    _wait_for_finish_dependency_timer =
656
6.37k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
6.37k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
6.37k
    if constexpr (!is_fake_shared) {
659
6.37k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
6.37k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
6.37k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
6.37k
            _shared_state = info.shared_state->template cast<SharedState>();
675
6.37k
            _dependency = _shared_state->create_sink_dependency(
676
6.37k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
6.37k
        }
678
6.37k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
6.37k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
6.37k
    }
681
682
6.37k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
6.37k
    _rows_input_counter =
687
6.37k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
6.37k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
6.37k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
6.37k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
6.37k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
6.37k
    _memory_used_counter =
693
6.37k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
6.37k
    _common_profile->add_info_string("IsColocate",
695
6.37k
                                     std::to_string(_parent->is_colocated_operator()));
696
6.37k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
6.37k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
6.37k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
6.37k
    return Status::OK();
700
6.37k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
188k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
188k
    _operator_profile =
643
188k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
188k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
188k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
188k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
188k
    _operator_profile->add_child(_common_profile, true);
652
188k
    _operator_profile->add_child(_custom_profile, true);
653
654
188k
    _operator_profile->set_metadata(_parent->node_id());
655
188k
    _wait_for_finish_dependency_timer =
656
188k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
188k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
188k
    if constexpr (!is_fake_shared) {
659
188k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
188k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
188k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
188k
            _shared_state = info.shared_state->template cast<SharedState>();
675
188k
            _dependency = _shared_state->create_sink_dependency(
676
188k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
188k
        }
678
188k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
188k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
188k
    }
681
682
188k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
188k
    _rows_input_counter =
687
188k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
188k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
188k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
188k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
188k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
188k
    _memory_used_counter =
693
188k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
188k
    _common_profile->add_info_string("IsColocate",
695
188k
                                     std::to_string(_parent->is_colocated_operator()));
696
188k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
188k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
188k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
188k
    return Status::OK();
700
188k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
349
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
349
    _operator_profile =
643
349
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
349
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
349
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
349
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
349
    _operator_profile->add_child(_common_profile, true);
652
349
    _operator_profile->add_child(_custom_profile, true);
653
654
349
    _operator_profile->set_metadata(_parent->node_id());
655
349
    _wait_for_finish_dependency_timer =
656
349
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
349
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
349
    if constexpr (!is_fake_shared) {
659
349
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
349
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
346
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
346
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
346
                                                  ? 0
667
346
                                                  : info.task_idx]
668
346
                                  .get();
669
346
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
346
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
3
            _shared_state = info.shared_state->template cast<SharedState>();
675
3
            _dependency = _shared_state->create_sink_dependency(
676
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
3
        }
678
349
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
349
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
349
    }
681
682
349
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
349
    _rows_input_counter =
687
349
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
349
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
349
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
349
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
349
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
349
    _memory_used_counter =
693
349
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
349
    _common_profile->add_info_string("IsColocate",
695
349
                                     std::to_string(_parent->is_colocated_operator()));
696
349
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
349
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
349
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
349
    return Status::OK();
700
349
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
215
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
215
    _operator_profile =
643
215
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
215
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
215
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
215
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
215
    _operator_profile->add_child(_common_profile, true);
652
215
    _operator_profile->add_child(_custom_profile, true);
653
654
215
    _operator_profile->set_metadata(_parent->node_id());
655
215
    _wait_for_finish_dependency_timer =
656
215
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
215
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
215
    if constexpr (!is_fake_shared) {
659
215
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
215
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
215
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
215
            _shared_state = info.shared_state->template cast<SharedState>();
675
215
            _dependency = _shared_state->create_sink_dependency(
676
215
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
215
        }
678
215
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
215
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
215
    }
681
682
215
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
215
    _rows_input_counter =
687
215
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
215
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
215
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
215
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
215
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
215
    _memory_used_counter =
693
215
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
215
    _common_profile->add_info_string("IsColocate",
695
215
                                     std::to_string(_parent->is_colocated_operator()));
696
215
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
215
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
215
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
215
    return Status::OK();
700
215
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
743k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
743k
    _operator_profile =
643
743k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
743k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
743k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
743k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
743k
    _operator_profile->add_child(_common_profile, true);
652
743k
    _operator_profile->add_child(_custom_profile, true);
653
654
743k
    _operator_profile->set_metadata(_parent->node_id());
655
743k
    _wait_for_finish_dependency_timer =
656
743k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
743k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
    if constexpr (!is_fake_shared) {
659
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
                                                  ? 0
667
                                                  : info.task_idx]
668
                                  .get();
669
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
            _shared_state = info.shared_state->template cast<SharedState>();
675
            _dependency = _shared_state->create_sink_dependency(
676
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
        }
678
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
    }
681
682
743k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
743k
    _rows_input_counter =
687
743k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
743k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
743k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
743k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
743k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
743k
    _memory_used_counter =
693
743k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
743k
    _common_profile->add_info_string("IsColocate",
695
743k
                                     std::to_string(_parent->is_colocated_operator()));
696
743k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
743k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
743k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
743k
    return Status::OK();
700
743k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
5.26k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
5.26k
    _operator_profile =
643
5.26k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
5.26k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
5.26k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
5.26k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
5.26k
    _operator_profile->add_child(_common_profile, true);
652
5.26k
    _operator_profile->add_child(_custom_profile, true);
653
654
5.26k
    _operator_profile->set_metadata(_parent->node_id());
655
5.26k
    _wait_for_finish_dependency_timer =
656
5.26k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
5.26k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
5.26k
    if constexpr (!is_fake_shared) {
659
5.26k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
5.26k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
5.26k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
5.26k
            _shared_state = info.shared_state->template cast<SharedState>();
675
5.26k
            _dependency = _shared_state->create_sink_dependency(
676
5.26k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
5.26k
        }
678
5.26k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
5.26k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
5.26k
    }
681
682
5.26k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
5.26k
    _rows_input_counter =
687
5.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
5.26k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
5.26k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
5.26k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
5.26k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
5.26k
    _memory_used_counter =
693
5.26k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
5.26k
    _common_profile->add_info_string("IsColocate",
695
5.26k
                                     std::to_string(_parent->is_colocated_operator()));
696
5.26k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
5.26k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
5.26k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
5.26k
    return Status::OK();
700
5.26k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
394
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
394
    _operator_profile =
643
394
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
394
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
394
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
394
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
394
    _operator_profile->add_child(_common_profile, true);
652
394
    _operator_profile->add_child(_custom_profile, true);
653
654
394
    _operator_profile->set_metadata(_parent->node_id());
655
394
    _wait_for_finish_dependency_timer =
656
394
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
394
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
394
    if constexpr (!is_fake_shared) {
659
394
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
394
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
394
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
394
            _shared_state = info.shared_state->template cast<SharedState>();
675
394
            _dependency = _shared_state->create_sink_dependency(
676
394
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
394
        }
678
394
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
394
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
394
    }
681
682
394
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
394
    _rows_input_counter =
687
394
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
394
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
394
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
394
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
394
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
394
    _memory_used_counter =
693
394
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
394
    _common_profile->add_info_string("IsColocate",
695
394
                                     std::to_string(_parent->is_colocated_operator()));
696
394
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
394
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
394
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
394
    return Status::OK();
700
394
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
13.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
13.9k
    _operator_profile =
643
13.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
13.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
13.9k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
13.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
13.9k
    _operator_profile->add_child(_common_profile, true);
652
13.9k
    _operator_profile->add_child(_custom_profile, true);
653
654
13.9k
    _operator_profile->set_metadata(_parent->node_id());
655
13.9k
    _wait_for_finish_dependency_timer =
656
13.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
13.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
13.9k
    if constexpr (!is_fake_shared) {
659
13.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
13.9k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
13.9k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
13.9k
            _shared_state = info.shared_state->template cast<SharedState>();
675
13.9k
            _dependency = _shared_state->create_sink_dependency(
676
13.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
13.9k
        }
678
13.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
13.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
13.9k
    }
681
682
13.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
13.9k
    _rows_input_counter =
687
13.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
13.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
13.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
13.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
13.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
13.9k
    _memory_used_counter =
693
13.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
13.9k
    _common_profile->add_info_string("IsColocate",
695
13.9k
                                     std::to_string(_parent->is_colocated_operator()));
696
13.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
13.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
13.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
13.9k
    return Status::OK();
700
13.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
12.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
12.3k
    _operator_profile =
643
12.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
12.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
12.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
12.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
12.3k
    _operator_profile->add_child(_common_profile, true);
652
12.3k
    _operator_profile->add_child(_custom_profile, true);
653
654
12.3k
    _operator_profile->set_metadata(_parent->node_id());
655
12.3k
    _wait_for_finish_dependency_timer =
656
12.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
12.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
12.3k
    if constexpr (!is_fake_shared) {
659
12.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
12.3k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
12.3k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
12.3k
            _shared_state = info.shared_state->template cast<SharedState>();
675
12.3k
            _dependency = _shared_state->create_sink_dependency(
676
12.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
12.3k
        }
678
12.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
12.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
12.3k
    }
681
682
12.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
12.3k
    _rows_input_counter =
687
12.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
12.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
12.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
12.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
12.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
12.3k
    _memory_used_counter =
693
12.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
12.3k
    _common_profile->add_info_string("IsColocate",
695
12.3k
                                     std::to_string(_parent->is_colocated_operator()));
696
12.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
12.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
12.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
12.3k
    return Status::OK();
700
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
255k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
255k
    _operator_profile =
643
255k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
255k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
255k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
255k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
255k
    _operator_profile->add_child(_common_profile, true);
652
255k
    _operator_profile->add_child(_custom_profile, true);
653
654
255k
    _operator_profile->set_metadata(_parent->node_id());
655
255k
    _wait_for_finish_dependency_timer =
656
255k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
255k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
255k
    if constexpr (!is_fake_shared) {
659
255k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
255k
            info.shared_state_map.end()) {
661
255k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
255k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
255k
            }
664
255k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
255k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
255k
                                                  ? 0
667
255k
                                                  : info.task_idx]
668
255k
                                  .get();
669
255k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
255k
        } else {
671
328
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
328
                DCHECK(false);
673
328
            }
674
328
            _shared_state = info.shared_state->template cast<SharedState>();
675
328
            _dependency = _shared_state->create_sink_dependency(
676
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
328
        }
678
255k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
255k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
255k
    }
681
682
255k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
255k
    _rows_input_counter =
687
255k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
255k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
255k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
255k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
255k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
255k
    _memory_used_counter =
693
255k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
255k
    _common_profile->add_info_string("IsColocate",
695
255k
                                     std::to_string(_parent->is_colocated_operator()));
696
255k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
255k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
255k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
255k
    return Status::OK();
700
255k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
496k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
496k
    _operator_profile =
643
496k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
496k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
496k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
496k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
496k
    _operator_profile->add_child(_common_profile, true);
652
496k
    _operator_profile->add_child(_custom_profile, true);
653
654
496k
    _operator_profile->set_metadata(_parent->node_id());
655
496k
    _wait_for_finish_dependency_timer =
656
496k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
496k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
496k
    if constexpr (!is_fake_shared) {
659
496k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
496k
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
496k
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
496k
            _shared_state = info.shared_state->template cast<SharedState>();
675
496k
            _dependency = _shared_state->create_sink_dependency(
676
496k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
496k
        }
678
496k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
496k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
496k
    }
681
682
496k
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
496k
    _rows_input_counter =
687
496k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
496k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
496k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
496k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
496k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
496k
    _memory_used_counter =
693
496k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
496k
    _common_profile->add_info_string("IsColocate",
695
496k
                                     std::to_string(_parent->is_colocated_operator()));
696
496k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
496k
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
496k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
496k
    return Status::OK();
700
496k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
17
    _operator_profile =
643
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
17
    _operator_profile->add_child(_common_profile, true);
652
17
    _operator_profile->add_child(_custom_profile, true);
653
654
17
    _operator_profile->set_metadata(_parent->node_id());
655
17
    _wait_for_finish_dependency_timer =
656
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
17
    if constexpr (!is_fake_shared) {
659
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
17
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
17
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
17
            _shared_state = info.shared_state->template cast<SharedState>();
675
17
            _dependency = _shared_state->create_sink_dependency(
676
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
17
        }
678
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
17
    }
681
682
17
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
17
    _rows_input_counter =
687
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
17
    _memory_used_counter =
693
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
17
    _common_profile->add_info_string("IsColocate",
695
17
                                     std::to_string(_parent->is_colocated_operator()));
696
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
17
    return Status::OK();
700
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
640
302
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
641
    // create profile
642
302
    _operator_profile =
643
302
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
644
302
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
645
302
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
646
647
    // indentation is true
648
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
649
    // So we should set the indentation to true.
650
302
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
651
302
    _operator_profile->add_child(_common_profile, true);
652
302
    _operator_profile->add_child(_custom_profile, true);
653
654
302
    _operator_profile->set_metadata(_parent->node_id());
655
302
    _wait_for_finish_dependency_timer =
656
302
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
657
302
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
658
302
    if constexpr (!is_fake_shared) {
659
302
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
660
302
            info.shared_state_map.end()) {
661
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
662
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
663
            }
664
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
665
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
666
0
                                                  ? 0
667
0
                                                  : info.task_idx]
668
0
                                  .get();
669
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
670
302
        } else {
671
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
672
                DCHECK(false);
673
            }
674
302
            _shared_state = info.shared_state->template cast<SharedState>();
675
302
            _dependency = _shared_state->create_sink_dependency(
676
302
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
677
302
        }
678
302
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
679
302
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
680
302
    }
681
682
302
    if (must_set_shared_state() && _shared_state == nullptr) {
683
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
684
0
    }
685
686
302
    _rows_input_counter =
687
302
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
688
302
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
689
302
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
690
302
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
691
302
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
692
302
    _memory_used_counter =
693
302
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
694
302
    _common_profile->add_info_string("IsColocate",
695
302
                                     std::to_string(_parent->is_colocated_operator()));
696
302
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
697
302
    _common_profile->add_info_string("FollowedByShuffledOperator",
698
302
                                     std::to_string(_parent->followed_by_shuffled_operator()));
699
302
    return Status::OK();
700
302
}
701
702
template <typename SharedState>
703
2.13M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
2.13M
    if (_closed) {
705
2
        return Status::OK();
706
2
    }
707
2.13M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
1.38M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
1.38M
    }
710
2.13M
    _closed = true;
711
2.13M
    return Status::OK();
712
2.13M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
115k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
115k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
115k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
115k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
115k
    }
710
115k
    _closed = true;
711
115k
    return Status::OK();
712
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
1
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
1
    }
710
1
    _closed = true;
711
1
    return Status::OK();
712
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
258k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
258k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
258k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
258k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
258k
    }
710
258k
    _closed = true;
711
258k
    return Status::OK();
712
258k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
22
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
22
    if (_closed) {
705
2
        return Status::OK();
706
2
    }
707
20
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
20
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
20
    }
710
20
    _closed = true;
711
20
    return Status::OK();
712
22
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
30.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
30.4k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
30.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
30.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
30.4k
    }
710
30.4k
    _closed = true;
711
30.4k
    return Status::OK();
712
30.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
6.36k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
6.36k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
6.36k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
6.36k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
6.36k
    }
710
6.36k
    _closed = true;
711
6.36k
    return Status::OK();
712
6.36k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
188k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
188k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
188k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
188k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
188k
    }
710
188k
    _closed = true;
711
188k
    return Status::OK();
712
188k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
349
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
349
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
349
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
349
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
349
    }
710
349
    _closed = true;
711
349
    return Status::OK();
712
349
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
204
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
204
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
204
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
204
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
204
    }
710
204
    _closed = true;
711
204
    return Status::OK();
712
204
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
745k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
745k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
    }
710
745k
    _closed = true;
711
745k
    return Status::OK();
712
745k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
5.25k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
5.25k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
5.25k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
5.25k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
5.25k
    }
710
5.25k
    _closed = true;
711
5.25k
    return Status::OK();
712
5.25k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
291
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
291
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
291
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
291
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
291
    }
710
291
    _closed = true;
711
291
    return Status::OK();
712
291
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
13.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
13.9k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
13.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
13.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
13.9k
    }
710
13.9k
    _closed = true;
711
13.9k
    return Status::OK();
712
13.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
12.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
12.2k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
12.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
12.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
12.2k
    }
710
12.2k
    _closed = true;
711
12.2k
    return Status::OK();
712
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
256k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
256k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
256k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
256k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
256k
    }
710
256k
    _closed = true;
711
256k
    return Status::OK();
712
256k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
500k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
500k
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
500k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
500k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
500k
    }
710
500k
    _closed = true;
711
500k
    return Status::OK();
712
500k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
14
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
14
    }
710
14
    _closed = true;
711
14
    return Status::OK();
712
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
703
302
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
704
302
    if (_closed) {
705
0
        return Status::OK();
706
0
    }
707
302
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
708
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
709
302
    }
710
302
    _closed = true;
711
302
    return Status::OK();
712
302
}
713
714
template <typename LocalStateType>
715
83.1k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
716
83.1k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
717
83.1k
    return pull(state, block, eos);
718
83.1k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
715
431
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
716
431
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
717
431
    return pull(state, block, eos);
718
431
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
715
82.6k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
716
82.6k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
717
82.6k
    return pull(state, block, eos);
718
82.6k
}
719
720
template <typename LocalStateType>
721
788k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
788k
    auto& local_state = get_local_state(state);
723
788k
    if (need_more_input_data(state)) {
724
763k
        local_state._child_block->clear_column_data(
725
763k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
763k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
763k
                state, local_state._child_block.get(), &local_state._child_eos));
728
763k
        *eos = local_state._child_eos;
729
763k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
84.8k
            return Status::OK();
731
84.8k
        }
732
678k
        {
733
678k
            SCOPED_TIMER(local_state.exec_time_counter());
734
678k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
678k
        }
736
678k
    }
737
738
703k
    if (!need_more_input_data(state)) {
739
643k
        SCOPED_TIMER(local_state.exec_time_counter());
740
643k
        bool new_eos = false;
741
643k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
643k
        if (new_eos) {
743
556k
            *eos = true;
744
556k
        } else if (!need_more_input_data(state)) {
745
20.7k
            *eos = false;
746
20.7k
        }
747
643k
    }
748
703k
    return Status::OK();
749
703k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
144k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
144k
    auto& local_state = get_local_state(state);
723
144k
    if (need_more_input_data(state)) {
724
131k
        local_state._child_block->clear_column_data(
725
131k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
131k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
131k
                state, local_state._child_block.get(), &local_state._child_eos));
728
131k
        *eos = local_state._child_eos;
729
131k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
47.3k
            return Status::OK();
731
47.3k
        }
732
83.8k
        {
733
83.8k
            SCOPED_TIMER(local_state.exec_time_counter());
734
83.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
83.8k
        }
736
83.8k
    }
737
738
97.6k
    if (!need_more_input_data(state)) {
739
97.6k
        SCOPED_TIMER(local_state.exec_time_counter());
740
97.6k
        bool new_eos = false;
741
97.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
97.6k
        if (new_eos) {
743
43.0k
            *eos = true;
744
54.5k
        } else if (!need_more_input_data(state)) {
745
8.30k
            *eos = false;
746
8.30k
        }
747
97.6k
    }
748
97.6k
    return Status::OK();
749
97.6k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
3.04k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
3.04k
    auto& local_state = get_local_state(state);
723
3.04k
    if (need_more_input_data(state)) {
724
1.77k
        local_state._child_block->clear_column_data(
725
1.77k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
1.77k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
1.77k
                state, local_state._child_block.get(), &local_state._child_eos));
728
1.77k
        *eos = local_state._child_eos;
729
1.77k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
196
            return Status::OK();
731
196
        }
732
1.58k
        {
733
1.58k
            SCOPED_TIMER(local_state.exec_time_counter());
734
1.58k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
1.58k
        }
736
1.58k
    }
737
738
2.86k
    if (!need_more_input_data(state)) {
739
2.86k
        SCOPED_TIMER(local_state.exec_time_counter());
740
2.86k
        bool new_eos = false;
741
2.86k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
2.86k
        if (new_eos) {
743
1.26k
            *eos = true;
744
1.59k
        } else if (!need_more_input_data(state)) {
745
1.26k
            *eos = false;
746
1.26k
        }
747
2.86k
    }
748
2.84k
    return Status::OK();
749
2.84k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
4.72k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
4.72k
    auto& local_state = get_local_state(state);
723
4.72k
    if (need_more_input_data(state)) {
724
4.72k
        local_state._child_block->clear_column_data(
725
4.72k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
4.72k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
4.72k
                state, local_state._child_block.get(), &local_state._child_eos));
728
4.72k
        *eos = local_state._child_eos;
729
4.72k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
1.57k
            return Status::OK();
731
1.57k
        }
732
3.14k
        {
733
3.14k
            SCOPED_TIMER(local_state.exec_time_counter());
734
3.14k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
3.14k
        }
736
3.14k
    }
737
738
3.14k
    if (!need_more_input_data(state)) {
739
3.14k
        SCOPED_TIMER(local_state.exec_time_counter());
740
3.14k
        bool new_eos = false;
741
3.14k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
3.14k
        if (new_eos) {
743
1.60k
            *eos = true;
744
1.60k
        } else if (!need_more_input_data(state)) {
745
0
            *eos = false;
746
0
        }
747
3.14k
    }
748
3.14k
    return Status::OK();
749
3.14k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
46.6k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
46.6k
    auto& local_state = get_local_state(state);
723
46.6k
    if (need_more_input_data(state)) {
724
46.6k
        local_state._child_block->clear_column_data(
725
46.6k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
46.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
46.6k
                state, local_state._child_block.get(), &local_state._child_eos));
728
46.6k
        *eos = local_state._child_eos;
729
46.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
4.15k
            return Status::OK();
731
4.15k
        }
732
42.4k
        {
733
42.4k
            SCOPED_TIMER(local_state.exec_time_counter());
734
42.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
42.4k
        }
736
42.4k
    }
737
738
42.5k
    if (!need_more_input_data(state)) {
739
16.0k
        SCOPED_TIMER(local_state.exec_time_counter());
740
16.0k
        bool new_eos = false;
741
16.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
16.0k
        if (new_eos) {
743
15.7k
            *eos = true;
744
15.7k
        } else if (!need_more_input_data(state)) {
745
62
            *eos = false;
746
62
        }
747
16.0k
    }
748
42.5k
    return Status::OK();
749
42.5k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
511k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
511k
    auto& local_state = get_local_state(state);
723
513k
    if (need_more_input_data(state)) {
724
513k
        local_state._child_block->clear_column_data(
725
513k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
513k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
513k
                state, local_state._child_block.get(), &local_state._child_eos));
728
513k
        *eos = local_state._child_eos;
729
513k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
17.2k
            return Status::OK();
731
17.2k
        }
732
495k
        {
733
495k
            SCOPED_TIMER(local_state.exec_time_counter());
734
495k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
495k
        }
736
495k
    }
737
738
494k
    if (!need_more_input_data(state)) {
739
461k
        SCOPED_TIMER(local_state.exec_time_counter());
740
461k
        bool new_eos = false;
741
461k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
461k
        if (new_eos) {
743
459k
            *eos = true;
744
459k
        } else if (!need_more_input_data(state)) {
745
0
            *eos = false;
746
0
        }
747
461k
    }
748
494k
    return Status::OK();
749
494k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
70.3k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
70.3k
    auto& local_state = get_local_state(state);
723
70.3k
    if (need_more_input_data(state)) {
724
59.6k
        local_state._child_block->clear_column_data(
725
59.6k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
59.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
59.6k
                state, local_state._child_block.get(), &local_state._child_eos));
728
59.6k
        *eos = local_state._child_eos;
729
59.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
13.6k
            return Status::OK();
731
13.6k
        }
732
45.9k
        {
733
45.9k
            SCOPED_TIMER(local_state.exec_time_counter());
734
45.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
45.9k
        }
736
45.9k
    }
737
738
56.7k
    if (!need_more_input_data(state)) {
739
56.2k
        SCOPED_TIMER(local_state.exec_time_counter());
740
56.2k
        bool new_eos = false;
741
56.2k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
56.2k
        if (new_eos) {
743
30.4k
            *eos = true;
744
30.4k
        } else if (!need_more_input_data(state)) {
745
10.7k
            *eos = false;
746
10.7k
        }
747
56.2k
    }
748
56.7k
    return Status::OK();
749
56.7k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
721
6.84k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
722
6.84k
    auto& local_state = get_local_state(state);
723
6.84k
    if (need_more_input_data(state)) {
724
6.48k
        local_state._child_block->clear_column_data(
725
6.48k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
726
6.48k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
727
6.48k
                state, local_state._child_block.get(), &local_state._child_eos));
728
6.48k
        *eos = local_state._child_eos;
729
6.48k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
730
672
            return Status::OK();
731
672
        }
732
5.81k
        {
733
5.81k
            SCOPED_TIMER(local_state.exec_time_counter());
734
5.81k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
735
5.81k
        }
736
5.81k
    }
737
738
6.17k
    if (!need_more_input_data(state)) {
739
6.17k
        SCOPED_TIMER(local_state.exec_time_counter());
740
6.17k
        bool new_eos = false;
741
6.17k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
742
6.17k
        if (new_eos) {
743
4.09k
            *eos = true;
744
4.09k
        } else if (!need_more_input_data(state)) {
745
366
            *eos = false;
746
366
        }
747
6.17k
    }
748
6.16k
    return Status::OK();
749
6.16k
}
750
751
template <typename Writer, typename Parent>
752
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
753
63.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
63.2k
    RETURN_IF_ERROR(Base::init(state, info));
755
63.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
63.2k
                                                         "AsyncWriterDependency", true);
757
63.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
63.2k
                             _finish_dependency));
759
760
63.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
63.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
63.2k
    return Status::OK();
763
63.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
512
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
512
    RETURN_IF_ERROR(Base::init(state, info));
755
512
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
512
                                                         "AsyncWriterDependency", true);
757
512
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
512
                             _finish_dependency));
759
760
512
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
512
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
512
    return Status::OK();
763
512
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
88
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
88
    RETURN_IF_ERROR(Base::init(state, info));
755
88
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
88
                                                         "AsyncWriterDependency", true);
757
88
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
88
                             _finish_dependency));
759
760
88
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
88
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
88
    return Status::OK();
763
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
44.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
44.3k
    RETURN_IF_ERROR(Base::init(state, info));
755
44.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
44.3k
                                                         "AsyncWriterDependency", true);
757
44.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
44.3k
                             _finish_dependency));
759
760
44.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
44.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
44.3k
    return Status::OK();
763
44.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
8.84k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
8.84k
    RETURN_IF_ERROR(Base::init(state, info));
755
8.84k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
8.84k
                                                         "AsyncWriterDependency", true);
757
8.84k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
8.84k
                             _finish_dependency));
759
760
8.84k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
8.84k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
8.84k
    return Status::OK();
763
8.84k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
5.15k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
5.15k
    RETURN_IF_ERROR(Base::init(state, info));
755
5.15k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
5.15k
                                                         "AsyncWriterDependency", true);
757
5.15k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
5.15k
                             _finish_dependency));
759
760
5.15k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
5.15k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
5.15k
    return Status::OK();
763
5.15k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
3.38k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
3.38k
    RETURN_IF_ERROR(Base::init(state, info));
755
3.38k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
3.38k
                                                         "AsyncWriterDependency", true);
757
3.38k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
3.38k
                             _finish_dependency));
759
760
3.38k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
3.38k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
3.38k
    return Status::OK();
763
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
160
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
160
    RETURN_IF_ERROR(Base::init(state, info));
755
160
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
160
                                                         "AsyncWriterDependency", true);
757
160
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
160
                             _finish_dependency));
759
760
160
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
160
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
160
    return Status::OK();
763
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
640
    RETURN_IF_ERROR(Base::init(state, info));
755
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
640
                                                         "AsyncWriterDependency", true);
757
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
640
                             _finish_dependency));
759
760
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
640
    return Status::OK();
763
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
753
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
754
156
    RETURN_IF_ERROR(Base::init(state, info));
755
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
756
156
                                                         "AsyncWriterDependency", true);
757
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
758
156
                             _finish_dependency));
759
760
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
761
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
762
156
    return Status::OK();
763
156
}
764
765
template <typename Writer, typename Parent>
766
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
767
63.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
63.5k
    RETURN_IF_ERROR(Base::open(state));
769
63.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
590k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
526k
        RETURN_IF_ERROR(
772
526k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
526k
    }
774
63.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
63.5k
    return Status::OK();
776
63.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
511
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
511
    RETURN_IF_ERROR(Base::open(state));
769
511
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
2.76k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
2.24k
        RETURN_IF_ERROR(
772
2.24k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
2.24k
    }
774
511
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
511
    return Status::OK();
776
511
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
88
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
88
    RETURN_IF_ERROR(Base::open(state));
769
88
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
412
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
324
        RETURN_IF_ERROR(
772
324
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
324
    }
774
88
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
88
    return Status::OK();
776
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
44.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
44.6k
    RETURN_IF_ERROR(Base::open(state));
769
44.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
349k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
305k
        RETURN_IF_ERROR(
772
305k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
305k
    }
774
44.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
44.6k
    return Status::OK();
776
44.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
8.81k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
8.81k
    RETURN_IF_ERROR(Base::open(state));
769
8.81k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
52.8k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
44.0k
        RETURN_IF_ERROR(
772
44.0k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
44.0k
    }
774
8.81k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
8.81k
    return Status::OK();
776
8.81k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
5.14k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
5.14k
    RETURN_IF_ERROR(Base::open(state));
769
5.14k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
136k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
131k
        RETURN_IF_ERROR(
772
131k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
131k
    }
774
5.14k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
5.14k
    return Status::OK();
776
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
3.38k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
3.38k
    RETURN_IF_ERROR(Base::open(state));
769
3.38k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
42.2k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
38.8k
        RETURN_IF_ERROR(
772
38.8k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
38.8k
    }
774
3.38k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
3.38k
    return Status::OK();
776
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
160
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
160
    RETURN_IF_ERROR(Base::open(state));
769
160
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
476
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
316
        RETURN_IF_ERROR(
772
316
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
316
    }
774
160
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
160
    return Status::OK();
776
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
640
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
640
    RETURN_IF_ERROR(Base::open(state));
769
640
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
4.36k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
3.72k
        RETURN_IF_ERROR(
772
3.72k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
3.72k
    }
774
640
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
640
    return Status::OK();
776
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
767
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
768
156
    RETURN_IF_ERROR(Base::open(state));
769
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
770
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
771
630
        RETURN_IF_ERROR(
772
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
773
630
    }
774
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
775
156
    return Status::OK();
776
156
}
777
778
template <typename Writer, typename Parent>
779
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
780
85.7k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
85.7k
    return _writer->sink(block, eos);
782
85.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
1.99k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
1.99k
    return _writer->sink(block, eos);
782
1.99k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
112
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
112
    return _writer->sink(block, eos);
782
112
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
59.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
59.3k
    return _writer->sink(block, eos);
782
59.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
10.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
10.1k
    return _writer->sink(block, eos);
782
10.1k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
7.49k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
7.49k
    return _writer->sink(block, eos);
782
7.49k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
5.33k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
5.33k
    return _writer->sink(block, eos);
782
5.33k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
180
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
180
    return _writer->sink(block, eos);
782
180
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
802
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
802
    return _writer->sink(block, eos);
782
802
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
780
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
781
310
    return _writer->sink(block, eos);
782
310
}
783
784
template <typename Writer, typename Parent>
785
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
786
63.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
63.6k
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
63.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
63.6k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
63.6k
    if (_writer) {
794
63.6k
        Status st = _writer->get_writer_status();
795
63.6k
        if (exec_status.ok()) {
796
63.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
63.4k
                                                       : Status::Cancelled("force close"));
798
63.4k
        } else {
799
159
            _writer->force_close(exec_status);
800
159
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
63.6k
        RETURN_IF_ERROR(st);
805
63.6k
    }
806
63.5k
    return Base::close(state, exec_status);
807
63.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
500
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
500
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
500
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
500
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
500
    if (_writer) {
794
500
        Status st = _writer->get_writer_status();
795
500
        if (exec_status.ok()) {
796
500
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
500
                                                       : Status::Cancelled("force close"));
798
500
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
500
        RETURN_IF_ERROR(st);
805
500
    }
806
500
    return Base::close(state, exec_status);
807
500
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
88
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
88
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
88
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
88
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
88
    if (_writer) {
794
88
        Status st = _writer->get_writer_status();
795
88
        if (exec_status.ok()) {
796
88
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
88
                                                       : Status::Cancelled("force close"));
798
88
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
88
        RETURN_IF_ERROR(st);
805
88
    }
806
80
    return Base::close(state, exec_status);
807
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
44.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
44.7k
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
44.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
44.7k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
44.7k
    if (_writer) {
794
44.7k
        Status st = _writer->get_writer_status();
795
44.7k
        if (exec_status.ok()) {
796
44.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
44.6k
                                                       : Status::Cancelled("force close"));
798
44.6k
        } else {
799
53
            _writer->force_close(exec_status);
800
53
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
44.7k
        RETURN_IF_ERROR(st);
805
44.7k
    }
806
44.6k
    return Base::close(state, exec_status);
807
44.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
8.83k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
8.83k
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
8.83k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
8.83k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
8.83k
    if (_writer) {
794
8.83k
        Status st = _writer->get_writer_status();
795
8.83k
        if (exec_status.ok()) {
796
8.74k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
8.74k
                                                       : Status::Cancelled("force close"));
798
8.74k
        } else {
799
98
            _writer->force_close(exec_status);
800
98
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
8.83k
        RETURN_IF_ERROR(st);
805
8.83k
    }
806
8.83k
    return Base::close(state, exec_status);
807
8.83k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
5.14k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
5.14k
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
5.14k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
5.14k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
5.15k
    if (_writer) {
794
5.15k
        Status st = _writer->get_writer_status();
795
5.15k
        if (exec_status.ok()) {
796
5.14k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
5.14k
                                                       : Status::Cancelled("force close"));
798
5.14k
        } else {
799
4
            _writer->force_close(exec_status);
800
4
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
5.15k
        RETURN_IF_ERROR(st);
805
5.15k
    }
806
5.14k
    return Base::close(state, exec_status);
807
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
3.38k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
3.38k
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
3.38k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
3.38k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
3.38k
    if (_writer) {
794
3.38k
        Status st = _writer->get_writer_status();
795
3.38k
        if (exec_status.ok()) {
796
3.38k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
3.38k
                                                       : Status::Cancelled("force close"));
798
3.38k
        } else {
799
4
            _writer->force_close(exec_status);
800
4
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
3.38k
        RETURN_IF_ERROR(st);
805
3.38k
    }
806
3.38k
    return Base::close(state, exec_status);
807
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
160
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
160
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
160
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
160
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
160
    if (_writer) {
794
160
        Status st = _writer->get_writer_status();
795
160
        if (exec_status.ok()) {
796
160
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
160
                                                       : Status::Cancelled("force close"));
798
160
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
160
        RETURN_IF_ERROR(st);
805
160
    }
806
160
    return Base::close(state, exec_status);
807
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
640
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
640
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
640
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
640
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
640
    if (_writer) {
794
640
        Status st = _writer->get_writer_status();
795
640
        if (exec_status.ok()) {
796
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
640
                                                       : Status::Cancelled("force close"));
798
640
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
640
        RETURN_IF_ERROR(st);
805
640
    }
806
640
    return Base::close(state, exec_status);
807
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
786
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
787
156
    if (_closed) {
788
0
        return Status::OK();
789
0
    }
790
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
791
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
792
    // if the init failed, the _writer may be nullptr. so here need check
793
156
    if (_writer) {
794
156
        Status st = _writer->get_writer_status();
795
156
        if (exec_status.ok()) {
796
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
797
156
                                                       : Status::Cancelled("force close"));
798
156
        } else {
799
0
            _writer->force_close(exec_status);
800
0
        }
801
        // If there is an error in process_block thread, then we should get the writer
802
        // status before call force_close. For example, the thread may failed in commit
803
        // transaction.
804
156
        RETURN_IF_ERROR(st);
805
156
    }
806
156
    return Base::close(state, exec_status);
807
156
}
808
809
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
810
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
811
DECLARE_OPERATOR(ResultSinkLocalState)
812
DECLARE_OPERATOR(JdbcTableSinkLocalState)
813
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
814
DECLARE_OPERATOR(ResultFileSinkLocalState)
815
DECLARE_OPERATOR(OlapTableSinkLocalState)
816
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
817
DECLARE_OPERATOR(HiveTableSinkLocalState)
818
DECLARE_OPERATOR(TVFTableSinkLocalState)
819
DECLARE_OPERATOR(IcebergTableSinkLocalState)
820
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
821
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
822
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
823
DECLARE_OPERATOR(MCTableSinkLocalState)
824
DECLARE_OPERATOR(AnalyticSinkLocalState)
825
DECLARE_OPERATOR(BlackholeSinkLocalState)
826
DECLARE_OPERATOR(SortSinkLocalState)
827
DECLARE_OPERATOR(SpillSortSinkLocalState)
828
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
829
DECLARE_OPERATOR(AggSinkLocalState)
830
DECLARE_OPERATOR(BucketedAggSinkLocalState)
831
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
832
DECLARE_OPERATOR(ExchangeSinkLocalState)
833
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
834
DECLARE_OPERATOR(UnionSinkLocalState)
835
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
836
DECLARE_OPERATOR(PartitionSortSinkLocalState)
837
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
838
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
839
DECLARE_OPERATOR(SetSinkLocalState<true>)
840
DECLARE_OPERATOR(SetSinkLocalState<false>)
841
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
842
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
843
DECLARE_OPERATOR(CacheSinkLocalState)
844
DECLARE_OPERATOR(DictSinkLocalState)
845
DECLARE_OPERATOR(RecCTESinkLocalState)
846
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
847
848
#undef DECLARE_OPERATOR
849
850
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
851
DECLARE_OPERATOR(HashJoinProbeLocalState)
852
DECLARE_OPERATOR(OlapScanLocalState)
853
DECLARE_OPERATOR(GroupCommitLocalState)
854
DECLARE_OPERATOR(JDBCScanLocalState)
855
DECLARE_OPERATOR(FileScanLocalState)
856
DECLARE_OPERATOR(AnalyticLocalState)
857
DECLARE_OPERATOR(SortLocalState)
858
DECLARE_OPERATOR(SpillSortLocalState)
859
DECLARE_OPERATOR(LocalMergeSortLocalState)
860
DECLARE_OPERATOR(AggLocalState)
861
DECLARE_OPERATOR(BucketedAggLocalState)
862
DECLARE_OPERATOR(PartitionedAggLocalState)
863
DECLARE_OPERATOR(TableFunctionLocalState)
864
DECLARE_OPERATOR(ExchangeLocalState)
865
DECLARE_OPERATOR(RepeatLocalState)
866
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
867
DECLARE_OPERATOR(AssertNumRowsLocalState)
868
DECLARE_OPERATOR(EmptySetLocalState)
869
DECLARE_OPERATOR(UnionSourceLocalState)
870
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
871
DECLARE_OPERATOR(PartitionSortSourceLocalState)
872
DECLARE_OPERATOR(SetSourceLocalState<true>)
873
DECLARE_OPERATOR(SetSourceLocalState<false>)
874
DECLARE_OPERATOR(DataGenLocalState)
875
DECLARE_OPERATOR(SchemaScanLocalState)
876
DECLARE_OPERATOR(MetaScanLocalState)
877
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
878
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
879
DECLARE_OPERATOR(CacheSourceLocalState)
880
DECLARE_OPERATOR(RecCTESourceLocalState)
881
DECLARE_OPERATOR(RecCTEScanLocalState)
882
883
#ifdef BE_TEST
884
DECLARE_OPERATOR(MockLocalState)
885
DECLARE_OPERATOR(MockScanLocalState)
886
#endif
887
#undef DECLARE_OPERATOR
888
889
template class StreamingOperatorX<AssertNumRowsLocalState>;
890
template class StreamingOperatorX<SelectLocalState>;
891
892
template class StatefulOperatorX<HashJoinProbeLocalState>;
893
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
894
template class StatefulOperatorX<RepeatLocalState>;
895
template class StatefulOperatorX<MaterializationLocalState>;
896
template class StatefulOperatorX<StreamingAggLocalState>;
897
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
898
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
899
template class StatefulOperatorX<TableFunctionLocalState>;
900
901
template class PipelineXSinkLocalState<HashJoinSharedState>;
902
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
903
template class PipelineXSinkLocalState<SortSharedState>;
904
template class PipelineXSinkLocalState<SpillSortSharedState>;
905
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
906
template class PipelineXSinkLocalState<AnalyticSharedState>;
907
template class PipelineXSinkLocalState<AggSharedState>;
908
template class PipelineXSinkLocalState<BucketedAggSharedState>;
909
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
910
template class PipelineXSinkLocalState<FakeSharedState>;
911
template class PipelineXSinkLocalState<UnionSharedState>;
912
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
913
template class PipelineXSinkLocalState<MultiCastSharedState>;
914
template class PipelineXSinkLocalState<SetSharedState>;
915
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
916
template class PipelineXSinkLocalState<BasicSharedState>;
917
template class PipelineXSinkLocalState<DataQueueSharedState>;
918
template class PipelineXSinkLocalState<RecCTESharedState>;
919
920
template class PipelineXLocalState<HashJoinSharedState>;
921
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
922
template class PipelineXLocalState<SortSharedState>;
923
template class PipelineXLocalState<SpillSortSharedState>;
924
template class PipelineXLocalState<NestedLoopJoinSharedState>;
925
template class PipelineXLocalState<AnalyticSharedState>;
926
template class PipelineXLocalState<AggSharedState>;
927
template class PipelineXLocalState<BucketedAggSharedState>;
928
template class PipelineXLocalState<PartitionedAggSharedState>;
929
template class PipelineXLocalState<FakeSharedState>;
930
template class PipelineXLocalState<UnionSharedState>;
931
template class PipelineXLocalState<DataQueueSharedState>;
932
template class PipelineXLocalState<MultiCastSharedState>;
933
template class PipelineXLocalState<PartitionSortNodeSharedState>;
934
template class PipelineXLocalState<SetSharedState>;
935
template class PipelineXLocalState<LocalExchangeSharedState>;
936
template class PipelineXLocalState<BasicSharedState>;
937
template class PipelineXLocalState<RecCTESharedState>;
938
939
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
940
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
941
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
942
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
943
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
944
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
945
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
946
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
947
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
948
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
949
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
950
951
#ifdef BE_TEST
952
template class OperatorX<DummyOperatorLocalState>;
953
template class DataSinkOperatorX<DummySinkLocalState>;
954
#endif
955
956
} // namespace doris