Coverage Report

Created: 2026-03-14 18:33

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/cache_sink_operator.h"
31
#include "exec/operator/cache_source_operator.h"
32
#include "exec/operator/datagen_operator.h"
33
#include "exec/operator/dict_sink_operator.h"
34
#include "exec/operator/distinct_streaming_aggregation_operator.h"
35
#include "exec/operator/empty_set_operator.h"
36
#include "exec/operator/es_scan_operator.h"
37
#include "exec/operator/exchange_sink_operator.h"
38
#include "exec/operator/exchange_source_operator.h"
39
#include "exec/operator/file_scan_operator.h"
40
#include "exec/operator/group_commit_block_sink_operator.h"
41
#include "exec/operator/group_commit_scan_operator.h"
42
#include "exec/operator/hashjoin_build_sink.h"
43
#include "exec/operator/hashjoin_probe_operator.h"
44
#include "exec/operator/hive_table_sink_operator.h"
45
#include "exec/operator/iceberg_table_sink_operator.h"
46
#include "exec/operator/jdbc_scan_operator.h"
47
#include "exec/operator/jdbc_table_sink_operator.h"
48
#include "exec/operator/local_merge_sort_source_operator.h"
49
#include "exec/operator/materialization_opertor.h"
50
#include "exec/operator/maxcompute_table_sink_operator.h"
51
#include "exec/operator/memory_scratch_sink_operator.h"
52
#include "exec/operator/meta_scan_operator.h"
53
#include "exec/operator/mock_operator.h"
54
#include "exec/operator/mock_scan_operator.h"
55
#include "exec/operator/multi_cast_data_stream_sink.h"
56
#include "exec/operator/multi_cast_data_stream_source.h"
57
#include "exec/operator/nested_loop_join_build_operator.h"
58
#include "exec/operator/nested_loop_join_probe_operator.h"
59
#include "exec/operator/olap_scan_operator.h"
60
#include "exec/operator/olap_table_sink_operator.h"
61
#include "exec/operator/olap_table_sink_v2_operator.h"
62
#include "exec/operator/partition_sort_sink_operator.h"
63
#include "exec/operator/partition_sort_source_operator.h"
64
#include "exec/operator/partitioned_aggregation_sink_operator.h"
65
#include "exec/operator/partitioned_aggregation_source_operator.h"
66
#include "exec/operator/partitioned_hash_join_probe_operator.h"
67
#include "exec/operator/partitioned_hash_join_sink_operator.h"
68
#include "exec/operator/rec_cte_anchor_sink_operator.h"
69
#include "exec/operator/rec_cte_scan_operator.h"
70
#include "exec/operator/rec_cte_sink_operator.h"
71
#include "exec/operator/rec_cte_source_operator.h"
72
#include "exec/operator/repeat_operator.h"
73
#include "exec/operator/result_file_sink_operator.h"
74
#include "exec/operator/result_sink_operator.h"
75
#include "exec/operator/schema_scan_operator.h"
76
#include "exec/operator/select_operator.h"
77
#include "exec/operator/set_probe_sink_operator.h"
78
#include "exec/operator/set_sink_operator.h"
79
#include "exec/operator/set_source_operator.h"
80
#include "exec/operator/sort_sink_operator.h"
81
#include "exec/operator/sort_source_operator.h"
82
#include "exec/operator/spill_iceberg_table_sink_operator.h"
83
#include "exec/operator/spill_sort_sink_operator.h"
84
#include "exec/operator/spill_sort_source_operator.h"
85
#include "exec/operator/streaming_aggregation_operator.h"
86
#include "exec/operator/table_function_operator.h"
87
#include "exec/operator/tvf_table_sink_operator.h"
88
#include "exec/operator/union_sink_operator.h"
89
#include "exec/operator/union_source_operator.h"
90
#include "exec/pipeline/dependency.h"
91
#include "exec/pipeline/pipeline.h"
92
#include "exprs/vexpr.h"
93
#include "exprs/vexpr_context.h"
94
#include "runtime/runtime_profile.h"
95
#include "util/debug_util.h"
96
#include "util/string_util.h"
97
98
namespace doris {
99
#include "common/compile_check_begin.h"
100
class RowDescriptor;
101
class RuntimeState;
102
} // namespace doris
103
104
namespace doris {
105
106
0
Status OperatorBase::close(RuntimeState* state) {
107
0
    if (_is_closed) {
108
0
        return Status::OK();
109
0
    }
110
0
    _is_closed = true;
111
0
    return Status::OK();
112
0
}
113
114
template <typename SharedStateArg>
115
2.28M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
2.28M
    if (_parent->nereids_id() == -1) {
117
1.18M
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
1.18M
    } else {
119
1.10M
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
1.10M
                           std::to_string(_parent->nereids_id()),
121
1.10M
                           std::to_string(_parent->node_id()));
122
1.10M
    }
123
2.28M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
134k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
134k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
134k
    } else {
119
134k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
134k
                           std::to_string(_parent->nereids_id()),
121
134k
                           std::to_string(_parent->node_id()));
122
134k
    }
123
134k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
1
    if (_parent->nereids_id() == -1) {
117
1
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
1
    } else {
119
0
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
0
                           std::to_string(_parent->nereids_id()),
121
0
                           std::to_string(_parent->node_id()));
122
0
    }
123
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
195k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
195k
    if (_parent->nereids_id() == -1) {
117
12
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
195k
    } else {
119
195k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
195k
                           std::to_string(_parent->nereids_id()),
121
195k
                           std::to_string(_parent->node_id()));
122
195k
    }
123
195k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
20
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
20
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
20
    } else {
119
20
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
20
                           std::to_string(_parent->nereids_id()),
121
20
                           std::to_string(_parent->node_id()));
122
20
    }
123
20
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
5.19k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
5.19k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
5.19k
    } else {
119
5.19k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
5.19k
                           std::to_string(_parent->nereids_id()),
121
5.19k
                           std::to_string(_parent->node_id()));
122
5.19k
    }
123
5.19k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
9.07k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
9.07k
    if (_parent->nereids_id() == -1) {
117
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
9.06k
    } else {
119
9.06k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
9.06k
                           std::to_string(_parent->nereids_id()),
121
9.06k
                           std::to_string(_parent->node_id()));
122
9.06k
    }
123
9.07k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
118k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
118k
    if (_parent->nereids_id() == -1) {
117
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
118k
    } else {
119
118k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
118k
                           std::to_string(_parent->nereids_id()),
121
118k
                           std::to_string(_parent->node_id()));
122
118k
    }
123
118k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
309
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
309
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
309
    } else {
119
309
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
309
                           std::to_string(_parent->nereids_id()),
121
309
                           std::to_string(_parent->node_id()));
122
309
    }
123
309
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
1.05M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
1.05M
    if (_parent->nereids_id() == -1) {
117
457k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
596k
    } else {
119
596k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
596k
                           std::to_string(_parent->nereids_id()),
121
596k
                           std::to_string(_parent->node_id()));
122
596k
    }
123
1.05M
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
39.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
39.3k
    if (_parent->nereids_id() == -1) {
117
2
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
39.3k
    } else {
119
39.3k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
39.3k
                           std::to_string(_parent->nereids_id()),
121
39.3k
                           std::to_string(_parent->node_id()));
122
39.3k
    }
123
39.3k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
369
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
369
    if (_parent->nereids_id() == -1) {
117
368
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
368
    } else {
119
1
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
1
                           std::to_string(_parent->nereids_id()),
121
1
                           std::to_string(_parent->node_id()));
122
1
    }
123
369
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
5.92k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
5.92k
    if (_parent->nereids_id() == -1) {
117
5.92k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
5.92k
    } else {
119
1
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
1
                           std::to_string(_parent->nereids_id()),
121
1
                           std::to_string(_parent->node_id()));
122
1
    }
123
5.92k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
427
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
427
    if (_parent->nereids_id() == -1) {
117
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
325
    } else {
119
325
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
325
                           std::to_string(_parent->nereids_id()),
121
325
                           std::to_string(_parent->node_id()));
122
325
    }
123
427
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
4.41k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
4.41k
    if (_parent->nereids_id() == -1) {
117
10
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
4.40k
    } else {
119
4.40k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
4.40k
                           std::to_string(_parent->nereids_id()),
121
4.40k
                           std::to_string(_parent->node_id()));
122
4.40k
    }
123
4.41k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
719k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
719k
    if (_parent->nereids_id() == -1) {
117
719k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
719k
    } else {
119
166
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
166
                           std::to_string(_parent->nereids_id()),
121
166
                           std::to_string(_parent->node_id()));
122
166
    }
123
719k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
150
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
150
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
150
    } else {
119
150
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
150
                           std::to_string(_parent->nereids_id()),
121
150
                           std::to_string(_parent->node_id()));
122
150
    }
123
150
}
124
125
template <typename SharedStateArg>
126
1.33M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
1.33M
    if (_parent->nereids_id() == -1) {
128
813k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
813k
    } else {
130
520k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
520k
                           std::to_string(_parent->nereids_id()),
132
520k
                           std::to_string(_parent->node_id()));
133
520k
    }
134
1.33M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
183k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
183k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
183k
    } else {
130
183k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
183k
                           std::to_string(_parent->nereids_id()),
132
183k
                           std::to_string(_parent->node_id()));
133
183k
    }
134
183k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
2
    if (_parent->nereids_id() == -1) {
128
1
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
1
    } else {
130
1
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
1
                           std::to_string(_parent->nereids_id()),
132
1
                           std::to_string(_parent->node_id()));
133
1
    }
134
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
196k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
196k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
196k
    } else {
130
196k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
196k
                           std::to_string(_parent->nereids_id()),
132
196k
                           std::to_string(_parent->node_id()));
133
196k
    }
134
196k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
23
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
23
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
23
    } else {
130
23
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
23
                           std::to_string(_parent->nereids_id()),
132
23
                           std::to_string(_parent->node_id()));
133
23
    }
134
23
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
5.28k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
5.28k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
5.28k
    } else {
130
5.28k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
5.28k
                           std::to_string(_parent->nereids_id()),
132
5.28k
                           std::to_string(_parent->node_id()));
133
5.28k
    }
134
5.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
9.16k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
9.16k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
9.15k
    } else {
130
9.15k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
9.15k
                           std::to_string(_parent->nereids_id()),
132
9.15k
                           std::to_string(_parent->node_id()));
133
9.15k
    }
134
9.16k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
118k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
118k
    if (_parent->nereids_id() == -1) {
128
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
118k
    } else {
130
118k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
118k
                           std::to_string(_parent->nereids_id()),
132
118k
                           std::to_string(_parent->node_id()));
133
118k
    }
134
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
315
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
315
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
315
    } else {
130
315
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
315
                           std::to_string(_parent->nereids_id()),
132
315
                           std::to_string(_parent->node_id()));
133
315
    }
134
315
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
24
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
24
    if (_parent->nereids_id() == -1) {
128
24
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
24
    } else {
130
0
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
0
                           std::to_string(_parent->nereids_id()),
132
0
                           std::to_string(_parent->node_id()));
133
0
    }
134
24
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
7.12k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
7.12k
    if (_parent->nereids_id() == -1) {
128
3
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
7.12k
    } else {
130
7.12k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
7.12k
                           std::to_string(_parent->nereids_id()),
132
7.12k
                           std::to_string(_parent->node_id()));
133
7.12k
    }
134
7.12k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
432
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
432
    if (_parent->nereids_id() == -1) {
128
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
330
    } else {
130
330
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
330
                           std::to_string(_parent->nereids_id()),
132
330
                           std::to_string(_parent->node_id()));
133
330
    }
134
432
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
11.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
11.3k
    if (_parent->nereids_id() == -1) {
128
11.3k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
18.4E
    } else {
130
18.4E
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
18.4E
                           std::to_string(_parent->nereids_id()),
132
18.4E
                           std::to_string(_parent->node_id()));
133
18.4E
    }
134
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
331k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
331k
    if (_parent->nereids_id() == -1) {
128
331k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
18.4E
    } else {
130
18.4E
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
18.4E
                           std::to_string(_parent->nereids_id()),
132
18.4E
                           std::to_string(_parent->node_id()));
133
18.4E
    }
134
331k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
469k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
470k
    if (_parent->nereids_id() == -1) {
128
470k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
18.4E
    } else {
130
18.4E
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
18.4E
                           std::to_string(_parent->nereids_id()),
132
18.4E
                           std::to_string(_parent->node_id()));
133
18.4E
    }
134
469k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
369
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
369
    if (_parent->nereids_id() == -1) {
128
369
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
369
    } else {
130
0
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
0
                           std::to_string(_parent->nereids_id()),
132
0
                           std::to_string(_parent->node_id()));
133
0
    }
134
369
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
300
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
300
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
300
    } else {
130
300
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
300
                           std::to_string(_parent->nereids_id()),
132
300
                           std::to_string(_parent->node_id()));
133
300
    }
134
300
}
135
136
template <typename SharedStateArg>
137
30.4k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
30.4k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
30.4k
    _terminated = true;
142
30.4k
    return Status::OK();
143
30.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
24.0k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
24.0k
    _terminated = true;
142
24.0k
    return Status::OK();
143
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
697
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
697
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
697
    _terminated = true;
142
697
    return Status::OK();
143
697
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
12
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
12
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
12
    _terminated = true;
142
12
    return Status::OK();
143
12
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
3.87k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
3.87k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
3.87k
    _terminated = true;
142
3.87k
    return Status::OK();
143
3.87k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
1.45k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
1.45k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
1.45k
    _terminated = true;
142
1.45k
    return Status::OK();
143
1.45k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
14
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
14
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
14
    _terminated = true;
142
14
    return Status::OK();
143
14
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
2
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
2
    _terminated = true;
142
2
    return Status::OK();
143
2
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
39
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
39
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
39
    _terminated = true;
142
39
    return Status::OK();
143
39
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
2
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
2
    _terminated = true;
142
2
    return Status::OK();
143
2
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
213
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
213
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
213
    _terminated = true;
142
213
    return Status::OK();
143
213
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
138
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
138
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
138
    _terminated = true;
142
138
    return Status::OK();
143
138
}
144
145
613k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
146
613k
    return _child && _child->is_serial_operator() && !is_source()
147
613k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
148
613k
                   : DataDistribution(ExchangeType::NOOP);
