Coverage Report

Created: 2026-06-02 10:41

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