Coverage Report

Created: 2026-06-08 21:20

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