149
613k
}
150
151
81.1k
const RowDescriptor& OperatorBase::row_desc() const {
152
81.1k
    return _child->row_desc();
153
81.1k
}
154
155
template <typename SharedStateArg>
156
57.2k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
57.2k
    fmt::memory_buffer debug_string_buffer;
158
57.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
57.2k
    return fmt::to_string(debug_string_buffer);
160
57.2k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
3
    fmt::memory_buffer debug_string_buffer;
158
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
3
    return fmt::to_string(debug_string_buffer);
160
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
57.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
57.1k
    fmt::memory_buffer debug_string_buffer;
158
57.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
57.1k
    return fmt::to_string(debug_string_buffer);
160
57.1k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
1
    fmt::memory_buffer debug_string_buffer;
158
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
1
    return fmt::to_string(debug_string_buffer);
160
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
156
60
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
60
    fmt::memory_buffer debug_string_buffer;
158
60
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
60
    return fmt::to_string(debug_string_buffer);
160
60
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
161
162
template <typename SharedStateArg>
163
57.2k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
57.2k
    fmt::memory_buffer debug_string_buffer;
165
57.2k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
57.2k
    return fmt::to_string(debug_string_buffer);
167
57.2k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
60
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
60
    fmt::memory_buffer debug_string_buffer;
165
60
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
60
    return fmt::to_string(debug_string_buffer);
167
60
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
57.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
57.1k
    fmt::memory_buffer debug_string_buffer;
165
57.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
57.1k
    return fmt::to_string(debug_string_buffer);
167
57.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
168
169
57.2k
std::string OperatorXBase::debug_string(int indentation_level) const {
170
57.2k
    fmt::memory_buffer debug_string_buffer;
171
57.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
172
57.2k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
173
57.2k
                   _is_serial_operator);
174
57.2k
    return fmt::to_string(debug_string_buffer);
175
57.2k
}
176
177
57.2k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
178
57.2k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
179
57.2k
}
180
181
570k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
182
570k
    std::string node_name = print_plan_node_type(tnode.node_type);
183
570k
    _nereids_id = tnode.nereids_id;
184
570k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
185
2.89k
        if (!tnode.__isset.output_tuple_id) {
186
0
            return Status::InternalError("no final output tuple id");
187
0
        }
188
2.89k
        if (tnode.intermediate_output_tuple_id_list.size() !=
189
2.89k
            tnode.intermediate_projections_list.size()) {
190
0
            return Status::InternalError(
191
0
                    "intermediate_output_tuple_id_list size:{} not match "
192
0
                    "intermediate_projections_list size:{}",
193
0
                    tnode.intermediate_output_tuple_id_list.size(),
194
0
                    tnode.intermediate_projections_list.size());
195
0
        }
196
2.89k
    }
197
570k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
198
570k
    _op_name = substr + "_OPERATOR";
199
200
570k
    if (tnode.__isset.vconjunct) {
201
0
        return Status::InternalError("vconjunct is not supported yet");
202
570k
    } else if (tnode.__isset.conjuncts) {
203
258k
        for (const auto& conjunct : tnode.conjuncts) {
204
258k
            VExprContextSPtr context;
205
258k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
206
258k
            _conjuncts.emplace_back(context);
207
258k
        }
208
88.0k
    }
209
210
    // create the projections expr
211
570k
    if (tnode.__isset.projections) {
212
245k
        DCHECK(tnode.__isset.output_tuple_id);
213
245k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
214
245k
    }
215
570k
    if (!tnode.intermediate_projections_list.empty()) {
216
2.89k
        DCHECK(tnode.__isset.projections) << "no final projections";
217
2.89k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
218
3.79k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
219
3.79k
            VExprContextSPtrs projections;
220
3.79k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
221
3.79k
            _intermediate_projections.push_back(projections);
222
3.79k
        }
223
2.89k
    }
224
570k
    return Status::OK();
225
570k
}
226
227
597k
Status OperatorXBase::prepare(RuntimeState* state) {
228
597k
    for (auto& conjunct : _conjuncts) {
229
258k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
230
258k
    }
231
597k
    if (state->enable_adjust_conjunct_order_by_cost()) {
232
547k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
233
340k
            return a->execute_cost() < b->execute_cost();
234
340k
        });
235
547k
    };
236
237
601k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
238
3.79k
        RETURN_IF_ERROR(
239
3.79k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
240
3.79k
    }
241
597k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
242
243
597k
    if (has_output_row_desc()) {
244
245k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
245
245k
    }
246
247
597k
    for (auto& conjunct : _conjuncts) {
248
258k
        RETURN_IF_ERROR(conjunct->open(state));
249
258k
    }
250
597k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
251
597k
    for (auto& projections : _intermediate_projections) {
252
3.79k
        RETURN_IF_ERROR(VExpr::open(projections, state));
253
3.79k
    }
254
597k
    if (_child && !is_source()) {
255
138k
        RETURN_IF_ERROR(_child->prepare(state));
256
138k
    }
257
258
597k
    if (VExpr::contains_blockable_function(_conjuncts) ||
259
597k
        VExpr::contains_blockable_function(_projections)) {
260
0
        _blockable = true;
261
0
    }
262
263
597k
    return Status::OK();
264
597k
}
265
266
8.83k
Status OperatorXBase::terminate(RuntimeState* state) {
267
8.83k
    if (_child && !is_source()) {
268
2.36k
        RETURN_IF_ERROR(_child->terminate(state));
269
2.36k
    }
270
8.83k
    auto result = state->get_local_state_result(operator_id());
271
8.83k
    if (!result) {
272
0
        return result.error();
273
0
    }
274
8.83k
    return result.value()->terminate(state);
275
8.83k
}
276
277
6.71M
Status OperatorXBase::close(RuntimeState* state) {
278
6.71M
    if (_child && !is_source()) {
279
1.52M
        RETURN_IF_ERROR(_child->close(state));
280
1.52M
    }
281
6.71M
    auto result = state->get_local_state_result(operator_id());
282
6.71M
    if (!result) {
283
0
        return result.error();
284
0
    }
285
6.71M
    return result.value()->close(state);
286
6.71M
}
287
288
333k
void PipelineXLocalStateBase::clear_origin_block() {
289
333k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
290
333k
}
291
292
639k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
293
639k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
294
295
639k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
296
639k
    return Status::OK();
297
639k
}
298
299
0
bool PipelineXLocalStateBase::is_blockable() const {
300
0
    return std::any_of(_projections.begin(), _projections.end(),
301
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
302
0
}
303
304
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
305
333k
                                     Block* output_block) const {
306
333k
    auto* local_state = state->get_local_state(operator_id());
307
333k
    SCOPED_TIMER(local_state->exec_time_counter());
308
333k
    SCOPED_TIMER(local_state->_projection_timer);
309
333k
    const size_t rows = origin_block->rows();
310
333k
    if (rows == 0) {
311
215k
        return Status::OK();
312
215k
    }
313
118k
    Block input_block = *origin_block;
314
315
118k
    size_t bytes_usage = 0;
316
118k
    ColumnsWithTypeAndName new_columns;
317
118k
    for (const auto& projections : local_state->_intermediate_projections) {
318
1.20k
        if (projections.empty()) {
319
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
320
0
                                         node_id());
321
0
        }
322
1.20k
        new_columns.resize(projections.size());
323
8.31k
        for (int i = 0; i < projections.size(); i++) {
324
7.10k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
325
7.10k
            if (new_columns[i].column->size() != rows) {
326
0
                return Status::InternalError(
327
0
                        "intermediate projection result column size {} not equal input rows {}, "
328
0
                        "expr: {}",
329
0
                        new_columns[i].column->size(), rows,
330
0
                        projections[i]->root()->debug_string());
331
0
            }
332
7.10k
        }
333
1.20k
        Block tmp_block {new_columns};
334
1.20k
        bytes_usage += tmp_block.allocated_bytes();
335
1.20k
        input_block.swap(tmp_block);
336
1.20k
    }
337
338
118k
    if (input_block.rows() != rows) {
339
0
        return Status::InternalError(
340
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
341
0
                "input_block: {}",
342
0
                input_block.rows(), rows, input_block.dump_structure());
343
0
    }
344
588k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
345
588k
        if (to->is_nullable() && !from->is_nullable()) {
346
0
            if (_keep_origin || !from->is_exclusive()) {
347
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
348
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
349
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
350
0
                bytes_usage += null_column.allocated_bytes();
351
0
            } else {
352
0
                to = make_nullable(from, false)->assume_mutable();
353
0
            }
354
588k
        } else {
355
588k
            if (_keep_origin || !from->is_exclusive()) {
356
579k
                to->insert_range_from(*from, 0, rows);
357
579k
                bytes_usage += from->allocated_bytes();
358
579k
            } else {
359
8.99k
                to = from->assume_mutable();
360
8.99k
            }
361
588k
        }
362
588k
    };
363
364
118k
    MutableBlock mutable_block =
365
118k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
366
118k
    if (rows != 0) {
367
118k
        auto& mutable_columns = mutable_block.mutable_columns();
368
118k
        const size_t origin_columns_count = input_block.columns();
369
118k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
707k
        for (int i = 0; i < mutable_columns.size(); ++i) {
371
588k
            auto result_column_id = -1;
372
588k
            ColumnPtr column_ptr;
373
588k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
374
588k
            if (column_ptr->size() != rows) {
375
0
                return Status::InternalError(
376
0
                        "projection result column size {} not equal input rows {}, expr: {}",
377
0
                        column_ptr->size(), rows,
378
0
                        local_state->_projections[i]->root()->debug_string());
379
0
            }
380
588k
            column_ptr = column_ptr->convert_to_full_column_if_const();
381
588k
            if (result_column_id >= origin_columns_count) {
382
588k
                bytes_usage += column_ptr->allocated_bytes();
383
588k
            }
384
588k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
385
588k
        }
386
118k
        DCHECK(mutable_block.rows() == rows);
387
118k
        output_block->set_columns(std::move(mutable_columns));
388
118k
    }
389
390
118k
    local_state->_estimate_memory_usage += bytes_usage;
391
392
118k
    return Status::OK();
393
118k
}
394
395
3.99M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
396
3.99M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
397
3.99M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
398
3.99M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
399
3.99M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
400
3.99M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
401
3.99M
            if (_debug_point_count++ % 2 == 0) {
402
3.99M
                return Status::OK();
403
3.99M
            }
404
3.99M
        }
405
3.99M
    });
406
407
3.99M
    Status status;
408
3.99M
    auto* local_state = state->get_local_state(operator_id());
409
3.99M
    Defer defer([&]() {
410
3.99M
        if (status.ok()) {
411
3.99M
            if (auto rows = block->rows()) {
412
717k
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
413
717k
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
414
717k
            }
415
3.99M
        }
416
3.99M
    });
417
3.99M
    if (_output_row_descriptor) {
418
333k
        local_state->clear_origin_block();
419
333k
        status = get_block(state, &local_state->_origin_block, eos);
420
333k
        if (UNLIKELY(!status.ok())) {
421
14
            return status;
422
14
        }
423
333k
        status = do_projections(state, &local_state->_origin_block, block);
424
333k
        return status;
425
333k
    }
426
3.66M
    status = get_block(state, block, eos);
427
3.66M
    RETURN_IF_ERROR(block->check_type_and_column());
428
3.66M
    return status;
429
3.66M
}
430
431
2.49M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
432
2.49M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
433
1.70k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
434
1.70k
        *eos = true;
435
1.70k
    }
436
437
2.49M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
438
2.49M
        auto op_name = to_lower(_parent->_op_name);
439
2.49M
        auto arg_op_name = dp->param<std::string>("op_name");
440
2.49M
        arg_op_name = to_lower(arg_op_name);
441
442
2.49M
        if (op_name == arg_op_name) {
443
2.49M
            *eos = true;
444
2.49M
        }
445
2.49M
    });
446
447
2.49M
    if (auto rows = block->rows()) {
448
650k
        _num_rows_returned += rows;
449
650k
    }
450
2.49M
}
451
452
30.4k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
453
30.4k
    auto result = state->get_sink_local_state_result();
454
30.4k
    if (!result) {
455
0
        return result.error();
456
0
    }
457
30.4k
    return result.value()->terminate(state);
458
30.4k
}
459
460
57.2k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
461
57.2k
    fmt::memory_buffer debug_string_buffer;
462
463
57.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
464
57.2k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
465
57.2k
    return fmt::to_string(debug_string_buffer);
466
57.2k
}
467
468
57.2k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
469
57.2k
    return state->get_sink_local_state()->debug_string(indentation_level);
470
57.2k
}
471
472
335k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
473
335k
    std::string op_name = "UNKNOWN_SINK";
474
335k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
475
476
335k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
477
335k
        op_name = it->second;
478
335k
    }
479
335k
    _name = op_name + "_OPERATOR";
480
335k
    return Status::OK();
481
335k
}
482
483
169k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
484
169k
    std::string op_name = print_plan_node_type(tnode.node_type);
485
169k
    _nereids_id = tnode.nereids_id;
486
169k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
487
169k
    _name = substr + "_SINK_OPERATOR";
488
169k
    return Status::OK();
