Coverage Report

Created: 2026-05-20 11:46

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