489
169k
}
490
491
template <typename LocalStateType>
492
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
493
1.96M
                                                            LocalSinkStateInfo& info) {
494
1.96M
    auto local_state = LocalStateType::create_unique(this, state);
495
1.96M
    RETURN_IF_ERROR(local_state->init(state, info));
496
1.96M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
1.96M
    return Status::OK();
498
1.96M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
183k
                                                            LocalSinkStateInfo& info) {
494
183k
    auto local_state = LocalStateType::create_unique(this, state);
495
183k
    RETURN_IF_ERROR(local_state->init(state, info));
496
183k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
183k
    return Status::OK();
498
183k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
404k
                                                            LocalSinkStateInfo& info) {
494
404k
    auto local_state = LocalStateType::create_unique(this, state);
495
404k
    RETURN_IF_ERROR(local_state->init(state, info));
496
404k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
404k
    return Status::OK();
498
404k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
3
                                                            LocalSinkStateInfo& info) {
494
3
    auto local_state = LocalStateType::create_unique(this, state);
495
3
    RETURN_IF_ERROR(local_state->init(state, info));
496
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
3
    return Status::OK();
498
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
337
                                                            LocalSinkStateInfo& info) {
494
337
    auto local_state = LocalStateType::create_unique(this, state);
495
337
    RETURN_IF_ERROR(local_state->init(state, info));
496
337
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
337
    return Status::OK();
498
337
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
66.1k
                                                            LocalSinkStateInfo& info) {
494
66.1k
    auto local_state = LocalStateType::create_unique(this, state);
495
66.1k
    RETURN_IF_ERROR(local_state->init(state, info));
496
66.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
66.1k
    return Status::OK();
498
66.1k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
24
                                                            LocalSinkStateInfo& info) {
494
24
    auto local_state = LocalStateType::create_unique(this, state);
495
24
    RETURN_IF_ERROR(local_state->init(state, info));
496
24
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
24
    return Status::OK();
498
24
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
9.16k
                                                            LocalSinkStateInfo& info) {
494
9.16k
    auto local_state = LocalStateType::create_unique(this, state);
495
9.16k
    RETURN_IF_ERROR(local_state->init(state, info));
496
9.16k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
9.16k
    return Status::OK();
498
9.16k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
21
                                                            LocalSinkStateInfo& info) {
494
21
    auto local_state = LocalStateType::create_unique(this, state);
495
21
    RETURN_IF_ERROR(local_state->init(state, info));
496
21
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
21
    return Status::OK();
498
21
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
196k
                                                            LocalSinkStateInfo& info) {
494
196k
    auto local_state = LocalStateType::create_unique(this, state);
495
196k
    RETURN_IF_ERROR(local_state->init(state, info));
496
196k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
196k
    return Status::OK();
498
196k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
23
                                                            LocalSinkStateInfo& info) {
494
23
    auto local_state = LocalStateType::create_unique(this, state);
495
23
    RETURN_IF_ERROR(local_state->init(state, info));
496
23
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
23
    return Status::OK();
498
23
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
331k
                                                            LocalSinkStateInfo& info) {
494
331k
    auto local_state = LocalStateType::create_unique(this, state);
495
331k
    RETURN_IF_ERROR(local_state->init(state, info));
496
331k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
331k
    return Status::OK();
498
331k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
118k
                                                            LocalSinkStateInfo& info) {
494
118k
    auto local_state = LocalStateType::create_unique(this, state);
495
118k
    RETURN_IF_ERROR(local_state->init(state, info));
496
118k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
118k
    return Status::OK();
498
118k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
315
                                                            LocalSinkStateInfo& info) {
494
315
    auto local_state = LocalStateType::create_unique(this, state);
495
315
    RETURN_IF_ERROR(local_state->init(state, info));
496
315
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
315
    return Status::OK();
498
315
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
623k
                                                            LocalSinkStateInfo& info) {
494
623k
    auto local_state = LocalStateType::create_unique(this, state);
495
623k
    RETURN_IF_ERROR(local_state->init(state, info));
496
623k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
623k
    return Status::OK();
498
623k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
5.28k
                                                            LocalSinkStateInfo& info) {
494
5.28k
    auto local_state = LocalStateType::create_unique(this, state);
495
5.28k
    RETURN_IF_ERROR(local_state->init(state, info));
496
5.28k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
5.28k
    return Status::OK();
498
5.28k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
7.12k
                                                            LocalSinkStateInfo& info) {
494
7.12k
    auto local_state = LocalStateType::create_unique(this, state);
495
7.12k
    RETURN_IF_ERROR(local_state->init(state, info));
496
7.12k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
7.12k
    return Status::OK();
498
7.12k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.25k
                                                            LocalSinkStateInfo& info) {
494
2.25k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.25k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.25k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.25k
    return Status::OK();
498
2.25k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
328
                                                            LocalSinkStateInfo& info) {
494
328
    auto local_state = LocalStateType::create_unique(this, state);
495
328
    RETURN_IF_ERROR(local_state->init(state, info));
496
328
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
328
    return Status::OK();
498
328
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
4.38k
                                                            LocalSinkStateInfo& info) {
494
4.38k
    auto local_state = LocalStateType::create_unique(this, state);
495
4.38k
    RETURN_IF_ERROR(local_state->init(state, info));
496
4.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
4.38k
    return Status::OK();
498
4.38k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.36k
                                                            LocalSinkStateInfo& info) {
494
2.36k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.36k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.36k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.36k
    return Status::OK();
498
2.36k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.24k
                                                            LocalSinkStateInfo& info) {
494
2.24k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.24k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.24k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.24k
    return Status::OK();
498
2.24k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.32k
                                                            LocalSinkStateInfo& info) {
494
2.32k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.32k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.32k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.32k
    return Status::OK();
498
2.32k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
1
                                                            LocalSinkStateInfo& info) {
494
1
    auto local_state = LocalStateType::create_unique(this, state);
495
1
    RETURN_IF_ERROR(local_state->init(state, info));
496
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
1
    return Status::OK();
498
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
163
                                                            LocalSinkStateInfo& info) {
494
163
    auto local_state = LocalStateType::create_unique(this, state);
495
163
    RETURN_IF_ERROR(local_state->init(state, info));
496
163
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
163
    return Status::OK();
498
163
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
365
                                                            LocalSinkStateInfo& info) {
494
365
    auto local_state = LocalStateType::create_unique(this, state);
495
365
    RETURN_IF_ERROR(local_state->init(state, info));
496
365
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
365
    return Status::OK();
498
365
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
104
                                                            LocalSinkStateInfo& info) {
494
104
    auto local_state = LocalStateType::create_unique(this, state);
495
104
    RETURN_IF_ERROR(local_state->init(state, info));
496
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
104
    return Status::OK();
498
104
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
150
                                                            LocalSinkStateInfo& info) {
494
150
    auto local_state = LocalStateType::create_unique(this, state);
495
150
    RETURN_IF_ERROR(local_state->init(state, info));
496
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
150
    return Status::OK();
498
150
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
150
                                                            LocalSinkStateInfo& info) {
494
150
    auto local_state = LocalStateType::create_unique(this, state);
495
150
    RETURN_IF_ERROR(local_state->init(state, info));
496
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
150
    return Status::OK();
498
150
}
499
500
template <typename LocalStateType>
501
1.60M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
0
                                 LocalExchangeSharedState>) {
504
0
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
0
                                        MultiCastSharedState>) {
507
0
        throw Exception(Status::FatalError("should not reach here!"));
508
1.60M
    } else {
509
1.60M
        auto ss = LocalStateType::SharedStateType::create_shared();
510
1.60M
        ss->id = operator_id();
511
1.60M
        for (auto& dest : dests_id()) {
512
1.59M
            ss->related_op_ids.insert(dest);
513
1.59M
        }
514
1.60M
        return ss;
515
1.60M
    }
516
1.60M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
170k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
170k
    } else {
509
170k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
170k
        ss->id = operator_id();
511
170k
        for (auto& dest : dests_id()) {
512
170k
            ss->related_op_ids.insert(dest);
513
170k
        }
514
170k
        return ss;
515
170k
    }
516
170k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
405k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
405k
    } else {
509
405k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
405k
        ss->id = operator_id();
511
405k
        for (auto& dest : dests_id()) {
512
403k
            ss->related_op_ids.insert(dest);
513
403k
        }
514
405k
        return ss;
515
405k
    }
516
405k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
3
    } else {
509
3
        auto ss = LocalStateType::SharedStateType::create_shared();
510
3
        ss->id = operator_id();
511
3
        for (auto& dest : dests_id()) {
512
3
            ss->related_op_ids.insert(dest);
513
3
        }
514
3
        return ss;
515
3
    }
516
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
339
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
339
    } else {
509
339
        auto ss = LocalStateType::SharedStateType::create_shared();
510
339
        ss->id = operator_id();
511
339
        for (auto& dest : dests_id()) {
512
338
            ss->related_op_ids.insert(dest);
513
338
        }
514
339
        return ss;
515
339
    }
516
339
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
65.5k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
65.5k
    } else {
509
65.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
65.5k
        ss->id = operator_id();
511
65.5k
        for (auto& dest : dests_id()) {
512
65.1k
            ss->related_op_ids.insert(dest);
513
65.1k
        }
514
65.5k
        return ss;
515
65.5k
    }
516
65.5k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
501
24
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
24
    } else {
509
24
        auto ss = LocalStateType::SharedStateType::create_shared();
510
24
        ss->id = operator_id();
511
24
        for (auto& dest : dests_id()) {
512
24
            ss->related_op_ids.insert(dest);
513
24
        }
514
24
        return ss;
515
24
    }
516
24
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
9.18k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
9.18k
    } else {
509
9.18k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
9.18k
        ss->id = operator_id();
511
9.18k
        for (auto& dest : dests_id()) {
512
9.16k
            ss->related_op_ids.insert(dest);
513
9.16k
        }
514
9.18k
        return ss;
515
9.18k
    }
516
9.18k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
21
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
21
    } else {
509
21
        auto ss = LocalStateType::SharedStateType::create_shared();
510
21
        ss->id = operator_id();
511
21
        for (auto& dest : dests_id()) {
512
21
            ss->related_op_ids.insert(dest);
513
21
        }
514
21
        return ss;
515
21
    }
516
21
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
196k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
196k
    } else {
509
196k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
196k
        ss->id = operator_id();
511
196k
        for (auto& dest : dests_id()) {
512
196k
            ss->related_op_ids.insert(dest);
513
196k
        }
514
196k
        return ss;
515
196k
    }
516
196k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
25
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
25
    } else {
509
25
        auto ss = LocalStateType::SharedStateType::create_shared();
510
25
        ss->id = operator_id();
511
25
        for (auto& dest : dests_id()) {
512
25
            ss->related_op_ids.insert(dest);
513
25
        }
514
25
        return ss;
515
25
    }
516
25
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
118k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
118k
    } else {
509
118k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
118k
        ss->id = operator_id();
511
118k
        for (auto& dest : dests_id()) {
512
118k
            ss->related_op_ids.insert(dest);
513
118k
        }
514
118k
        return ss;
515
118k
    }
516
118k
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
314
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
314
    } else {
509
314
        auto ss = LocalStateType::SharedStateType::create_shared();
510
314
        ss->id = operator_id();
511
314
        for (auto& dest : dests_id()) {
512
314
            ss->related_op_ids.insert(dest);
513
314
        }
514
314
        return ss;
515
314
    }
516
314
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
625k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
625k
    } else {
509
625k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
625k
        ss->id = operator_id();
511
625k
        for (auto& dest : dests_id()) {
512
622k
            ss->related_op_ids.insert(dest);
513
622k
        }
514
625k
        return ss;
515
625k
    }
516
625k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
5.28k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
5.28k
    } else {
509
5.28k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
5.28k
        ss->id = operator_id();
511
5.28k
        for (auto& dest : dests_id()) {
512
5.27k
            ss->related_op_ids.insert(dest);
513
5.27k
        }
514
5.28k
        return ss;
515
5.28k
    }
516
5.28k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
431
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
431
    } else {
509
431
        auto ss = LocalStateType::SharedStateType::create_shared();
510
431
        ss->id = operator_id();
511
431
        for (auto& dest : dests_id()) {
512
430
            ss->related_op_ids.insert(dest);
513
430
        }
514
431
        return ss;
515
431
    }
516
431
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
501
2.25k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
2.25k
    } else {
509
2.25k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.25k
        ss->id = operator_id();
511
2.25k
        for (auto& dest : dests_id()) {
512
2.24k
            ss->related_op_ids.insert(dest);
513
2.24k
        }
514
2.25k
        return ss;
515
2.25k
    }
516
2.25k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
501
2.34k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
2.34k
    } else {
509
2.34k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.34k
        ss->id = operator_id();
511
2.34k
        for (auto& dest : dests_id()) {
512
2.33k
            ss->related_op_ids.insert(dest);
513
2.33k
        }
514
2.34k
        return ss;
515
2.34k
    }
516
2.34k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
163
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
163
    } else {
509
163
        auto ss = LocalStateType::SharedStateType::create_shared();
510
163
        ss->id = operator_id();
511
163
        for (auto& dest : dests_id()) {
512
163
            ss->related_op_ids.insert(dest);
513
163
        }
514
163
        return ss;
515
163
    }
516
163
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
104
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
104
    } else {
509
104
        auto ss = LocalStateType::SharedStateType::create_shared();
510
104
        ss->id = operator_id();
511
104
        for (auto& dest : dests_id()) {
512
104
            ss->related_op_ids.insert(dest);
513
104
        }
514
104
        return ss;
515
104
    }
516
104
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
517
518
template <typename LocalStateType>
519
2.61M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.61M
    auto local_state = LocalStateType::create_unique(state, this);
521
2.61M
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.61M
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.61M
    return Status::OK();
524
2.61M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
134k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
134k
    auto local_state = LocalStateType::create_unique(state, this);
521
134k
    RETURN_IF_ERROR(local_state->init(state, info));
522
134k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
134k
    return Status::OK();
524
134k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
320k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
320k
    auto local_state = LocalStateType::create_unique(state, this);
521
320k
    RETURN_IF_ERROR(local_state->init(state, info));
522
320k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
320k
    return Status::OK();
524
320k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
76
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
76
    auto local_state = LocalStateType::create_unique(state, this);
521
76
    RETURN_IF_ERROR(local_state->init(state, info));
522
76
    state->emplace_local_state(operator_id(), std::move(local_state));
523
76
    return Status::OK();
524
76
}
_ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
4
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
4
    auto local_state = LocalStateType::create_unique(state, this);
521
4
    RETURN_IF_ERROR(local_state->init(state, info));
522
4
    state->emplace_local_state(operator_id(), std::move(local_state));
523
4
    return Status::OK();
524
4
}
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.66k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.66k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.66k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.66k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.66k
    return Status::OK();
524
2.66k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
9.11k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
9.11k
    auto local_state = LocalStateType::create_unique(state, this);
521
9.11k
    RETURN_IF_ERROR(local_state->init(state, info));
522
9.11k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
9.11k
    return Status::OK();
524
9.11k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
11.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
11.3k
    auto local_state = LocalStateType::create_unique(state, this);
521
11.3k
    RETURN_IF_ERROR(local_state->init(state, info));
522
11.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
11.3k
    return Status::OK();
524
11.3k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
20
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
20
    auto local_state = LocalStateType::create_unique(state, this);
521
20
    RETURN_IF_ERROR(local_state->init(state, info));
522
20
    state->emplace_local_state(operator_id(), std::move(local_state));
523
20
    return Status::OK();
524
20
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
184k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
184k
    auto local_state = LocalStateType::create_unique(state, this);
521
184k
    RETURN_IF_ERROR(local_state->init(state, info));
522
184k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
184k
    return Status::OK();
524
184k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
118k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
118k
    auto local_state = LocalStateType::create_unique(state, this);
521
118k
    RETURN_IF_ERROR(local_state->init(state, info));
522
118k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
118k
    return Status::OK();
524
118k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
309
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
309
    auto local_state = LocalStateType::create_unique(state, this);
521
309
    RETURN_IF_ERROR(local_state->init(state, info));
522
309
    state->emplace_local_state(operator_id(), std::move(local_state));
523
309
    return Status::OK();
524
309
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
3.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
3.72k
    auto local_state = LocalStateType::create_unique(state, this);
521
3.72k
    RETURN_IF_ERROR(local_state->init(state, info));
522
3.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
3.72k
    return Status::OK();
524
3.72k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
458k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
458k
    auto local_state = LocalStateType::create_unique(state, this);
521
458k
    RETURN_IF_ERROR(local_state->init(state, info));
522
458k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
458k
    return Status::OK();
524
458k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.10k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.10k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.10k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.10k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.10k
    return Status::OK();
524
1.10k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
5.23k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
5.23k
    auto local_state = LocalStateType::create_unique(state, this);
521
5.23k
    RETURN_IF_ERROR(local_state->init(state, info));
522
5.23k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
5.23k
    return Status::OK();
524
5.23k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
21
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
21
    auto local_state = LocalStateType::create_unique(state, this);
521
21
    RETURN_IF_ERROR(local_state->init(state, info));
522
21
    state->emplace_local_state(operator_id(), std::move(local_state));
523
21
    return Status::OK();
524
21
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.55k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.55k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.55k
    return Status::OK();
524
1.55k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
39.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
39.4k
    auto local_state = LocalStateType::create_unique(state, this);
521
39.4k
    RETURN_IF_ERROR(local_state->init(state, info));
522
39.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
39.4k
    return Status::OK();
524
39.4k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
5.93k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
5.93k
    auto local_state = LocalStateType::create_unique(state, this);
521
5.93k
    RETURN_IF_ERROR(local_state->init(state, info));
522
5.93k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
5.93k
    return Status::OK();
524
5.93k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
326
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
326
    auto local_state = LocalStateType::create_unique(state, this);
521
326
    RETURN_IF_ERROR(local_state->init(state, info));
522
326
    state->emplace_local_state(operator_id(), std::move(local_state));
523
326
    return Status::OK();
524
326
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.15k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.15k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.15k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.15k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.15k
    return Status::OK();
524
2.15k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.27k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.27k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.27k
    return Status::OK();
524
2.27k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
267
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
267
    auto local_state = LocalStateType::create_unique(state, this);
521
267
    RETURN_IF_ERROR(local_state->init(state, info));
522
267
    state->emplace_local_state(operator_id(), std::move(local_state));
523
267
    return Status::OK();
524
267
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.54k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.54k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.54k
    return Status::OK();
524
1.54k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
4.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
4.95k
    auto local_state = LocalStateType::create_unique(state, this);
521
4.95k
    RETURN_IF_ERROR(local_state->init(state, info));
522
4.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
4.95k
    return Status::OK();
524
4.95k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
722k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
722k
    auto local_state = LocalStateType::create_unique(state, this);
521
722k
    RETURN_IF_ERROR(local_state->init(state, info));
522
722k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
722k
    return Status::OK();
524
722k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
366
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
366
    auto local_state = LocalStateType::create_unique(state, this);
521
366
    RETURN_IF_ERROR(local_state->init(state, info));
522
366
    state->emplace_local_state(operator_id(), std::move(local_state));
523
366
    return Status::OK();
524
366
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
150
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
150
    auto local_state = LocalStateType::create_unique(state, this);
521
150
    RETURN_IF_ERROR(local_state->init(state, info));
522
150
    state->emplace_local_state(operator_id(), std::move(local_state));
523
150
    return Status::OK();
524
150
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.85k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.85k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.85k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.85k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.85k
    return Status::OK();
524
1.85k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
671
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
671
    auto local_state = LocalStateType::create_unique(state, this);
521
671
    RETURN_IF_ERROR(local_state->init(state, info));
522
671
    state->emplace_local_state(operator_id(), std::move(local_state));
523
671
    return Status::OK();
524
671
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.05k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.05k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.05k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.05k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.05k
    return Status::OK();
524
1.05k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
8.29k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
8.29k
    auto local_state = LocalStateType::create_unique(state, this);
521
8.29k
    RETURN_IF_ERROR(local_state->init(state, info));
522
8.29k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
8.29k
    return Status::OK();
524
8.29k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
574k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
574k
    auto local_state = LocalStateType::create_unique(state, this);
521
574k
    RETURN_IF_ERROR(local_state->init(state, info));
522
574k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
574k
    return Status::OK();
524
574k
}
525
526
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
527
                                                         RuntimeState* state)
528
1.96M
        : _parent(parent), _state(state) {}
529
530
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
531
2.61M
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
532
533
template <typename SharedStateArg>
534
2.61M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
2.61M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
2.61M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
2.61M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
2.61M
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
2.61M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
2.61M
    _operator_profile->add_child(_common_profile.get(), true);
543
2.61M
    _operator_profile->add_child(_custom_profile.get(), true);
544
2.61M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
2.61M
    if constexpr (!is_fake_shared) {
546
1.23M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
734k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
734k
                                    .first.get()
549
734k
                                    ->template cast<SharedStateArg>();
550
551
734k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
734k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
734k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
734k
        } else if (info.shared_state) {
555
459k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
0
                DCHECK(false);
557
0
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
459k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
459k
            _dependency = _shared_state->create_source_dependency(
562
459k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
459k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
459k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
459k
        } else {
566
44.4k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
1.30k
                DCHECK(false);
568
1.30k
            }
569
44.4k
        }
570
1.23M
    }
571
572
2.61M
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
2.61M
    _rows_returned_counter =
577
2.61M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
2.61M
    _blocks_returned_counter =
579
2.61M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
2.61M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
2.61M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
2.61M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
2.61M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
2.61M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
2.61M
    _memory_used_counter =
586
2.61M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
2.61M
    _common_profile->add_info_string("IsColocate",
588
2.61M
                                     std::to_string(_parent->is_colocated_operator()));
589
2.61M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
2.61M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
2.61M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
2.61M
    return Status::OK();
593
2.61M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
135k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
135k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
135k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
135k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
135k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
135k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
135k
    _operator_profile->add_child(_common_profile.get(), true);
543
135k
    _operator_profile->add_child(_custom_profile.get(), true);
544
135k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
135k
    if constexpr (!is_fake_shared) {
546
135k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
13.0k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
13.0k
                                    .first.get()
549
13.0k
                                    ->template cast<SharedStateArg>();
550
551
13.0k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
13.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
13.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
122k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
120k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
120k
            _dependency = _shared_state->create_source_dependency(
562
120k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
120k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
120k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
120k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
1.57k
        }
570
135k
    }
571
572
135k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
135k
    _rows_returned_counter =
577
135k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
135k
    _blocks_returned_counter =
579
135k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
135k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
135k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
135k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
135k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
135k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
135k
    _memory_used_counter =
586
135k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
135k
    _common_profile->add_info_string("IsColocate",
588
135k
                                     std::to_string(_parent->is_colocated_operator()));
589
135k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
135k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
135k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
135k
    return Status::OK();
593
135k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
1
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
1
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
1
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
1
    _operator_profile->add_child(_common_profile.get(), true);
543
1
    _operator_profile->add_child(_custom_profile.get(), true);
544
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
1
    if constexpr (!is_fake_shared) {
546
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
1
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
1
            _dependency = _shared_state->create_source_dependency(
562
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
1
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
1
    }
571
572
1
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
1
    _rows_returned_counter =
577
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
1
    _blocks_returned_counter =
579
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
1
    _memory_used_counter =
586
1
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
1
    _common_profile->add_info_string("IsColocate",
588
1
                                     std::to_string(_parent->is_colocated_operator()));
589
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
1
    return Status::OK();
593
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
196k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
196k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
196k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
196k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
196k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
196k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
196k
    _operator_profile->add_child(_common_profile.get(), true);
543
196k
    _operator_profile->add_child(_custom_profile.get(), true);
544
196k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
196k
    if constexpr (!is_fake_shared) {
546
196k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
196k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
192k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
192k
            _dependency = _shared_state->create_source_dependency(
562
192k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
192k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
192k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
192k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
3.83k
        }
570
196k
    }
571
572
196k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
196k
    _rows_returned_counter =
577
196k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
196k
    _blocks_returned_counter =
579
196k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
196k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
196k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
196k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
196k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
196k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
196k
    _memory_used_counter =
586
196k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
196k
    _common_profile->add_info_string("IsColocate",
588
196k
                                     std::to_string(_parent->is_colocated_operator()));
589
196k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
196k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
196k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
196k
    return Status::OK();
593
196k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
20
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
20
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
20
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
20
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
20
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
20
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
20
    _operator_profile->add_child(_common_profile.get(), true);
543
20
    _operator_profile->add_child(_custom_profile.get(), true);
544
20
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
20
    if constexpr (!is_fake_shared) {
546
20
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
20
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
20
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
20
            _dependency = _shared_state->create_source_dependency(
562
20
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
20
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
20
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
20
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
20
    }
571
572
20
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
20
    _rows_returned_counter =
577
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
20
    _blocks_returned_counter =
579
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
20
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
20
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
20
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
20
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
20
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
20
    _memory_used_counter =
586
20
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
20
    _common_profile->add_info_string("IsColocate",
588
20
                                     std::to_string(_parent->is_colocated_operator()));
589
20
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
20
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
20
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
20
    return Status::OK();
593
20
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
5.21k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
5.21k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
5.21k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
5.21k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
5.21k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
5.21k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
5.21k
    _operator_profile->add_child(_common_profile.get(), true);
543
5.21k
    _operator_profile->add_child(_custom_profile.get(), true);
544
5.21k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
5.21k
    if constexpr (!is_fake_shared) {
546
5.21k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
5.21k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
5.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
5.19k
            _dependency = _shared_state->create_source_dependency(
562
5.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
5.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
5.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
5.19k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
24
        }
570
5.21k
    }
571
572
5.21k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
5.21k
    _rows_returned_counter =
577
5.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
5.21k
    _blocks_returned_counter =
579
5.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
5.21k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
5.21k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
5.21k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
5.21k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
5.21k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
5.21k
    _memory_used_counter =
586
5.21k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
5.21k
    _common_profile->add_info_string("IsColocate",
588
5.21k
                                     std::to_string(_parent->is_colocated_operator()));
589
5.21k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
5.21k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
5.21k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
5.21k
    return Status::OK();
593
5.21k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
9.11k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
9.11k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
9.11k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
9.11k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
9.11k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
9.11k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
9.11k
    _operator_profile->add_child(_common_profile.get(), true);
543
9.11k
    _operator_profile->add_child(_custom_profile.get(), true);
544
9.11k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
9.11k
    if constexpr (!is_fake_shared) {
546
9.11k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
9.11k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
8.98k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
8.98k
            _dependency = _shared_state->create_source_dependency(
562
8.98k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
8.98k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
8.98k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
8.98k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
122
        }
570
9.11k
    }
571
572
9.11k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
9.11k
    _rows_returned_counter =
577
9.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
9.11k
    _blocks_returned_counter =
579
9.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
9.11k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
9.11k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
9.11k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
9.11k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
9.11k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
9.11k
    _memory_used_counter =
586
9.11k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
9.11k
    _common_profile->add_info_string("IsColocate",
588
9.11k
                                     std::to_string(_parent->is_colocated_operator()));
589
9.11k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
9.11k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
9.11k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
9.11k
    return Status::OK();
593
9.11k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
118k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
118k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
118k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
118k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
118k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
118k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
118k
    _operator_profile->add_child(_common_profile.get(), true);
543
118k
    _operator_profile->add_child(_custom_profile.get(), true);
544
118k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
118k
    if constexpr (!is_fake_shared) {
546
118k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
118k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
117k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
117k
            _dependency = _shared_state->create_source_dependency(
562
117k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
117k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
117k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
117k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
987
        }
570
118k
    }
571
572
118k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
118k
    _rows_returned_counter =
577
118k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
118k
    _blocks_returned_counter =
579
118k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
118k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
118k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
118k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
118k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
118k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
118k
    _memory_used_counter =
586
118k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
118k
    _common_profile->add_info_string("IsColocate",
588
118k
                                     std::to_string(_parent->is_colocated_operator()));
589
118k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
118k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
118k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
118k
    return Status::OK();
593
118k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
309
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
309
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
309
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
309
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
309
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
309
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
309
    _operator_profile->add_child(_common_profile.get(), true);
543
309
    _operator_profile->add_child(_custom_profile.get(), true);
544
309
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
309
    if constexpr (!is_fake_shared) {
546
309
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
309
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
309
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
309
            _dependency = _shared_state->create_source_dependency(
562
309
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
309
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
309
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
309
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
309
    }
571
572
309
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
309
    _rows_returned_counter =
577
309
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
309
    _blocks_returned_counter =
579
309
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
309
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
309
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
309
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
309
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
309
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
309
    _memory_used_counter =
586
309
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
309
    _common_profile->add_info_string("IsColocate",
588
309
                                     std::to_string(_parent->is_colocated_operator()));
589
309
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
309
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
309
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
309
    return Status::OK();
593
309
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
1.37M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
1.37M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
1.37M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
1.37M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
1.37M
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
1.37M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
1.37M
    _operator_profile->add_child(_common_profile.get(), true);
543
1.37M
    _operator_profile->add_child(_custom_profile.get(), true);
544
1.37M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
    if constexpr (!is_fake_shared) {
546
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
                                    .first.get()
549
                                    ->template cast<SharedStateArg>();
550
551
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
            _dependency = _shared_state->create_source_dependency(
562
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
        }
570
    }
571
572
1.37M
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
1.37M
    _rows_returned_counter =
577
1.37M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
1.37M
    _blocks_returned_counter =
579
1.37M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
1.37M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
1.37M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
1.37M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
1.37M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
1.37M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
1.37M
    _memory_used_counter =
586
1.37M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
1.37M
    _common_profile->add_info_string("IsColocate",
588
1.37M
                                     std::to_string(_parent->is_colocated_operator()));
589
1.37M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
1.37M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
1.37M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
1.37M
    return Status::OK();
593
1.37M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
39.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
39.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
39.4k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
39.4k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
39.4k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
39.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
39.4k
    _operator_profile->add_child(_common_profile.get(), true);
543
39.4k
    _operator_profile->add_child(_custom_profile.get(), true);
544
39.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
39.4k
    if constexpr (!is_fake_shared) {
546
39.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
39.4k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
3.23k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
3.23k
            _dependency = _shared_state->create_source_dependency(
562
3.23k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
3.23k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
3.23k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
36.1k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
36.1k
        }
570
39.4k
    }
571
572
39.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
39.4k
    _rows_returned_counter =
577
39.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
39.4k
    _blocks_returned_counter =
579
39.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
39.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
39.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
39.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
39.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
39.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
39.4k
    _memory_used_counter =
586
39.4k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
39.4k
    _common_profile->add_info_string("IsColocate",
588
39.4k
                                     std::to_string(_parent->is_colocated_operator()));
589
39.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
39.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
39.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
39.4k
    return Status::OK();
593
39.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
368
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
368
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
368
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
368
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
368
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
368
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
368
    _operator_profile->add_child(_common_profile.get(), true);
543
368
    _operator_profile->add_child(_custom_profile.get(), true);
544
368
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
368
    if constexpr (!is_fake_shared) {
546
368
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
369
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
369
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
369
            _dependency = _shared_state->create_source_dependency(
562
369
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
369
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
369
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
18.4E
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
18.4E
        }
570
368
    }
571
572
369
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
368
    _rows_returned_counter =
577
368
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
368
    _blocks_returned_counter =
579
368
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
368
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
368
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
368
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
368
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
368
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
368
    _memory_used_counter =
586
368
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
368
    _common_profile->add_info_string("IsColocate",
588
368
                                     std::to_string(_parent->is_colocated_operator()));
589
368
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
368
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
368
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
368
    return Status::OK();
593
368
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
5.93k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
5.93k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
5.93k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
5.93k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
5.93k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
5.93k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
5.93k
    _operator_profile->add_child(_common_profile.get(), true);
543
5.93k
    _operator_profile->add_child(_custom_profile.get(), true);
544
5.93k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
5.93k
    if constexpr (!is_fake_shared) {
546
5.93k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
5.93k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
5.92k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
5.92k
            _dependency = _shared_state->create_source_dependency(
562
5.92k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
5.92k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
5.92k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
5.92k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
14
        }
570
5.93k
    }
571
572
5.93k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
5.93k
    _rows_returned_counter =
577
5.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
5.93k
    _blocks_returned_counter =
579
5.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
5.93k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
5.93k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
5.93k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
5.93k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
5.93k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
5.93k
    _memory_used_counter =
586
5.93k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
5.93k
    _common_profile->add_info_string("IsColocate",
588
5.93k
                                     std::to_string(_parent->is_colocated_operator()));
589
5.93k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
5.93k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
5.93k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
5.93k
    return Status::OK();
593
5.93k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
431
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
431
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
431
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
431
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
431
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
431
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
431
    _operator_profile->add_child(_common_profile.get(), true);
543
431
    _operator_profile->add_child(_custom_profile.get(), true);
544
431
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
431
    if constexpr (!is_fake_shared) {
546
431
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
431
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
427
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
427
            _dependency = _shared_state->create_source_dependency(
562
427
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
427
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
427
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
427
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
4
        }
570
431
    }
571
572
431
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
431
    _rows_returned_counter =
577
431
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
431
    _blocks_returned_counter =
579
431
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
431
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
431
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
431
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
431
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
431
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
431
    _memory_used_counter =
586
431
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
431
    _common_profile->add_info_string("IsColocate",
588
431
                                     std::to_string(_parent->is_colocated_operator()));
589
431
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
431
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
431
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
431
    return Status::OK();
593
431
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
4.53k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
4.53k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
4.53k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
4.53k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
4.53k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
4.53k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
4.53k
    _operator_profile->add_child(_common_profile.get(), true);
543
4.53k
    _operator_profile->add_child(_custom_profile.get(), true);
544
4.53k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
4.53k
    if constexpr (!is_fake_shared) {
546
4.53k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
4.53k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
4.12k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
4.12k
            _dependency = _shared_state->create_source_dependency(
562
4.12k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
4.12k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
4.12k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
4.12k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
412
        }
570
4.53k
    }
571
572
4.53k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
4.53k
    _rows_returned_counter =
577
4.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
4.53k
    _blocks_returned_counter =
579
4.53k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
4.53k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
4.53k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
4.53k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
4.53k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
4.53k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
4.53k
    _memory_used_counter =
586
4.53k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
4.53k
    _common_profile->add_info_string("IsColocate",
588
4.53k
                                     std::to_string(_parent->is_colocated_operator()));
589
4.53k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
4.53k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
4.53k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
4.53k
    return Status::OK();
593
4.53k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
722k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
722k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
722k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
722k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
722k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
722k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
722k
    _operator_profile->add_child(_common_profile.get(), true);
543
722k
    _operator_profile->add_child(_custom_profile.get(), true);
544
722k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
722k
    if constexpr (!is_fake_shared) {
546
722k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
721k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
721k
                                    .first.get()
549
721k
                                    ->template cast<SharedStateArg>();
550
551
721k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
721k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
721k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
721k
        } else if (info.shared_state) {
555
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
0
                DCHECK(false);
557
0
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
0
            _dependency = _shared_state->create_source_dependency(
562
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
1.30k
        } else {
566
1.30k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
1.30k
                DCHECK(false);
568
1.30k
            }
569
1.30k
        }
570
722k
    }
571
572
722k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
722k
    _rows_returned_counter =
577
722k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
722k
    _blocks_returned_counter =
579
722k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
722k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
722k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
722k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
722k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
722k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
722k
    _memory_used_counter =
586
722k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
722k
    _common_profile->add_info_string("IsColocate",
588
722k
                                     std::to_string(_parent->is_colocated_operator()));
589
722k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
722k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
722k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
722k
    return Status::OK();
593
722k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
150
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
150
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
150
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
150
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
150
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
150
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
150
    _operator_profile->add_child(_common_profile.get(), true);
543
150
    _operator_profile->add_child(_custom_profile.get(), true);
544
150
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
150
    if constexpr (!is_fake_shared) {
546
150
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
150
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
150
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
150
            _dependency = _shared_state->create_source_dependency(
562
150
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
150
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
150
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
150
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
150
    }
571
572
150
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
150
    _rows_returned_counter =
577
150
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
150
    _blocks_returned_counter =
579
150
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
150
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
150
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
150
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
150
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
150
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
150
    _memory_used_counter =
586
150
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
150
    _common_profile->add_info_string("IsColocate",
588
150
                                     std::to_string(_parent->is_colocated_operator()));
589
150
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
150
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
150
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
150
    return Status::OK();
593
150
}
594
595
template <typename SharedStateArg>
596
2.63M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
2.63M
    _conjuncts.resize(_parent->_conjuncts.size());
598
2.63M
    _projections.resize(_parent->_projections.size());
599
2.96M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
331k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
331k
    }
602
5.17M
    for (size_t i = 0; i < _projections.size(); i++) {
603
2.54M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
2.54M
    }
605
2.63M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
2.63M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
6.79k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
43.4k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
36.6k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
36.6k
                    state, _intermediate_projections[i][j]));
611
36.6k
        }
612
6.79k
    }
613
2.63M
    return Status::OK();
614
2.63M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
135k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
135k
    _conjuncts.resize(_parent->_conjuncts.size());
598
135k
    _projections.resize(_parent->_projections.size());
599
136k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.21k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.21k
    }
602
696k
    for (size_t i = 0; i < _projections.size(); i++) {
603
561k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
561k
    }
605
135k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
136k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
634
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
6.05k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
5.41k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
5.41k
                    state, _intermediate_projections[i][j]));
611
5.41k
        }
612
634
    }
613
135k
    return Status::OK();
614
135k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
1
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
1
    _conjuncts.resize(_parent->_conjuncts.size());
598
1
    _projections.resize(_parent->_projections.size());
599
1
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
1
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
1
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
1
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
1
    return Status::OK();
614
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
197k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
197k
    _conjuncts.resize(_parent->_conjuncts.size());
598
197k
    _projections.resize(_parent->_projections.size());
599
197k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
215k
    for (size_t i = 0; i < _projections.size(); i++) {
603
18.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
18.4k
    }
605
197k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
197k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
197k
    return Status::OK();
614
197k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
19
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
19
    _conjuncts.resize(_parent->_conjuncts.size());
598
19
    _projections.resize(_parent->_projections.size());
599
19
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
19
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
19
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
19
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
19
    return Status::OK();
614
19
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
5.29k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
5.29k
    _conjuncts.resize(_parent->_conjuncts.size());
598
5.29k
    _projections.resize(_parent->_projections.size());
599
5.33k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
45
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
45
    }
602
24.9k
    for (size_t i = 0; i < _projections.size(); i++) {
603
19.6k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
19.6k
    }
605
5.29k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
5.31k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
25
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
294
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
269
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
269
                    state, _intermediate_projections[i][j]));
611
269
        }
612
25
    }
613
5.29k
    return Status::OK();
614
5.29k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
9.18k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
9.18k
    _conjuncts.resize(_parent->_conjuncts.size());
598
9.18k
    _projections.resize(_parent->_projections.size());
599
9.95k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
766
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
766
    }
602
24.7k
    for (size_t i = 0; i < _projections.size(); i++) {
603
15.6k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
15.6k
    }
605
9.18k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
9.36k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
173
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.29k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
1.12k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
1.12k
                    state, _intermediate_projections[i][j]));
611
1.12k
        }
612
173
    }
613
9.18k
    return Status::OK();
614
9.18k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
118k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
118k
    _conjuncts.resize(_parent->_conjuncts.size());
598
118k
    _projections.resize(_parent->_projections.size());
599
120k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.87k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.87k
    }
602
437k
    for (size_t i = 0; i < _projections.size(); i++) {
603
318k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
318k
    }
605
118k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
119k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
206
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.77k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
1.57k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
1.57k
                    state, _intermediate_projections[i][j]));
611
1.57k
        }
612
206
    }
613
118k
    return Status::OK();
614
118k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
312
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
312
    _conjuncts.resize(_parent->_conjuncts.size());
598
312
    _projections.resize(_parent->_projections.size());
599
312
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
754
    for (size_t i = 0; i < _projections.size(); i++) {
603
442
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
442
    }
605
312
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
312
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
312
    return Status::OK();
614
312
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
1.38M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
1.38M
    _conjuncts.resize(_parent->_conjuncts.size());
598
1.38M
    _projections.resize(_parent->_projections.size());
599
1.71M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
326k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
326k
    }
602
2.89M
    for (size_t i = 0; i < _projections.size(); i++) {
603
1.51M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
1.51M
    }
605
1.38M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
1.39M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
5.75k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
34.0k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
28.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
28.2k
                    state, _intermediate_projections[i][j]));
611
28.2k
        }
612
5.75k
    }
613
1.38M
    return Status::OK();
614
1.38M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
39.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
39.5k
    _conjuncts.resize(_parent->_conjuncts.size());
598
39.5k
    _projections.resize(_parent->_projections.size());
599
39.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
132k
    for (size_t i = 0; i < _projections.size(); i++) {
603
93.3k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
93.3k
    }
605
39.5k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
39.5k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
39.5k
    return Status::OK();
614
39.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
369
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
369
    _conjuncts.resize(_parent->_conjuncts.size());
598
369
    _projections.resize(_parent->_projections.size());
599
369
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
369
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
369
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
369
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
369
    return Status::OK();
614
369
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
5.92k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
5.92k
    _conjuncts.resize(_parent->_conjuncts.size());
598
5.92k
    _projections.resize(_parent->_projections.size());
599
6.62k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
697
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
697
    }
602
5.92k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
5.92k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
5.92k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
5.92k
    return Status::OK();
614
5.92k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
432
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
432
    _conjuncts.resize(_parent->_conjuncts.size());
598
432
    _projections.resize(_parent->_projections.size());
599
432
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
432
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
432
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
432
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
432
    return Status::OK();
614
432
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
4.62k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
4.62k
    _conjuncts.resize(_parent->_conjuncts.size());
598
4.62k
    _projections.resize(_parent->_projections.size());
599
4.62k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
4.62k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
4.62k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
4.62k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
4.62k
    return Status::OK();
614
4.62k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
728k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
728k
    _conjuncts.resize(_parent->_conjuncts.size());
598
728k
    _projections.resize(_parent->_projections.size());
599
728k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
728k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
728k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
728k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
728k
    return Status::OK();
614
728k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
150
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
150
    _conjuncts.resize(_parent->_conjuncts.size());
598
150
    _projections.resize(_parent->_projections.size());
599
157
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
7
    }
602
443
    for (size_t i = 0; i < _projections.size(); i++) {
603
293
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
293
    }
605
150
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
151
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
2
                    state, _intermediate_projections[i][j]));
611
2
        }
612
1
    }
613
150
    return Status::OK();
614
150
}
615
616
template <typename SharedStateArg>
617
8.83k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
8.83k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
8.83k
    _terminated = true;
622
8.83k
    return Status::OK();
623
8.83k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
1.61k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
1.61k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
1.61k
    _terminated = true;
622
1.61k
    return Status::OK();
623
1.61k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
115
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
115
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
115
    _terminated = true;
622
115
    return Status::OK();
623
115
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
284
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
284
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
284
    _terminated = true;
622
284
    return Status::OK();
623
284
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
1
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
1
    _terminated = true;
622
1
    return Status::OK();
623
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
353
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
353
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
353
    _terminated = true;
622
353
    return Status::OK();
623
353
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
5.36k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
5.36k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
5.36k
    _terminated = true;
622
5.36k
    return Status::OK();
623
5.36k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
6
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
6
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
6
    _terminated = true;
622
6
    return Status::OK();
623
6
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
18
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
18
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
18
    _terminated = true;
622
18
    return Status::OK();
623
18
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
243
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
243
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
243
    _terminated = true;
622
243
    return Status::OK();
623
243
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
822
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
822
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
822
    _terminated = true;
622
822
    return Status::OK();
623
822
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
16
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
16
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
16
    _terminated = true;
622
16
    return Status::OK();
623
16
}
624
625
template <typename SharedStateArg>
626
2.85M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
2.85M
    if (_closed) {
628
225k
        return Status::OK();
629
225k
    }
630
2.63M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
1.24M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
1.24M
    }
633
2.63M
    _closed = true;
634
2.63M
    return Status::OK();
635
2.85M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
135k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
135k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
135k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
135k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
135k
    }
633
135k
    _closed = true;
634
135k
    return Status::OK();
635
135k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
1
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
1
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
1
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
1
    }
633
1
    _closed = true;
634
1
    return Status::OK();
635
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
392k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
392k
    if (_closed) {
628
196k
        return Status::OK();
629
196k
    }
630
196k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
196k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
196k
    }
633
196k
    _closed = true;
634
196k
    return Status::OK();
635
392k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
20
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
20
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
20
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
20
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
20
    }
633
20
    _closed = true;
634
20
    return Status::OK();
635
20
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
5.29k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
5.29k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
5.29k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
5.29k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
5.29k
    }
633
5.29k
    _closed = true;
634
5.29k
    return Status::OK();
635
5.29k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
18.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
18.4k
    if (_closed) {
628
9.30k
        return Status::OK();
629
9.30k
    }
630
9.16k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
9.16k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
9.16k
    }
633
9.16k
    _closed = true;
634
9.16k
    return Status::OK();
635
18.4k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
118k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
118k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
118k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
118k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
118k
    }
633
118k
    _closed = true;
634
118k
    return Status::OK();
635
118k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
308
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
308
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
308
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
308
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
308
    }
633
308
    _closed = true;
634
308
    return Status::OK();
635
308
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
1.40M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
1.40M
    if (_closed) {
628
13.8k
        return Status::OK();
629
13.8k
    }
630
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
    }
633
1.38M
    _closed = true;
634
1.38M
    return Status::OK();
635
1.40M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
39.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
39.5k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
39.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
39.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
39.5k
    }
633
39.5k
    _closed = true;
634
39.5k
    return Status::OK();
635
39.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
730
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
730
    if (_closed) {
628
366
        return Status::OK();
629
366
    }
630
364
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
364
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
364
    }
633
364
    _closed = true;
634
364
    return Status::OK();
635
730
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
5.91k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
5.91k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
5.91k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
5.91k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
5.91k
    }
633
5.91k
    _closed = true;
634
5.91k
    return Status::OK();
635
5.91k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
659
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
659
    if (_closed) {
628
330
        return Status::OK();
629
330
    }
630
329
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
329
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
329
    }
633
329
    _closed = true;
634
329
    return Status::OK();
635
659
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
9.27k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
9.27k
    if (_closed) {
628
4.65k
        return Status::OK();
629
4.65k
    }
630
4.61k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
4.61k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
4.61k
    }
633
4.61k
    _closed = true;
634
4.61k
    return Status::OK();
635
9.27k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
730k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
730k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
730k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
730k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
730k
    }
633
730k
    _closed = true;
634
730k
    return Status::OK();
635
730k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
306
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
306
    if (_closed) {
628
158
        return Status::OK();
629
158
    }
630
148
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
148
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
148
    }
633
148
    _closed = true;
634
148
    return Status::OK();
635
306
}
636
637
template <typename SharedState>
638
1.96M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
1.96M
    _operator_profile =
641
1.96M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
1.96M
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
1.96M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
1.96M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
1.96M
    _operator_profile->add_child(_common_profile, true);
650
1.96M
    _operator_profile->add_child(_custom_profile, true);
651
652
1.96M
    _operator_profile->set_metadata(_parent->node_id());
653
1.96M
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
1.96M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
1.96M
    if constexpr (!is_fake_shared) {
656
1.34M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
1.34M
            info.shared_state_map.end()) {
658
344k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
330k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
330k
            }
661
344k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
344k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
344k
                                                  ? 0
664
344k
                                                  : info.task_idx]
665
344k
                                  .get();
666
344k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
996k
        } else {
668
996k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
513
                DCHECK(false);
670
513
            }
671
996k
            _shared_state = info.shared_state->template cast<SharedState>();
672
996k
            _dependency = _shared_state->create_sink_dependency(
673
996k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
996k
        }
675
1.34M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
1.34M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
1.34M
    }
678
679
1.96M
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
1.96M
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
1.96M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
1.96M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
1.96M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
1.96M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
1.96M
    _memory_used_counter =
689
1.96M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
1.96M
    _common_profile->add_info_string("IsColocate",
691
1.96M
                                     std::to_string(_parent->is_colocated_operator()));
692
1.96M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
1.96M
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
1.96M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
1.96M
    return Status::OK();
696
1.96M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
183k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
183k
    _operator_profile =
641
183k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
183k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
183k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
183k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
183k
    _operator_profile->add_child(_common_profile, true);
650
183k
    _operator_profile->add_child(_custom_profile, true);
651
652
183k
    _operator_profile->set_metadata(_parent->node_id());
653
183k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
183k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
183k
    if constexpr (!is_fake_shared) {
656
183k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
183k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
13.0k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
13.0k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
13.0k
                                                  ? 0
664
13.0k
                                                  : info.task_idx]
665
13.0k
                                  .get();
666
13.0k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
170k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
170k
            _shared_state = info.shared_state->template cast<SharedState>();
672
170k
            _dependency = _shared_state->create_sink_dependency(
673
170k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
170k
        }
675
183k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
183k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
183k
    }
678
679
183k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
183k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
183k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
183k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
183k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
183k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
183k
    _memory_used_counter =
689
183k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
183k
    _common_profile->add_info_string("IsColocate",
691
183k
                                     std::to_string(_parent->is_colocated_operator()));
692
183k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
183k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
183k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
183k
    return Status::OK();
696
183k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
2
    _operator_profile =
641
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
2
    _operator_profile->add_child(_common_profile, true);
650
2
    _operator_profile->add_child(_custom_profile, true);
651
652
2
    _operator_profile->set_metadata(_parent->node_id());
653
2
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
2
    if constexpr (!is_fake_shared) {
656
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
2
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
2
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
2
            _shared_state = info.shared_state->template cast<SharedState>();
672
2
            _dependency = _shared_state->create_sink_dependency(
673
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
2
        }
675
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
2
    }
678
679
2
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
2
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
2
    _memory_used_counter =
689
2
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
2
    _common_profile->add_info_string("IsColocate",
691
2
                                     std::to_string(_parent->is_colocated_operator()));
692
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
2
    return Status::OK();
696
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
196k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
196k
    _operator_profile =
641
196k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
196k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
196k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
196k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
196k
    _operator_profile->add_child(_common_profile, true);
650
196k
    _operator_profile->add_child(_custom_profile, true);
651
652
196k
    _operator_profile->set_metadata(_parent->node_id());
653
196k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
196k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
196k
    if constexpr (!is_fake_shared) {
656
196k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
196k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
196k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
196k
            _shared_state = info.shared_state->template cast<SharedState>();
672
196k
            _dependency = _shared_state->create_sink_dependency(
673
196k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
196k
        }
675
196k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
196k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
196k
    }
678
679
196k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
196k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
196k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
196k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
196k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
196k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
196k
    _memory_used_counter =
689
196k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
196k
    _common_profile->add_info_string("IsColocate",
691
196k
                                     std::to_string(_parent->is_colocated_operator()));
692
196k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
196k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
196k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
196k
    return Status::OK();
696
196k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
23
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
23
    _operator_profile =
641
23
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
23
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
23
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
23
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
23
    _operator_profile->add_child(_common_profile, true);
650
23
    _operator_profile->add_child(_custom_profile, true);
651
652
23
    _operator_profile->set_metadata(_parent->node_id());
653
23
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
23
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
23
    if constexpr (!is_fake_shared) {
656
23
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
23
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
23
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
23
            _shared_state = info.shared_state->template cast<SharedState>();
672
23
            _dependency = _shared_state->create_sink_dependency(
673
23
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
23
        }
675
23
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
23
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
23
    }
678
679
23
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
23
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
23
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
23
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
23
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
23
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
23
    _memory_used_counter =
689
23
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
23
    _common_profile->add_info_string("IsColocate",
691
23
                                     std::to_string(_parent->is_colocated_operator()));
692
23
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
23
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
23
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
23
    return Status::OK();
696
23
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
5.28k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
5.28k
    _operator_profile =
641
5.28k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
5.28k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
5.28k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
5.28k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
5.28k
    _operator_profile->add_child(_common_profile, true);
650
5.28k
    _operator_profile->add_child(_custom_profile, true);
651
652
5.28k
    _operator_profile->set_metadata(_parent->node_id());
653
5.28k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
5.28k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
5.28k
    if constexpr (!is_fake_shared) {
656
5.28k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
5.28k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
5.28k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
5.28k
            _shared_state = info.shared_state->template cast<SharedState>();
672
5.28k
            _dependency = _shared_state->create_sink_dependency(
673
5.28k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
5.28k
        }
675
5.28k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
5.28k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
5.28k
    }
678
679
5.28k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
5.28k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
5.28k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
5.28k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
5.28k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
5.28k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
5.28k
    _memory_used_counter =
689
5.28k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
5.28k
    _common_profile->add_info_string("IsColocate",
691
5.28k
                                     std::to_string(_parent->is_colocated_operator()));
692
5.28k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
5.28k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
5.28k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
5.28k
    return Status::OK();
696
5.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
9.17k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
9.17k
    _operator_profile =
641
9.17k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
9.17k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
9.17k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
9.17k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
9.17k
    _operator_profile->add_child(_common_profile, true);
650
9.17k
    _operator_profile->add_child(_custom_profile, true);
651
652
9.17k
    _operator_profile->set_metadata(_parent->node_id());
653
9.17k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
9.17k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
9.17k
    if constexpr (!is_fake_shared) {
656
9.17k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
9.17k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
9.17k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
9.17k
            _shared_state = info.shared_state->template cast<SharedState>();
672
9.17k
            _dependency = _shared_state->create_sink_dependency(
673
9.17k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
9.17k
        }
675
9.17k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
9.17k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
9.17k
    }
678
679
9.17k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
9.17k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
9.17k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
9.17k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
9.17k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
9.17k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
9.17k
    _memory_used_counter =
689
9.17k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
9.17k
    _common_profile->add_info_string("IsColocate",
691
9.17k
                                     std::to_string(_parent->is_colocated_operator()));
692
9.17k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
9.17k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
9.17k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
9.17k
    return Status::OK();
696
9.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
118k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
118k
    _operator_profile =
641
118k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
118k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
118k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
118k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
118k
    _operator_profile->add_child(_common_profile, true);
650
118k
    _operator_profile->add_child(_custom_profile, true);
651
652
118k
    _operator_profile->set_metadata(_parent->node_id());
653
118k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
118k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
118k
    if constexpr (!is_fake_shared) {
656
118k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
118k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
118k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
118k
            _shared_state = info.shared_state->template cast<SharedState>();
672
118k
            _dependency = _shared_state->create_sink_dependency(
673
118k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
118k
        }
675
118k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
118k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
118k
    }
678
679
118k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
118k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
118k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
118k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
118k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
118k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
118k
    _memory_used_counter =
689
118k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
118k
    _common_profile->add_info_string("IsColocate",
691
118k
                                     std::to_string(_parent->is_colocated_operator()));
692
118k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
118k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
118k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
118k
    return Status::OK();
696
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
315
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
315
    _operator_profile =
641
315
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
315
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
315
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
315
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
315
    _operator_profile->add_child(_common_profile, true);
650
315
    _operator_profile->add_child(_custom_profile, true);
651
652
315
    _operator_profile->set_metadata(_parent->node_id());
653
315
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
315
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
315
    if constexpr (!is_fake_shared) {
656
315
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
315
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
315
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
315
            _shared_state = info.shared_state->template cast<SharedState>();
672
315
            _dependency = _shared_state->create_sink_dependency(
673
315
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
315
        }
675
315
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
315
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
315
    }
678
679
315
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
315
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
315
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
315
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
315
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
315
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
315
    _memory_used_counter =
689
315
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
315
    _common_profile->add_info_string("IsColocate",
691
315
                                     std::to_string(_parent->is_colocated_operator()));
692
315
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
315
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
315
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
315
    return Status::OK();
696
315
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
626k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
626k
    _operator_profile =
641
626k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
626k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
626k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
626k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
626k
    _operator_profile->add_child(_common_profile, true);
650
626k
    _operator_profile->add_child(_custom_profile, true);
651
652
626k
    _operator_profile->set_metadata(_parent->node_id());
653
626k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
626k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
    if constexpr (!is_fake_shared) {
656
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
                                                  ? 0
664
                                                  : info.task_idx]
665
                                  .get();
666
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
            _shared_state = info.shared_state->template cast<SharedState>();
672
            _dependency = _shared_state->create_sink_dependency(
673
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
        }
675
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
    }
678
679
626k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
626k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
626k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
626k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
626k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
626k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
626k
    _memory_used_counter =
689
626k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
626k
    _common_profile->add_info_string("IsColocate",
691
626k
                                     std::to_string(_parent->is_colocated_operator()));
692
626k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
626k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
626k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
626k
    return Status::OK();
696
626k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
7.12k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
7.12k
    _operator_profile =
641
7.12k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
7.12k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
7.12k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
7.12k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
7.12k
    _operator_profile->add_child(_common_profile, true);
650
7.12k
    _operator_profile->add_child(_custom_profile, true);
651
652
7.12k
    _operator_profile->set_metadata(_parent->node_id());
653
7.12k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
7.12k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
7.12k
    if constexpr (!is_fake_shared) {
656
7.12k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
7.12k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
7.12k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
7.12k
            _shared_state = info.shared_state->template cast<SharedState>();
672
7.12k
            _dependency = _shared_state->create_sink_dependency(
673
7.12k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
7.12k
        }
675
7.12k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
7.12k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
7.12k
    }
678
679
7.12k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
7.12k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
7.12k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
7.12k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
7.12k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
7.12k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
7.12k
    _memory_used_counter =
689
7.12k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
7.12k
    _common_profile->add_info_string("IsColocate",
691
7.12k
                                     std::to_string(_parent->is_colocated_operator()));
692
7.12k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
7.12k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
7.12k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
7.12k
    return Status::OK();
696
7.12k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
432
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
432
    _operator_profile =
641
432
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
432
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
432
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
432
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
432
    _operator_profile->add_child(_common_profile, true);
650
432
    _operator_profile->add_child(_custom_profile, true);
651
652
432
    _operator_profile->set_metadata(_parent->node_id());
653
432
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
432
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
432
    if constexpr (!is_fake_shared) {
656
432
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
432
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
432
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
432
            _shared_state = info.shared_state->template cast<SharedState>();
672
432
            _dependency = _shared_state->create_sink_dependency(
673
432
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
432
        }
675
432
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
432
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
432
    }
678
679
432
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
432
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
432
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
432
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
432
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
432
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
432
    _memory_used_counter =
689
432
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
432
    _common_profile->add_info_string("IsColocate",
691
432
                                     std::to_string(_parent->is_colocated_operator()));
692
432
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
432
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
432
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
432
    return Status::OK();
696
432
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
2.25k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
2.25k
    _operator_profile =
641
2.25k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
2.25k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
2.25k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
2.25k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
2.25k
    _operator_profile->add_child(_common_profile, true);
650
2.25k
    _operator_profile->add_child(_custom_profile, true);
651
652
2.25k
    _operator_profile->set_metadata(_parent->node_id());
653
2.25k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
2.25k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
2.25k
    if constexpr (!is_fake_shared) {
656
2.25k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
2.25k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
2.25k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
2.25k
            _shared_state = info.shared_state->template cast<SharedState>();
672
2.25k
            _dependency = _shared_state->create_sink_dependency(
673
2.25k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
2.25k
        }
675
2.25k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
2.25k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
2.25k
    }
678
679
2.25k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
2.25k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
2.25k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
2.25k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
2.25k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
2.25k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
2.25k
    _memory_used_counter =
689
2.25k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
2.25k
    _common_profile->add_info_string("IsColocate",
691
2.25k
                                     std::to_string(_parent->is_colocated_operator()));
692
2.25k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
2.25k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
2.25k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
2.25k
    return Status::OK();
696
2.25k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
11.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
11.3k
    _operator_profile =
641
11.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
11.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
11.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
11.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
11.3k
    _operator_profile->add_child(_common_profile, true);
650
11.3k
    _operator_profile->add_child(_custom_profile, true);
651
652
11.3k
    _operator_profile->set_metadata(_parent->node_id());
653
11.3k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
11.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
11.3k
    if constexpr (!is_fake_shared) {
656
11.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
11.3k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
11.3k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
11.3k
            _shared_state = info.shared_state->template cast<SharedState>();
672
11.3k
            _dependency = _shared_state->create_sink_dependency(
673
11.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
11.3k
        }
675
11.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
11.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
11.3k
    }
678
679
11.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
11.3k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
11.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
11.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
11.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
11.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
11.3k
    _memory_used_counter =
689
11.3k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
11.3k
    _common_profile->add_info_string("IsColocate",
691
11.3k
                                     std::to_string(_parent->is_colocated_operator()));
692
11.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
11.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
11.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
11.3k
    return Status::OK();
696
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
331k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
331k
    _operator_profile =
641
331k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
331k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
331k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
331k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
331k
    _operator_profile->add_child(_common_profile, true);
650
331k
    _operator_profile->add_child(_custom_profile, true);
651
652
331k
    _operator_profile->set_metadata(_parent->node_id());
653
331k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
331k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
331k
    if constexpr (!is_fake_shared) {
656
331k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
331k
            info.shared_state_map.end()) {
658
330k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
330k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
330k
            }
661
330k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
330k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
330k
                                                  ? 0
664
330k
                                                  : info.task_idx]
665
330k
                                  .get();
666
330k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
330k
        } else {
668
513
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
513
                DCHECK(false);
670
513
            }
671
513
            _shared_state = info.shared_state->template cast<SharedState>();
672
513
            _dependency = _shared_state->create_sink_dependency(
673
513
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
513
        }
675
331k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
331k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
331k
    }
678
679
331k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
331k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
331k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
331k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
331k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
331k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
331k
    _memory_used_counter =
689
331k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
331k
    _common_profile->add_info_string("IsColocate",
691
331k
                                     std::to_string(_parent->is_colocated_operator()));
692
331k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
331k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
331k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
331k
    return Status::OK();
696
331k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
473k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
473k
    _operator_profile =
641
473k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
473k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
473k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
473k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
473k
    _operator_profile->add_child(_common_profile, true);
650
473k
    _operator_profile->add_child(_custom_profile, true);
651
652
473k
    _operator_profile->set_metadata(_parent->node_id());
653
473k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
473k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
473k
    if constexpr (!is_fake_shared) {
656
473k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
473k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
849
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
849
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
849
                                                  ? 0
664
849
                                                  : info.task_idx]
665
849
                                  .get();
666
849
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
472k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
472k
            _shared_state = info.shared_state->template cast<SharedState>();
672
472k
            _dependency = _shared_state->create_sink_dependency(
673
472k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
472k
        }
675
473k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
473k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
473k
    }
678
679
473k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
473k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
473k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
473k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
473k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
473k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
473k
    _memory_used_counter =
689
473k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
473k
    _common_profile->add_info_string("IsColocate",
691
473k
                                     std::to_string(_parent->is_colocated_operator()));
692
473k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
473k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
473k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
473k
    return Status::OK();
696
473k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
369
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
369
    _operator_profile =
641
369
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
369
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
369
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
369
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
369
    _operator_profile->add_child(_common_profile, true);
650
369
    _operator_profile->add_child(_custom_profile, true);
651
652
369
    _operator_profile->set_metadata(_parent->node_id());
653
369
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
369
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
369
    if constexpr (!is_fake_shared) {
656
369
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
369
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
369
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
369
            _shared_state = info.shared_state->template cast<SharedState>();
672
369
            _dependency = _shared_state->create_sink_dependency(
673
369
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
369
        }
675
369
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
369
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
369
    }
678
679
369
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
369
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
369
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
369
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
369
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
369
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
369
    _memory_used_counter =
689
369
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
369
    _common_profile->add_info_string("IsColocate",
691
369
                                     std::to_string(_parent->is_colocated_operator()));
692
369
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
369
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
369
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
369
    return Status::OK();
696
369
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
300
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
300
    _operator_profile =
641
300
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
300
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
300
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
300
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
300
    _operator_profile->add_child(_common_profile, true);
650
300
    _operator_profile->add_child(_custom_profile, true);
651
652
300
    _operator_profile->set_metadata(_parent->node_id());
653
300
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
300
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
300
    if constexpr (!is_fake_shared) {
656
300
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
300
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
300
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
300
            _shared_state = info.shared_state->template cast<SharedState>();
672
300
            _dependency = _shared_state->create_sink_dependency(
673
300
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
300
        }
675
300
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
300
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
300
    }
678
679
300
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
300
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
300
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
300
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
300
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
300
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
300
    _memory_used_counter =
689
300
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
300
    _common_profile->add_info_string("IsColocate",
691
300
                                     std::to_string(_parent->is_colocated_operator()));
692
300
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
300
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
300
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
300
    return Status::OK();
696
300
}
697
698
template <typename SharedState>
699
1.96M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
1.96M
    if (_closed) {
701
2
        return Status::OK();
702
2
    }
703
1.96M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
1.34M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
1.34M
    }
706
1.96M
    _closed = true;
707
1.96M
    return Status::OK();
708
1.96M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
183k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
183k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
183k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
183k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
183k
    }
706
183k
    _closed = true;
707
183k
    return Status::OK();
708
183k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
1
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
1
    }
706
1
    _closed = true;
707
1
    return Status::OK();
708
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
196k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
196k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
196k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
196k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
196k
    }
706
196k
    _closed = true;
707
196k
    return Status::OK();
708
196k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
19
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
19
    if (_closed) {
701
2
        return Status::OK();
702
2
    }
703
17
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
17
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
17
    }
706
17
    _closed = true;
707
17
    return Status::OK();
708
19
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
5.27k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
5.27k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
5.27k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
5.27k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
5.27k
    }
706
5.27k
    _closed = true;
707
5.27k
    return Status::OK();
708
5.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
9.12k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
9.12k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
9.12k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
9.12k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
9.12k
    }
706
9.12k
    _closed = true;
707
9.12k
    return Status::OK();
708
9.12k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
118k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
118k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
118k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
118k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
118k
    }
706
118k
    _closed = true;
707
118k
    return Status::OK();
708
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
310
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
310
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
310
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
310
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
310
    }
706
310
    _closed = true;
707
310
    return Status::OK();
708
310
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
627k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
627k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
    }
706
627k
    _closed = true;
707
627k
    return Status::OK();
708
627k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
7.12k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
7.12k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
7.12k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
7.12k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
7.12k
    }
706
7.12k
    _closed = true;
707
7.12k
    return Status::OK();
708
7.12k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
328
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
328
    }
706
328
    _closed = true;
707
328
    return Status::OK();
708
328
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
2.25k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
2.25k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
2.25k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
2.25k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
2.25k
    }
706
2.25k
    _closed = true;
707
2.25k
    return Status::OK();
708
2.25k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
11.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
11.3k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
11.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
11.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
11.3k
    }
706
11.3k
    _closed = true;
707
11.3k
    return Status::OK();
708
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
332k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
332k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
332k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
332k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
332k
    }
706
332k
    _closed = true;
707
332k
    return Status::OK();
708
332k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
474k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
474k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
474k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
474k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
474k
    }
706
474k
    _closed = true;
707
474k
    return Status::OK();
708
474k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
365
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
365
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
365
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
365
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
365
    }
706
365
    _closed = true;
707
365
    return Status::OK();
708
365
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
300
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
300
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
300
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
300
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
300
    }
706
300
    _closed = true;
707
300
    return Status::OK();
708
300
}
709
710
template <typename LocalStateType>
711
5.60k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
5.60k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
5.60k
    return pull(state, block, eos);
714
5.60k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
711
31
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
31
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
31
    return pull(state, block, eos);
714
31
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
711
5.57k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
5.57k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
5.57k
    return pull(state, block, eos);
714
5.57k
}
715
716
template <typename LocalStateType>
717
894k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
894k
    auto& local_state = get_local_state(state);
719
894k
    if (need_more_input_data(state)) {
720
818k
        local_state._child_block->clear_column_data(
721
818k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
818k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
818k
                state, local_state._child_block.get(), &local_state._child_eos));
724
818k
        *eos = local_state._child_eos;
725
818k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
78.5k
            return Status::OK();
727
78.5k
        }
728
739k
        {
729
739k
            SCOPED_TIMER(local_state.exec_time_counter());
730
739k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
739k
        }
732
739k
    }
733
734
815k
    if (!need_more_input_data(state)) {
735
775k
        SCOPED_TIMER(local_state.exec_time_counter());
736
775k
        bool new_eos = false;
737
775k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
775k
        if (new_eos) {
739
703k
            *eos = true;
740
703k
        } else if (!need_more_input_data(state)) {
741
27.5k
            *eos = false;
742
27.5k
        }
743
775k
    }
744
815k
    return Status::OK();
745
815k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
185k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
185k
    auto& local_state = get_local_state(state);
719
185k
    if (need_more_input_data(state)) {
720
122k
        local_state._child_block->clear_column_data(
721
122k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
122k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
122k
                state, local_state._child_block.get(), &local_state._child_eos));
724
122k
        *eos = local_state._child_eos;
725
122k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
25.6k
            return Status::OK();
727
25.6k
        }
728
96.9k
        {
729
96.9k
            SCOPED_TIMER(local_state.exec_time_counter());
730
96.9k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
96.9k
        }
732
96.9k
    }
733
734
159k
    if (!need_more_input_data(state)) {
735
159k
        SCOPED_TIMER(local_state.exec_time_counter());
736
159k
        bool new_eos = false;
737
159k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
159k
        if (new_eos) {
739
110k
            *eos = true;
740
110k
        } else if (!need_more_input_data(state)) {
741
12.7k
            *eos = false;
742
12.7k
        }
743
159k
    }
744
159k
    return Status::OK();
745
159k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
3.22k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
3.22k
    auto& local_state = get_local_state(state);
719
3.22k
    if (need_more_input_data(state)) {
720
1.85k
        local_state._child_block->clear_column_data(
721
1.85k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
1.85k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
1.85k
                state, local_state._child_block.get(), &local_state._child_eos));
724
1.85k
        *eos = local_state._child_eos;
725
1.85k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
367
            return Status::OK();
727
367
        }
728
1.48k
        {
729
1.48k
            SCOPED_TIMER(local_state.exec_time_counter());
730
1.48k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
1.48k
        }
732
1.48k
    }
733
734
2.87k
    if (!need_more_input_data(state)) {
735
2.87k
        SCOPED_TIMER(local_state.exec_time_counter());
736
2.87k
        bool new_eos = false;
737
2.87k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
2.87k
        if (new_eos) {
739
1.10k
            *eos = true;
740
1.76k
        } else if (!need_more_input_data(state)) {
741
1.37k
            *eos = false;
742
1.37k
        }
743
2.87k
    }
744
2.86k
    return Status::OK();
745
2.86k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
1.56k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
1.56k
    auto& local_state = get_local_state(state);
719
1.56k
    if (need_more_input_data(state)) {
720
1.56k
        local_state._child_block->clear_column_data(
721
1.56k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
1.56k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
1.56k
                state, local_state._child_block.get(), &local_state._child_eos));
724
1.56k
        *eos = local_state._child_eos;
725
1.56k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
643
            return Status::OK();
727
643
        }
728
923
        {
729
923
            SCOPED_TIMER(local_state.exec_time_counter());
730
923
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
923
        }
732
923
    }
733
734
923
    if (!need_more_input_data(state)) {
735
923
        SCOPED_TIMER(local_state.exec_time_counter());
736
923
        bool new_eos = false;
737
923
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
923
        if (new_eos) {
739
666
            *eos = true;
740
666
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
923
    }
744
923
    return Status::OK();
745
923
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
18.8k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
18.8k
    auto& local_state = get_local_state(state);
719
18.8k
    if (need_more_input_data(state)) {
720
18.7k
        local_state._child_block->clear_column_data(
721
18.7k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
18.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
18.7k
                state, local_state._child_block.get(), &local_state._child_eos));
724
18.7k
        *eos = local_state._child_eos;
725
18.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
4.18k
            return Status::OK();
727
4.18k
        }
728
14.5k
        {
729
14.5k
            SCOPED_TIMER(local_state.exec_time_counter());
730
14.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
14.5k
        }
732
14.5k
    }
733
734
14.7k
    if (!need_more_input_data(state)) {
735
8.46k
        SCOPED_TIMER(local_state.exec_time_counter());
736
8.46k
        bool new_eos = false;
737
8.46k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
8.46k
        if (new_eos) {
739
8.20k
            *eos = true;
740
8.20k
        } else if (!need_more_input_data(state)) {
741
165
            *eos = false;
742
165
        }
743
8.46k
    }
744
14.7k
    return Status::OK();
745
14.7k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
654k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
654k
    auto& local_state = get_local_state(state);
719
655k
    if (need_more_input_data(state)) {
720
655k
        local_state._child_block->clear_column_data(
721
655k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
655k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
655k
                state, local_state._child_block.get(), &local_state._child_eos));
724
655k
        *eos = local_state._child_eos;
725
655k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
45.7k
            return Status::OK();
727
45.7k
        }
728
609k
        {
729
609k
            SCOPED_TIMER(local_state.exec_time_counter());
730
609k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
609k
        }
732
609k
    }
733
734
608k
    if (!need_more_input_data(state)) {
735
575k
        SCOPED_TIMER(local_state.exec_time_counter());
736
575k
        bool new_eos = false;
737
575k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
575k
        if (new_eos) {
739
574k
            *eos = true;
740
574k
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
575k
    }
744
608k
    return Status::OK();
745
608k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
24.8k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
24.8k
    auto& local_state = get_local_state(state);
719
24.8k
    if (need_more_input_data(state)) {
720
12.0k
        local_state._child_block->clear_column_data(
721
12.0k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
12.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
12.0k
                state, local_state._child_block.get(), &local_state._child_eos));
724
12.0k
        *eos = local_state._child_eos;
725
12.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
1.55k
            return Status::OK();
727
1.55k
        }
728
10.4k
        {
729
10.4k
            SCOPED_TIMER(local_state.exec_time_counter());
730
10.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
10.4k
        }
732
10.4k
    }
733
734
23.3k
    if (!need_more_input_data(state)) {
735
22.6k
        SCOPED_TIMER(local_state.exec_time_counter());
736
22.6k
        bool new_eos = false;
737
22.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
22.6k
        if (new_eos) {
739
5.28k
            *eos = true;
740
17.3k
        } else if (!need_more_input_data(state)) {
741
12.8k
            *eos = false;
742
12.8k
        }
743
22.6k
    }
744
23.3k
    return Status::OK();
745
23.3k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
6.07k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
6.07k
    auto& local_state = get_local_state(state);
719
6.07k
    if (need_more_input_data(state)) {
720
5.70k
        local_state._child_block->clear_column_data(
721
5.70k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
5.70k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
5.70k
                state, local_state._child_block.get(), &local_state._child_eos));
724
5.70k
        *eos = local_state._child_eos;
725
5.70k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
469
            return Status::OK();
727
469
        }
728
5.23k
        {
729
5.23k
            SCOPED_TIMER(local_state.exec_time_counter());
730
5.23k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
5.23k
        }
732
5.23k
    }
733
734
5.60k
    if (!need_more_input_data(state)) {
735
5.60k
        SCOPED_TIMER(local_state.exec_time_counter());
736
5.60k
        bool new_eos = false;
737
5.60k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
5.60k
        if (new_eos) {
739
3.69k
            *eos = true;
740
3.69k
        } else if (!need_more_input_data(state)) {
741
374
            *eos = false;
742
374
        }
743
5.60k
    }
744
5.60k
    return Status::OK();
745
5.60k
}
746
747
template <typename Writer, typename Parent>
748
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
749
66.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
66.4k
    RETURN_IF_ERROR(Base::init(state, info));
751
66.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
66.4k
                                                         "AsyncWriterDependency", true);
753
66.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
66.4k
                             _finish_dependency));
755
756
66.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
66.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
66.4k
    return Status::OK();
759
66.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
337
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
337
    RETURN_IF_ERROR(Base::init(state, info));
751
337
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
337
                                                         "AsyncWriterDependency", true);
753
337
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
337
                             _finish_dependency));
755
756
337
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
337
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
337
    return Status::OK();
759
337
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
66.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
66.0k
    RETURN_IF_ERROR(Base::init(state, info));
751
66.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
66.0k
                                                         "AsyncWriterDependency", true);
753
66.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
66.0k
                             _finish_dependency));
755
756
66.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
66.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
66.0k
    return Status::OK();
759
66.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
24
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
24
    RETURN_IF_ERROR(Base::init(state, info));
751
24
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
24
                                                         "AsyncWriterDependency", true);
753
24
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
24
                             _finish_dependency));
755
756
24
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
24
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
24
    return Status::OK();
759
24
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
760
761
template <typename Writer, typename Parent>
762
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
763
67.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
67.0k
    RETURN_IF_ERROR(Base::open(state));
765
67.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
474k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
407k
        RETURN_IF_ERROR(
768
407k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
407k
    }
770
67.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
67.0k
    return Status::OK();
772
67.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
339
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
339
    RETURN_IF_ERROR(Base::open(state));
765
339
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
1.77k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
1.43k
        RETURN_IF_ERROR(
768
1.43k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
1.43k
    }
770
339
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
339
    return Status::OK();
772
339
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
66.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
66.6k
    RETURN_IF_ERROR(Base::open(state));
765
66.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
472k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
405k
        RETURN_IF_ERROR(
768
405k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
405k
    }
770
66.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
66.6k
    return Status::OK();
772
66.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
24
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
24
    RETURN_IF_ERROR(Base::open(state));
765
24
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
432
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
408
        RETURN_IF_ERROR(
768
408
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
408
    }
770
24
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
24
    return Status::OK();
772
24
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
773
774
template <typename Writer, typename Parent>
775
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
776
79.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
79.2k
    return _writer->sink(block, eos);
778
79.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
1.20k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
1.20k
    return _writer->sink(block, eos);
778
1.20k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
77.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
77.9k
    return _writer->sink(block, eos);
778
77.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
24
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
24
    return _writer->sink(block, eos);
778
24
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
779
780
template <typename Writer, typename Parent>
781
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
782
67.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
67.0k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
67.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
67.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
67.1k
    if (_writer) {
790
67.1k
        Status st = _writer->get_writer_status();
791
67.1k
        if (exec_status.ok()) {
792
67.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
67.0k
                                                       : Status::Cancelled("force close"));
794
67.0k
        } else {
795
83
            _writer->force_close(exec_status);
796
83
        }
797
        // If there is an error in process_block thread, then we should get the writer
798
        // status before call force_close. For example, the thread may failed in commit
799
        // transaction.
800
67.1k
        RETURN_IF_ERROR(st);
801
67.1k
    }
802
67.0k
    return Base::close(state, exec_status);
803
67.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
327
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
327
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
327
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
327
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
327
    if (_writer) {
790
327
        Status st = _writer->get_writer_status();
791
327
        if (exec_status.ok()) {
792
327
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
327
                                                       : Status::Cancelled("force close"));
794
327
        } else {
795
0
            _writer->force_close(exec_status);
796
0
        }
797
        // If there is an error in process_block thread, then we should get the writer
798
        // status before call force_close. For example, the thread may failed in commit
799
        // transaction.
800
327
        RETURN_IF_ERROR(st);
801
327
    }
802
327
    return Base::close(state, exec_status);
803
327
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
66.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
66.7k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
66.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
66.7k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
66.7k
    if (_writer) {
790
66.7k
        Status st = _writer->get_writer_status();
791
66.7k
        if (exec_status.ok()) {
792
66.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
66.6k
                                                       : Status::Cancelled("force close"));
794
66.6k
        } else {
795
83
            _writer->force_close(exec_status);
796
83
        }
797
        // If there is an error in process_block thread, then we should get the writer
798
        // status before call force_close. For example, the thread may failed in commit
799
        // transaction.
800
66.7k
        RETURN_IF_ERROR(st);
801
66.7k
    }
802
66.6k
    return Base::close(state, exec_status);
803
66.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
24
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
24
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
24
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
24
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
24
    if (_writer) {
790
24
        Status st = _writer->get_writer_status();
791
24
        if (exec_status.ok()) {
792
24
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
24
                                                       : Status::Cancelled("force close"));
794
24
        } else {
795
0
            _writer->force_close(exec_status);
796
0
        }
797
        // If there is an error in process_block thread, then we should get the writer
798
        // status before call force_close. For example, the thread may failed in commit
799
        // transaction.
800
24
        RETURN_IF_ERROR(st);
801
24
    }
802
24
    return Base::close(state, exec_status);
803
24
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
804
805
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
806
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
807
DECLARE_OPERATOR(ResultSinkLocalState)
808
DECLARE_OPERATOR(JdbcTableSinkLocalState)
809
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
810
DECLARE_OPERATOR(ResultFileSinkLocalState)
811
DECLARE_OPERATOR(OlapTableSinkLocalState)
812
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
813
DECLARE_OPERATOR(HiveTableSinkLocalState)
814
DECLARE_OPERATOR(TVFTableSinkLocalState)
815
DECLARE_OPERATOR(IcebergTableSinkLocalState)
816
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
817
DECLARE_OPERATOR(MCTableSinkLocalState)
818
DECLARE_OPERATOR(AnalyticSinkLocalState)
819
DECLARE_OPERATOR(BlackholeSinkLocalState)
820
DECLARE_OPERATOR(SortSinkLocalState)
821
DECLARE_OPERATOR(SpillSortSinkLocalState)
822
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
823
DECLARE_OPERATOR(AggSinkLocalState)
824
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
825
DECLARE_OPERATOR(ExchangeSinkLocalState)
826
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
827
DECLARE_OPERATOR(UnionSinkLocalState)
828
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
829
DECLARE_OPERATOR(PartitionSortSinkLocalState)
830
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
831
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
832
DECLARE_OPERATOR(SetSinkLocalState<true>)
833
DECLARE_OPERATOR(SetSinkLocalState<false>)
834
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
835
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
836
DECLARE_OPERATOR(CacheSinkLocalState)
837
DECLARE_OPERATOR(DictSinkLocalState)
838
DECLARE_OPERATOR(RecCTESinkLocalState)
839
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
840
841
#undef DECLARE_OPERATOR
842
843
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
844
DECLARE_OPERATOR(HashJoinProbeLocalState)
845
DECLARE_OPERATOR(OlapScanLocalState)
846
DECLARE_OPERATOR(GroupCommitLocalState)
847
DECLARE_OPERATOR(JDBCScanLocalState)
848
DECLARE_OPERATOR(FileScanLocalState)
849
DECLARE_OPERATOR(EsScanLocalState)
850
DECLARE_OPERATOR(AnalyticLocalState)
851
DECLARE_OPERATOR(SortLocalState)
852
DECLARE_OPERATOR(SpillSortLocalState)
853
DECLARE_OPERATOR(LocalMergeSortLocalState)
854
DECLARE_OPERATOR(AggLocalState)
855
DECLARE_OPERATOR(PartitionedAggLocalState)
856
DECLARE_OPERATOR(TableFunctionLocalState)
857
DECLARE_OPERATOR(ExchangeLocalState)
858
DECLARE_OPERATOR(RepeatLocalState)
859
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
860
DECLARE_OPERATOR(AssertNumRowsLocalState)
861
DECLARE_OPERATOR(EmptySetLocalState)
862
DECLARE_OPERATOR(UnionSourceLocalState)
863
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
864
DECLARE_OPERATOR(PartitionSortSourceLocalState)
865
DECLARE_OPERATOR(SetSourceLocalState<true>)
866
DECLARE_OPERATOR(SetSourceLocalState<false>)
867
DECLARE_OPERATOR(DataGenLocalState)
868
DECLARE_OPERATOR(SchemaScanLocalState)
869
DECLARE_OPERATOR(MetaScanLocalState)
870
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
871
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
872
DECLARE_OPERATOR(CacheSourceLocalState)
873
DECLARE_OPERATOR(RecCTESourceLocalState)
874
DECLARE_OPERATOR(RecCTEScanLocalState)
875
876
#ifdef BE_TEST
877
DECLARE_OPERATOR(MockLocalState)
878
DECLARE_OPERATOR(MockScanLocalState)
879
#endif
880
#undef DECLARE_OPERATOR
881
882
template class StreamingOperatorX<AssertNumRowsLocalState>;
883
template class StreamingOperatorX<SelectLocalState>;
884
885
template class StatefulOperatorX<HashJoinProbeLocalState>;
886
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
887
template class StatefulOperatorX<RepeatLocalState>;
888
template class StatefulOperatorX<MaterializationLocalState>;
889
template class StatefulOperatorX<StreamingAggLocalState>;
890
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
891
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
892
template class StatefulOperatorX<TableFunctionLocalState>;
893
894
template class PipelineXSinkLocalState<HashJoinSharedState>;
895
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
896
template class PipelineXSinkLocalState<SortSharedState>;
897
template class PipelineXSinkLocalState<SpillSortSharedState>;
898
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
899
template class PipelineXSinkLocalState<AnalyticSharedState>;
900
template class PipelineXSinkLocalState<AggSharedState>;
901
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
902
template class PipelineXSinkLocalState<FakeSharedState>;
903
template class PipelineXSinkLocalState<UnionSharedState>;
904
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
905
template class PipelineXSinkLocalState<MultiCastSharedState>;
906
template class PipelineXSinkLocalState<SetSharedState>;
907
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
908
template class PipelineXSinkLocalState<BasicSharedState>;
909
template class PipelineXSinkLocalState<DataQueueSharedState>;
910
template class PipelineXSinkLocalState<RecCTESharedState>;
911
912
template class PipelineXLocalState<HashJoinSharedState>;
913
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
914
template class PipelineXLocalState<SortSharedState>;
915
template class PipelineXLocalState<SpillSortSharedState>;
916
template class PipelineXLocalState<NestedLoopJoinSharedState>;
917
template class PipelineXLocalState<AnalyticSharedState>;
918
template class PipelineXLocalState<AggSharedState>;
919
template class PipelineXLocalState<PartitionedAggSharedState>;
920
template class PipelineXLocalState<FakeSharedState>;
921
template class PipelineXLocalState<UnionSharedState>;
922
template class PipelineXLocalState<DataQueueSharedState>;
923
template class PipelineXLocalState<MultiCastSharedState>;
924
template class PipelineXLocalState<PartitionSortNodeSharedState>;
925
template class PipelineXLocalState<SetSharedState>;
926
template class PipelineXLocalState<LocalExchangeSharedState>;
927
template class PipelineXLocalState<BasicSharedState>;
928
template class PipelineXLocalState<RecCTESharedState>;
929
930
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
931
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
932
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
933
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
934
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
935
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
936
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
937
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
938
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
939
940
#ifdef BE_TEST
941
template class OperatorX<DummyOperatorLocalState>;
942
template class DataSinkOperatorX<DummySinkLocalState>;
943
#endif
944
945
#include "common/compile_check_end.h"
946
} // namespace doris