Coverage Report

Created: 2026-03-13 18:42

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.15M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
2.15M
    if (_parent->nereids_id() == -1) {
117
1.10M
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
1.10M
    } else {
119
1.04M
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
1.04M
                           std::to_string(_parent->nereids_id()),
121
1.04M
                           std::to_string(_parent->node_id()));
122
1.04M
    }
123
2.15M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
137k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
137k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
137k
    } else {
119
137k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
137k
                           std::to_string(_parent->nereids_id()),
121
137k
                           std::to_string(_parent->node_id()));
122
137k
    }
123
137k
}
_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
196k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
196k
    if (_parent->nereids_id() == -1) {
117
12
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
196k
    } else {
119
196k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
196k
                           std::to_string(_parent->nereids_id()),
121
196k
                           std::to_string(_parent->node_id()));
122
196k
    }
123
196k
}
_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
6.45k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
6.45k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
6.45k
    } else {
119
6.45k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
6.45k
                           std::to_string(_parent->nereids_id()),
121
6.45k
                           std::to_string(_parent->node_id()));
122
6.45k
    }
123
6.45k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
9.48k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
9.48k
    if (_parent->nereids_id() == -1) {
117
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
9.47k
    } else {
119
9.47k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
9.47k
                           std::to_string(_parent->nereids_id()),
121
9.47k
                           std::to_string(_parent->node_id()));
122
9.47k
    }
123
9.48k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
123k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
123k
    if (_parent->nereids_id() == -1) {
117
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
123k
    } else {
119
123k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
123k
                           std::to_string(_parent->nereids_id()),
121
123k
                           std::to_string(_parent->node_id()));
122
123k
    }
123
123k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
313
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
313
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
313
    } else {
119
313
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
313
                           std::to_string(_parent->nereids_id()),
121
313
                           std::to_string(_parent->node_id()));
122
313
    }
123
313
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
971k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
971k
    if (_parent->nereids_id() == -1) {
117
440k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
530k
    } else {
119
530k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
530k
                           std::to_string(_parent->nereids_id()),
121
530k
                           std::to_string(_parent->node_id()));
122
530k
    }
123
971k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
39.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
39.4k
    if (_parent->nereids_id() == -1) {
117
2
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
39.4k
    } else {
119
39.4k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
39.4k
                           std::to_string(_parent->nereids_id()),
121
39.4k
                           std::to_string(_parent->node_id()));
122
39.4k
    }
123
39.4k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
365
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
366
    if (_parent->nereids_id() == -1) {
117
366
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
18.4E
    } else {
119
18.4E
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
18.4E
                           std::to_string(_parent->nereids_id()),
121
18.4E
                           std::to_string(_parent->node_id()));
122
18.4E
    }
123
365
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
6.98k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
6.98k
    if (_parent->nereids_id() == -1) {
117
6.98k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
6.98k
    } 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
6.98k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
504
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
504
    if (_parent->nereids_id() == -1) {
117
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
402
    } else {
119
402
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
402
                           std::to_string(_parent->nereids_id()),
121
402
                           std::to_string(_parent->node_id()));
122
402
    }
123
504
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
5.03k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
5.03k
    if (_parent->nereids_id() == -1) {
117
10
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
5.02k
    } else {
119
5.02k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
5.02k
                           std::to_string(_parent->nereids_id()),
121
5.02k
                           std::to_string(_parent->node_id()));
122
5.02k
    }
123
5.03k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
656k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
656k
    if (_parent->nereids_id() == -1) {
117
655k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
655k
    } else {
119
571
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
571
                           std::to_string(_parent->nereids_id()),
121
571
                           std::to_string(_parent->node_id()));
122
571
    }
123
656k
}
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.28M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
1.28M
    if (_parent->nereids_id() == -1) {
128
753k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
753k
    } else {
130
529k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
529k
                           std::to_string(_parent->nereids_id()),
132
529k
                           std::to_string(_parent->node_id()));
133
529k
    }
134
1.28M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
186k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
186k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
186k
    } else {
130
186k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
186k
                           std::to_string(_parent->nereids_id()),
132
186k
                           std::to_string(_parent->node_id()));
133
186k
    }
134
186k
}
_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
6.50k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
6.50k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
6.50k
    } else {
130
6.50k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
6.50k
                           std::to_string(_parent->nereids_id()),
132
6.50k
                           std::to_string(_parent->node_id()));
133
6.50k
    }
134
6.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
9.50k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
9.50k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
9.49k
    } else {
130
9.49k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
9.49k
                           std::to_string(_parent->nereids_id()),
132
9.49k
                           std::to_string(_parent->node_id()));
133
9.49k
    }
134
9.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
123k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
123k
    if (_parent->nereids_id() == -1) {
128
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
123k
    } else {
130
123k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
123k
                           std::to_string(_parent->nereids_id()),
132
123k
                           std::to_string(_parent->node_id()));
133
123k
    }
134
123k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
319
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
319
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
319
    } else {
130
319
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
319
                           std::to_string(_parent->nereids_id()),
132
319
                           std::to_string(_parent->node_id()));
133
319
    }
134
319
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
15
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
15
    if (_parent->nereids_id() == -1) {
128
15
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
15
    } 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
15
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
6.71k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
6.71k
    if (_parent->nereids_id() == -1) {
128
3
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
6.71k
    } else {
130
6.71k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
6.71k
                           std::to_string(_parent->nereids_id()),
132
6.71k
                           std::to_string(_parent->node_id()));
133
6.71k
    }
134
6.71k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
505
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
505
    if (_parent->nereids_id() == -1) {
128
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
403
    } else {
130
403
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
403
                           std::to_string(_parent->nereids_id()),
132
403
                           std::to_string(_parent->node_id()));
133
403
    }
134
505
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
12.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
12.3k
    if (_parent->nereids_id() == -1) {
128
12.3k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
12.3k
    } else {
130
2
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
2
                           std::to_string(_parent->nereids_id()),
132
2
                           std::to_string(_parent->node_id()));
133
2
    }
134
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
303k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
303k
    if (_parent->nereids_id() == -1) {
128
303k
        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
303k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
436k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
436k
    if (_parent->nereids_id() == -1) {
128
436k
        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
436k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
369
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
369
    if (_parent->nereids_id() == -1) {
128
368
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
368
    } 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
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
29.9k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
29.9k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
29.9k
    _terminated = true;
142
29.9k
    return Status::OK();
143
29.9k
}
_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
484
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
484
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
484
    _terminated = true;
142
484
    return Status::OK();
143
484
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_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_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
9
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
9
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
9
    _terminated = true;
142
9
    return Status::OK();
143
9
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
2.61k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
2.61k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
2.61k
    _terminated = true;
142
2.61k
    return Status::OK();
143
2.61k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
2.36k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
2.36k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
2.36k
    _terminated = true;
142
2.36k
    return Status::OK();
143
2.36k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
4
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
4
    _terminated = true;
142
4
    return Status::OK();
143
4
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
1
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
1
    _terminated = true;
142
1
    return Status::OK();
143
1
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
44
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
44
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
44
    _terminated = true;
142
44
    return Status::OK();
143
44
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
1
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
1
    _terminated = true;
142
1
    return Status::OK();
143
1
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
233
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
233
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
233
    _terminated = true;
142
233
    return Status::OK();
143
233
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
136
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
136
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
136
    _terminated = true;
142
136
    return Status::OK();
143
136
}
144
145
619k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
146
619k
    return _child && _child->is_serial_operator() && !is_source()
147
619k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
148
619k
                   : DataDistribution(ExchangeType::NOOP);
149
619k
}
150
151
81.0k
const RowDescriptor& OperatorBase::row_desc() const {
152
81.0k
    return _child->row_desc();
153
81.0k
}
154
155
template <typename SharedStateArg>
156
56.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
56.0k
    fmt::memory_buffer debug_string_buffer;
158
56.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
56.0k
    return fmt::to_string(debug_string_buffer);
160
56.0k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
12
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
12
    fmt::memory_buffer debug_string_buffer;
158
12
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
12
    return fmt::to_string(debug_string_buffer);
160
12
}
_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
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
6
    fmt::memory_buffer debug_string_buffer;
158
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
6
    return fmt::to_string(debug_string_buffer);
160
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_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_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
6
    fmt::memory_buffer debug_string_buffer;
158
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
6
    return fmt::to_string(debug_string_buffer);
160
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
55.9k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
55.9k
    fmt::memory_buffer debug_string_buffer;
158
55.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
55.9k
    return fmt::to_string(debug_string_buffer);
160
55.9k
}
_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
6
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
6
    fmt::memory_buffer debug_string_buffer;
158
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
6
    return fmt::to_string(debug_string_buffer);
160
6
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
161
162
template <typename SharedStateArg>
163
56.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
56.0k
    fmt::memory_buffer debug_string_buffer;
165
56.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
56.0k
    return fmt::to_string(debug_string_buffer);
167
56.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
6
    fmt::memory_buffer debug_string_buffer;
165
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
6
    return fmt::to_string(debug_string_buffer);
167
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
6
    fmt::memory_buffer debug_string_buffer;
165
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
6
    return fmt::to_string(debug_string_buffer);
167
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
9
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
9
    fmt::memory_buffer debug_string_buffer;
165
9
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
9
    return fmt::to_string(debug_string_buffer);
167
9
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
3
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
3
    fmt::memory_buffer debug_string_buffer;
165
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
3
    return fmt::to_string(debug_string_buffer);
167
3
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
55.9k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
55.9k
    fmt::memory_buffer debug_string_buffer;
165
55.9k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
55.9k
    return fmt::to_string(debug_string_buffer);
167
55.9k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
168
169
56.3k
std::string OperatorXBase::debug_string(int indentation_level) const {
170
56.3k
    fmt::memory_buffer debug_string_buffer;
171
56.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
172
56.3k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
173
56.3k
                   _is_serial_operator);
174
56.3k
    return fmt::to_string(debug_string_buffer);
175
56.3k
}
176
177
56.0k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
178
56.0k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
179
56.0k
}
180
181
572k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
182
572k
    std::string node_name = print_plan_node_type(tnode.node_type);
183
572k
    _nereids_id = tnode.nereids_id;
184
572k
    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
572k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
198
572k
    _op_name = substr + "_OPERATOR";
199
200
572k
    if (tnode.__isset.vconjunct) {
201
0
        return Status::InternalError("vconjunct is not supported yet");
202
572k
    } else if (tnode.__isset.conjuncts) {
203
259k
        for (const auto& conjunct : tnode.conjuncts) {
204
259k
            VExprContextSPtr context;
205
259k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
206
259k
            _conjuncts.emplace_back(context);
207
259k
        }
208
88.4k
    }
209
210
    // create the projections expr
211
572k
    if (tnode.__isset.projections) {
212
246k
        DCHECK(tnode.__isset.output_tuple_id);
213
246k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
214
246k
    }
215
572k
    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
572k
    return Status::OK();
225
572k
}
226
227
598k
Status OperatorXBase::prepare(RuntimeState* state) {
228
598k
    for (auto& conjunct : _conjuncts) {
229
259k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
230
259k
    }
231
598k
    if (state->enable_adjust_conjunct_order_by_cost()) {
232
548k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
233
341k
            return a->execute_cost() < b->execute_cost();
234
341k
        });
235
548k
    };
236
237
602k
    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
598k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
242
243
598k
    if (has_output_row_desc()) {
244
246k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
245
246k
    }
246
247
598k
    for (auto& conjunct : _conjuncts) {
248
259k
        RETURN_IF_ERROR(conjunct->open(state));
249
259k
    }
250
598k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
251
598k
    for (auto& projections : _intermediate_projections) {
252
3.79k
        RETURN_IF_ERROR(VExpr::open(projections, state));
253
3.79k
    }
254
598k
    if (_child && !is_source()) {
255
138k
        RETURN_IF_ERROR(_child->prepare(state));
256
138k
    }
257
258
598k
    if (VExpr::contains_blockable_function(_conjuncts) ||
259
598k
        VExpr::contains_blockable_function(_projections)) {
260
0
        _blockable = true;
261
0
    }
262
263
598k
    return Status::OK();
264
598k
}
265
266
8.35k
Status OperatorXBase::terminate(RuntimeState* state) {
267
8.35k
    if (_child && !is_source()) {
268
2.43k
        RETURN_IF_ERROR(_child->terminate(state));
269
2.43k
    }
270
8.35k
    auto result = state->get_local_state_result(operator_id());
271
8.35k
    if (!result) {
272
0
        return result.error();
273
0
    }
274
8.35k
    return result.value()->terminate(state);
275
8.35k
}
276
277
6.29M
Status OperatorXBase::close(RuntimeState* state) {
278
6.29M
    if (_child && !is_source()) {
279
1.39M
        RETURN_IF_ERROR(_child->close(state));
280
1.39M
    }
281
6.29M
    auto result = state->get_local_state_result(operator_id());
282
6.29M
    if (!result) {
283
0
        return result.error();
284
0
    }
285
6.29M
    return result.value()->close(state);
286
6.29M
}
287
288
352k
void PipelineXLocalStateBase::clear_origin_block() {
289
352k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
290
352k
}
291
292
600k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
293
600k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
294
295
600k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
296
600k
    return Status::OK();
297
600k
}
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
352k
                                     Block* output_block) const {
306
352k
    auto* local_state = state->get_local_state(operator_id());
307
352k
    SCOPED_TIMER(local_state->exec_time_counter());
308
352k
    SCOPED_TIMER(local_state->_projection_timer);
309
352k
    const size_t rows = origin_block->rows();
310
352k
    if (rows == 0) {
311
228k
        return Status::OK();
312
228k
    }
313
124k
    Block input_block = *origin_block;
314
315
124k
    size_t bytes_usage = 0;
316
124k
    ColumnsWithTypeAndName new_columns;
317
124k
    for (const auto& projections : local_state->_intermediate_projections) {
318
948
        if (projections.empty()) {
319
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
320
0
                                         node_id());
321
0
        }
322
948
        new_columns.resize(projections.size());
323
6.69k
        for (int i = 0; i < projections.size(); i++) {
324
5.74k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
325
5.74k
            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
5.74k
        }
333
948
        Block tmp_block {new_columns};
334
948
        bytes_usage += tmp_block.allocated_bytes();
335
948
        input_block.swap(tmp_block);
336
948
    }
337
338
124k
    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
617k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
345
617k
        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
617k
        } else {
355
617k
            if (_keep_origin || !from->is_exclusive()) {
356
608k
                to->insert_range_from(*from, 0, rows);
357
608k
                bytes_usage += from->allocated_bytes();
358
608k
            } else {
359
9.00k
                to = from->assume_mutable();
360
9.00k
            }
361
617k
        }
362
617k
    };
363
364
124k
    MutableBlock mutable_block =
365
124k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
366
124k
    if (rows != 0) {
367
124k
        auto& mutable_columns = mutable_block.mutable_columns();
368
124k
        const size_t origin_columns_count = input_block.columns();
369
124k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
742k
        for (int i = 0; i < mutable_columns.size(); ++i) {
371
617k
            auto result_column_id = -1;
372
617k
            ColumnPtr column_ptr;
373
617k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
374
617k
            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
617k
            column_ptr = column_ptr->convert_to_full_column_if_const();
381
617k
            if (result_column_id >= origin_columns_count) {
382
617k
                bytes_usage += column_ptr->allocated_bytes();
383
617k
            }
384
617k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
385
617k
        }
386
124k
        DCHECK(mutable_block.rows() == rows);
387
124k
        output_block->set_columns(std::move(mutable_columns));
388
124k
    }
389
390
124k
    local_state->_estimate_memory_usage += bytes_usage;
391
392
124k
    return Status::OK();
393
124k
}
394
395
3.88M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
396
3.88M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
397
3.88M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
398
3.88M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
399
3.88M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
400
3.88M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
401
3.88M
            if (_debug_point_count++ % 2 == 0) {
402
3.88M
                return Status::OK();
403
3.88M
            }
404
3.88M
        }
405
3.88M
    });
406
407
3.88M
    Status status;
408
3.88M
    auto* local_state = state->get_local_state(operator_id());
409
3.88M
    Defer defer([&]() {
410
3.88M
        if (status.ok()) {
411
3.88M
            if (auto rows = block->rows()) {
412
741k
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
413
741k
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
414
741k
            }
415
3.88M
        }
416
3.88M
    });
417
3.88M
    if (_output_row_descriptor) {
418
352k
        local_state->clear_origin_block();
419
352k
        status = get_block(state, &local_state->_origin_block, eos);
420
352k
        if (UNLIKELY(!status.ok())) {
421
14
            return status;
422
14
        }
423
352k
        status = do_projections(state, &local_state->_origin_block, block);
424
352k
        return status;
425
352k
    }
426
3.52M
    status = get_block(state, block, eos);
427
3.52M
    RETURN_IF_ERROR(block->check_type_and_column());
428
3.52M
    return status;
429
3.52M
}
430
431
2.42M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
432
2.42M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
433
1.71k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
434
1.71k
        *eos = true;
435
1.71k
    }
436
437
2.42M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
438
2.42M
        auto op_name = to_lower(_parent->_op_name);
439
2.42M
        auto arg_op_name = dp->param<std::string>("op_name");
440
2.42M
        arg_op_name = to_lower(arg_op_name);
441
442
2.42M
        if (op_name == arg_op_name) {
443
2.42M
            *eos = true;
444
2.42M
        }
445
2.42M
    });
446
447
2.42M
    if (auto rows = block->rows()) {
448
664k
        _num_rows_returned += rows;
449
664k
    }
450
2.42M
}
451
452
29.9k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
453
29.9k
    auto result = state->get_sink_local_state_result();
454
29.9k
    if (!result) {
455
0
        return result.error();
456
0
    }
457
29.9k
    return result.value()->terminate(state);
458
29.9k
}
459
460
56.2k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
461
56.2k
    fmt::memory_buffer debug_string_buffer;
462
463
56.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
464
56.2k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
465
56.2k
    return fmt::to_string(debug_string_buffer);
466
56.2k
}
467
468
56.0k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
469
56.0k
    return state->get_sink_local_state()->debug_string(indentation_level);
470
56.0k
}
471
472
337k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
473
337k
    std::string op_name = "UNKNOWN_SINK";
474
337k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
475
476
337k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
477
337k
        op_name = it->second;
478
337k
    }
479
337k
    _name = op_name + "_OPERATOR";
480
337k
    return Status::OK();
481
337k
}
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.88M
                                                            LocalSinkStateInfo& info) {
494
1.88M
    auto local_state = LocalStateType::create_unique(this, state);
495
1.88M
    RETURN_IF_ERROR(local_state->init(state, info));
496
1.88M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
1.88M
    return Status::OK();
498
1.88M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
185k
                                                            LocalSinkStateInfo& info) {
494
185k
    auto local_state = LocalStateType::create_unique(this, state);
495
185k
    RETURN_IF_ERROR(local_state->init(state, info));
496
185k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
185k
    return Status::OK();
498
185k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
370k
                                                            LocalSinkStateInfo& info) {
494
370k
    auto local_state = LocalStateType::create_unique(this, state);
495
370k
    RETURN_IF_ERROR(local_state->init(state, info));
496
370k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
370k
    return Status::OK();
498
370k
}
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
329
                                                            LocalSinkStateInfo& info) {
494
329
    auto local_state = LocalStateType::create_unique(this, state);
495
329
    RETURN_IF_ERROR(local_state->init(state, info));
496
329
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
329
    return Status::OK();
498
329
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
65.3k
                                                            LocalSinkStateInfo& info) {
494
65.3k
    auto local_state = LocalStateType::create_unique(this, state);
495
65.3k
    RETURN_IF_ERROR(local_state->init(state, info));
496
65.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
65.3k
    return Status::OK();
498
65.3k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
8
                                                            LocalSinkStateInfo& info) {
494
8
    auto local_state = LocalStateType::create_unique(this, state);
495
8
    RETURN_IF_ERROR(local_state->init(state, info));
496
8
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
8
    return Status::OK();
498
8
}
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.49k
                                                            LocalSinkStateInfo& info) {
494
9.49k
    auto local_state = LocalStateType::create_unique(this, state);
495
9.49k
    RETURN_IF_ERROR(local_state->init(state, info));
496
9.49k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
9.49k
    return Status::OK();
498
9.49k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
12
                                                            LocalSinkStateInfo& info) {
494
12
    auto local_state = LocalStateType::create_unique(this, state);
495
12
    RETURN_IF_ERROR(local_state->init(state, info));
496
12
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
12
    return Status::OK();
498
12
}
_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
303k
                                                            LocalSinkStateInfo& info) {
494
303k
    auto local_state = LocalStateType::create_unique(this, state);
495
303k
    RETURN_IF_ERROR(local_state->init(state, info));
496
303k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
303k
    return Status::OK();
498
303k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
123k
                                                            LocalSinkStateInfo& info) {
494
123k
    auto local_state = LocalStateType::create_unique(this, state);
495
123k
    RETURN_IF_ERROR(local_state->init(state, info));
496
123k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
123k
    return Status::OK();
498
123k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
319
                                                            LocalSinkStateInfo& info) {
494
319
    auto local_state = LocalStateType::create_unique(this, state);
495
319
    RETURN_IF_ERROR(local_state->init(state, info));
496
319
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
319
    return Status::OK();
498
319
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
599k
                                                            LocalSinkStateInfo& info) {
494
599k
    auto local_state = LocalStateType::create_unique(this, state);
495
599k
    RETURN_IF_ERROR(local_state->init(state, info));
496
599k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
599k
    return Status::OK();
498
599k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
6.50k
                                                            LocalSinkStateInfo& info) {
494
6.50k
    auto local_state = LocalStateType::create_unique(this, state);
495
6.50k
    RETURN_IF_ERROR(local_state->init(state, info));
496
6.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
6.50k
    return Status::OK();
498
6.50k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
6.71k
                                                            LocalSinkStateInfo& info) {
494
6.71k
    auto local_state = LocalStateType::create_unique(this, state);
495
6.71k
    RETURN_IF_ERROR(local_state->init(state, info));
496
6.71k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
6.71k
    return Status::OK();
498
6.71k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.65k
                                                            LocalSinkStateInfo& info) {
494
2.65k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.65k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.65k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.65k
    return Status::OK();
498
2.65k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
403
                                                            LocalSinkStateInfo& info) {
494
403
    auto local_state = LocalStateType::create_unique(this, state);
495
403
    RETURN_IF_ERROR(local_state->init(state, info));
496
403
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
403
    return Status::OK();
498
403
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
4.66k
                                                            LocalSinkStateInfo& info) {
494
4.66k
    auto local_state = LocalStateType::create_unique(this, state);
495
4.66k
    RETURN_IF_ERROR(local_state->init(state, info));
496
4.66k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
4.66k
    return Status::OK();
498
4.66k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.57k
                                                            LocalSinkStateInfo& info) {
494
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.57k
    return Status::OK();
498
2.57k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.48k
                                                            LocalSinkStateInfo& info) {
494
2.48k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.48k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.48k
    return Status::OK();
498
2.48k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.50k
                                                            LocalSinkStateInfo& info) {
494
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.50k
    return Status::OK();
498
2.50k
}
_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
105
                                                            LocalSinkStateInfo& info) {
494
105
    auto local_state = LocalStateType::create_unique(this, state);
495
105
    RETURN_IF_ERROR(local_state->init(state, info));
496
105
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
105
    return Status::OK();
498
105
}
_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.55M
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.55M
    } else {
509
1.55M
        auto ss = LocalStateType::SharedStateType::create_shared();
510
1.55M
        ss->id = operator_id();
511
1.55M
        for (auto& dest : dests_id()) {
512
1.54M
            ss->related_op_ids.insert(dest);
513
1.54M
        }
514
1.55M
        return ss;
515
1.55M
    }
516
1.55M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
172k
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
172k
    } else {
509
172k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
172k
        ss->id = operator_id();
511
172k
        for (auto& dest : dests_id()) {
512
172k
            ss->related_op_ids.insert(dest);
513
172k
        }
514
172k
        return ss;
515
172k
    }
516
172k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
371k
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
371k
    } else {
509
371k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
371k
        ss->id = operator_id();
511
371k
        for (auto& dest : dests_id()) {
512
370k
            ss->related_op_ids.insert(dest);
513
370k
        }
514
371k
        return ss;
515
371k
    }
516
371k
}
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
331
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
331
    } else {
509
331
        auto ss = LocalStateType::SharedStateType::create_shared();
510
331
        ss->id = operator_id();
511
331
        for (auto& dest : dests_id()) {
512
331
            ss->related_op_ids.insert(dest);
513
331
        }
514
331
        return ss;
515
331
    }
516
331
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
64.4k
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
64.4k
    } else {
509
64.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
64.4k
        ss->id = operator_id();
511
64.4k
        for (auto& dest : dests_id()) {
512
64.3k
            ss->related_op_ids.insert(dest);
513
64.3k
        }
514
64.4k
        return ss;
515
64.4k
    }
516
64.4k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
501
8
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
8
    } else {
509
8
        auto ss = LocalStateType::SharedStateType::create_shared();
510
8
        ss->id = operator_id();
511
8
        for (auto& dest : dests_id()) {
512
8
            ss->related_op_ids.insert(dest);
513
8
        }
514
8
        return ss;
515
8
    }
516
8
}
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.51k
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.51k
    } else {
509
9.51k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
9.51k
        ss->id = operator_id();
511
9.51k
        for (auto& dest : dests_id()) {
512
9.50k
            ss->related_op_ids.insert(dest);
513
9.50k
        }
514
9.51k
        return ss;
515
9.51k
    }
516
9.51k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
12
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
12
    } else {
509
12
        auto ss = LocalStateType::SharedStateType::create_shared();
510
12
        ss->id = operator_id();
511
12
        for (auto& dest : dests_id()) {
512
12
            ss->related_op_ids.insert(dest);
513
12
        }
514
12
        return ss;
515
12
    }
516
12
}
_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
123k
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
123k
    } else {
509
123k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
123k
        ss->id = operator_id();
511
123k
        for (auto& dest : dests_id()) {
512
123k
            ss->related_op_ids.insert(dest);
513
123k
        }
514
123k
        return ss;
515
123k
    }
516
123k
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
318
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
318
    } else {
509
318
        auto ss = LocalStateType::SharedStateType::create_shared();
510
318
        ss->id = operator_id();
511
318
        for (auto& dest : dests_id()) {
512
318
            ss->related_op_ids.insert(dest);
513
318
        }
514
318
        return ss;
515
318
    }
516
318
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
600k
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
600k
    } else {
509
600k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
600k
        ss->id = operator_id();
511
600k
        for (auto& dest : dests_id()) {
512
598k
            ss->related_op_ids.insert(dest);
513
598k
        }
514
600k
        return ss;
515
600k
    }
516
600k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
6.49k
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
6.49k
    } else {
509
6.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
6.49k
        ss->id = operator_id();
511
6.50k
        for (auto& dest : dests_id()) {
512
6.50k
            ss->related_op_ids.insert(dest);
513
6.50k
        }
514
6.49k
        return ss;
515
6.49k
    }
516
6.49k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
506
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
506
    } else {
509
506
        auto ss = LocalStateType::SharedStateType::create_shared();
510
506
        ss->id = operator_id();
511
506
        for (auto& dest : dests_id()) {
512
503
            ss->related_op_ids.insert(dest);
513
503
        }
514
506
        return ss;
515
506
    }
516
506
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
501
2.49k
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.49k
    } else {
509
2.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.49k
        ss->id = operator_id();
511
2.49k
        for (auto& dest : dests_id()) {
512
2.48k
            ss->related_op_ids.insert(dest);
513
2.48k
        }
514
2.49k
        return ss;
515
2.49k
    }
516
2.49k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
501
2.51k
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.51k
    } else {
509
2.51k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.51k
        ss->id = operator_id();
511
2.51k
        for (auto& dest : dests_id()) {
512
2.51k
            ss->related_op_ids.insert(dest);
513
2.51k
        }
514
2.51k
        return ss;
515
2.51k
    }
516
2.51k
}
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
105
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
105
    } else {
509
105
        auto ss = LocalStateType::SharedStateType::create_shared();
510
105
        ss->id = operator_id();
511
105
        for (auto& dest : dests_id()) {
512
105
            ss->related_op_ids.insert(dest);
513
105
        }
514
105
        return ss;
515
105
    }
516
105
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
517
518
template <typename LocalStateType>
519
2.47M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.47M
    auto local_state = LocalStateType::create_unique(state, this);
521
2.47M
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.47M
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.47M
    return Status::OK();
524
2.47M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
137k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
137k
    auto local_state = LocalStateType::create_unique(state, this);
521
137k
    RETURN_IF_ERROR(local_state->init(state, info));
522
137k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
137k
    return Status::OK();
524
137k
}
_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.67k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.67k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.67k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.67k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.67k
    return Status::OK();
524
2.67k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
9.49k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
9.49k
    auto local_state = LocalStateType::create_unique(state, this);
521
9.49k
    RETURN_IF_ERROR(local_state->init(state, info));
522
9.49k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
9.49k
    return Status::OK();
524
9.49k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
12.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
12.2k
    auto local_state = LocalStateType::create_unique(state, this);
521
12.2k
    RETURN_IF_ERROR(local_state->init(state, info));
522
12.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
12.2k
    return Status::OK();
524
12.2k
}
_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
123k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
123k
    auto local_state = LocalStateType::create_unique(state, this);
521
123k
    RETURN_IF_ERROR(local_state->init(state, info));
522
123k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
123k
    return Status::OK();
524
123k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
313
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
313
    auto local_state = LocalStateType::create_unique(state, this);
521
313
    RETURN_IF_ERROR(local_state->init(state, info));
522
313
    state->emplace_local_state(operator_id(), std::move(local_state));
523
313
    return Status::OK();
524
313
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
3.70k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
3.70k
    auto local_state = LocalStateType::create_unique(state, this);
521
3.70k
    RETURN_IF_ERROR(local_state->init(state, info));
522
3.70k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
3.70k
    return Status::OK();
524
3.70k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
440k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
440k
    auto local_state = LocalStateType::create_unique(state, this);
521
440k
    RETURN_IF_ERROR(local_state->init(state, info));
522
440k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
440k
    return Status::OK();
524
440k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.53k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.53k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.53k
    return Status::OK();
524
1.53k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
6.46k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
6.46k
    auto local_state = LocalStateType::create_unique(state, this);
521
6.46k
    RETURN_IF_ERROR(local_state->init(state, info));
522
6.46k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
6.46k
    return Status::OK();
524
6.46k
}
_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
6.98k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
6.98k
    auto local_state = LocalStateType::create_unique(state, this);
521
6.98k
    RETURN_IF_ERROR(local_state->init(state, info));
522
6.98k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
6.98k
    return Status::OK();
524
6.98k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
404
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
404
    auto local_state = LocalStateType::create_unique(state, this);
521
404
    RETURN_IF_ERROR(local_state->init(state, info));
522
404
    state->emplace_local_state(operator_id(), std::move(local_state));
523
404
    return Status::OK();
524
404
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.48k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.48k
    return Status::OK();
524
2.48k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.52k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.52k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.52k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.52k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.52k
    return Status::OK();
524
2.52k
}
_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
5.32k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
5.32k
    auto local_state = LocalStateType::create_unique(state, this);
521
5.32k
    RETURN_IF_ERROR(local_state->init(state, info));
522
5.32k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
5.32k
    return Status::OK();
524
5.32k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
656k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
656k
    auto local_state = LocalStateType::create_unique(state, this);
521
656k
    RETURN_IF_ERROR(local_state->init(state, info));
522
656k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
656k
    return Status::OK();
524
656k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
363
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
363
    auto local_state = LocalStateType::create_unique(state, this);
521
363
    RETURN_IF_ERROR(local_state->init(state, info));
522
363
    state->emplace_local_state(operator_id(), std::move(local_state));
523
363
    return Status::OK();
524
363
}
_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
668
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
668
    auto local_state = LocalStateType::create_unique(state, this);
521
668
    RETURN_IF_ERROR(local_state->init(state, info));
522
668
    state->emplace_local_state(operator_id(), std::move(local_state));
523
668
    return Status::OK();
524
668
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
937
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
937
    auto local_state = LocalStateType::create_unique(state, this);
521
937
    RETURN_IF_ERROR(local_state->init(state, info));
522
937
    state->emplace_local_state(operator_id(), std::move(local_state));
523
937
    return Status::OK();
524
937
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
8.01k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
8.01k
    auto local_state = LocalStateType::create_unique(state, this);
521
8.01k
    RETURN_IF_ERROR(local_state->init(state, info));
522
8.01k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
8.01k
    return Status::OK();
524
8.01k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
506k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
506k
    auto local_state = LocalStateType::create_unique(state, this);
521
506k
    RETURN_IF_ERROR(local_state->init(state, info));
522
506k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
506k
    return Status::OK();
524
506k
}
525
526
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
527
                                                         RuntimeState* state)
528
1.88M
        : _parent(parent), _state(state) {}
529
530
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
531
2.47M
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
532
533
template <typename SharedStateArg>
534
2.48M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
2.48M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
2.48M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
2.48M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
2.48M
    _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.48M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
2.48M
    _operator_profile->add_child(_common_profile.get(), true);
543
2.48M
    _operator_profile->add_child(_custom_profile.get(), true);
544
2.48M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
2.48M
    if constexpr (!is_fake_shared) {
546
1.18M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
670k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
670k
                                    .first.get()
549
670k
                                    ->template cast<SharedStateArg>();
550
551
670k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
670k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
670k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
670k
        } else if (info.shared_state) {
555
474k
            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
474k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
474k
            _dependency = _shared_state->create_source_dependency(
562
474k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
474k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
474k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
474k
        } else {
566
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
18.4E
                DCHECK(false);
568
18.4E
            }
569
39.2k
        }
570
1.18M
    }
571
572
2.48M
    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.48M
    _rows_returned_counter =
577
2.48M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
2.48M
    _blocks_returned_counter =
579
2.48M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
2.48M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
2.48M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
2.48M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
2.48M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
2.48M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
2.48M
    _memory_used_counter =
586
2.48M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
2.48M
    _common_profile->add_info_string("IsColocate",
588
2.48M
                                     std::to_string(_parent->is_colocated_operator()));
589
2.48M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
2.48M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
2.48M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
2.48M
    return Status::OK();
593
2.48M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
138k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
138k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
138k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
138k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
138k
    _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
138k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
138k
    _operator_profile->add_child(_common_profile.get(), true);
543
138k
    _operator_profile->add_child(_custom_profile.get(), true);
544
138k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
138k
    if constexpr (!is_fake_shared) {
546
138k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
13.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
13.1k
                                    .first.get()
549
13.1k
                                    ->template cast<SharedStateArg>();
550
551
13.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
13.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
13.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
124k
        } 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
124k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
124k
            _dependency = _shared_state->create_source_dependency(
562
124k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
124k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
124k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
124k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
608
        }
570
138k
    }
571
572
138k
    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
138k
    _rows_returned_counter =
577
138k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
138k
    _blocks_returned_counter =
579
138k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
138k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
138k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
138k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
138k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
138k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
138k
    _memory_used_counter =
586
138k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
138k
    _common_profile->add_info_string("IsColocate",
588
138k
                                     std::to_string(_parent->is_colocated_operator()));
589
138k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
138k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
138k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
138k
    return Status::OK();
593
138k
}
_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
194k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
194k
            _dependency = _shared_state->create_source_dependency(
562
194k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
194k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
194k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
194k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
2.04k
        }
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
6.46k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
6.46k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
6.46k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
6.46k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
6.46k
    _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
6.46k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
6.46k
    _operator_profile->add_child(_common_profile.get(), true);
543
6.46k
    _operator_profile->add_child(_custom_profile.get(), true);
544
6.46k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
6.46k
    if constexpr (!is_fake_shared) {
546
6.46k
        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
6.46k
        } 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
6.43k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
6.43k
            _dependency = _shared_state->create_source_dependency(
562
6.43k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
6.43k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
6.43k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
6.43k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
32
        }
570
6.46k
    }
571
572
6.46k
    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
6.46k
    _rows_returned_counter =
577
6.46k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
6.46k
    _blocks_returned_counter =
579
6.46k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
6.46k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
6.46k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
6.46k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
6.46k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
6.46k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
6.46k
    _memory_used_counter =
586
6.46k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
6.46k
    _common_profile->add_info_string("IsColocate",
588
6.46k
                                     std::to_string(_parent->is_colocated_operator()));
589
6.46k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
6.46k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
6.46k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
6.46k
    return Status::OK();
593
6.46k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
9.50k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
9.50k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
9.50k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
9.50k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
9.50k
    _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.50k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
9.50k
    _operator_profile->add_child(_common_profile.get(), true);
543
9.50k
    _operator_profile->add_child(_custom_profile.get(), true);
544
9.50k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
9.50k
    if constexpr (!is_fake_shared) {
546
9.50k
        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.50k
        } 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
9.46k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
9.46k
            _dependency = _shared_state->create_source_dependency(
562
9.46k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
9.46k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
9.46k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
9.46k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
40
        }
570
9.50k
    }
571
572
9.50k
    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.50k
    _rows_returned_counter =
577
9.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
9.50k
    _blocks_returned_counter =
579
9.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
9.50k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
9.50k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
9.50k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
9.50k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
9.50k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
9.50k
    _memory_used_counter =
586
9.50k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
9.50k
    _common_profile->add_info_string("IsColocate",
588
9.50k
                                     std::to_string(_parent->is_colocated_operator()));
589
9.50k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
9.50k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
9.50k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
9.50k
    return Status::OK();
593
9.50k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
123k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
123k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
123k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
123k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
123k
    _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
123k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
123k
    _operator_profile->add_child(_common_profile.get(), true);
543
123k
    _operator_profile->add_child(_custom_profile.get(), true);
544
123k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
123k
    if constexpr (!is_fake_shared) {
546
123k
        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
123k
        } 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
123k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
123k
            _dependency = _shared_state->create_source_dependency(
562
123k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
123k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
123k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
123k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
454
        }
570
123k
    }
571
572
123k
    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
123k
    _rows_returned_counter =
577
123k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
123k
    _blocks_returned_counter =
579
123k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
123k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
123k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
123k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
123k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
123k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
123k
    _memory_used_counter =
586
123k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
123k
    _common_profile->add_info_string("IsColocate",
588
123k
                                     std::to_string(_parent->is_colocated_operator()));
589
123k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
123k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
123k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
123k
    return Status::OK();
593
123k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
313
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
313
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
313
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
313
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
313
    _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
313
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
313
    _operator_profile->add_child(_common_profile.get(), true);
543
313
    _operator_profile->add_child(_custom_profile.get(), true);
544
313
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
313
    if constexpr (!is_fake_shared) {
546
313
        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
313
        } 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
313
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
313
            _dependency = _shared_state->create_source_dependency(
562
313
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
313
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
313
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
313
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
313
    }
571
572
313
    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
313
    _rows_returned_counter =
577
313
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
313
    _blocks_returned_counter =
579
313
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
313
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
313
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
313
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
313
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
313
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
313
    _memory_used_counter =
586
313
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
313
    _common_profile->add_info_string("IsColocate",
588
313
                                     std::to_string(_parent->is_colocated_operator()));
589
313
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
313
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
313
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
313
    return Status::OK();
593
313
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
1.29M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
1.29M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
1.29M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
1.29M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
1.29M
    _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.29M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
1.29M
    _operator_profile->add_child(_common_profile.get(), true);
543
1.29M
    _operator_profile->add_child(_custom_profile.get(), true);
544
1.29M
    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.29M
    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.29M
    _rows_returned_counter =
577
1.29M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
1.29M
    _blocks_returned_counter =
579
1.29M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
1.29M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
1.29M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
1.29M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
1.29M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
1.29M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
1.29M
    _memory_used_counter =
586
1.29M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
1.29M
    _common_profile->add_info_string("IsColocate",
588
1.29M
                                     std::to_string(_parent->is_colocated_operator()));
589
1.29M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
1.29M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
1.29M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
1.29M
    return Status::OK();
593
1.29M
}
_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.17k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
3.17k
            _dependency = _shared_state->create_source_dependency(
562
3.17k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
3.17k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
3.17k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
36.3k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
36.3k
        }
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
365
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
365
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
365
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
365
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
365
    _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
365
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
365
    _operator_profile->add_child(_common_profile.get(), true);
543
365
    _operator_profile->add_child(_custom_profile.get(), true);
544
365
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
365
    if constexpr (!is_fake_shared) {
546
365
        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
368
        } 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
368
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
368
            _dependency = _shared_state->create_source_dependency(
562
368
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
368
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
368
                    _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
365
    }
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
365
    _rows_returned_counter =
577
365
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
365
    _blocks_returned_counter =
579
365
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
365
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
365
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
365
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
365
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
365
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
365
    _memory_used_counter =
586
365
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
365
    _common_profile->add_info_string("IsColocate",
588
365
                                     std::to_string(_parent->is_colocated_operator()));
589
365
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
365
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
365
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
365
    return Status::OK();
593
365
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
6.99k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
6.99k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
6.99k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
6.99k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
6.99k
    _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
6.99k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
6.99k
    _operator_profile->add_child(_common_profile.get(), true);
543
6.99k
    _operator_profile->add_child(_custom_profile.get(), true);
544
6.99k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
6.99k
    if constexpr (!is_fake_shared) {
546
6.99k
        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
6.99k
        } 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
6.98k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
6.98k
            _dependency = _shared_state->create_source_dependency(
562
6.98k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
6.98k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
6.98k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
6.98k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
10
        }
570
6.99k
    }
571
572
6.99k
    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
6.99k
    _rows_returned_counter =
577
6.99k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
6.99k
    _blocks_returned_counter =
579
6.99k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
6.99k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
6.99k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
6.99k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
6.99k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
6.99k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
6.99k
    _memory_used_counter =
586
6.99k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
6.99k
    _common_profile->add_info_string("IsColocate",
588
6.99k
                                     std::to_string(_parent->is_colocated_operator()));
589
6.99k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
6.99k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
6.99k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
6.99k
    return Status::OK();
593
6.99k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
504
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
504
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
504
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
504
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
504
    _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
504
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
504
    _operator_profile->add_child(_common_profile.get(), true);
543
504
    _operator_profile->add_child(_custom_profile.get(), true);
544
504
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
504
    if constexpr (!is_fake_shared) {
546
504
        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
506
        } 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
506
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
506
            _dependency = _shared_state->create_source_dependency(
562
506
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
506
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
506
                    _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
504
    }
571
572
504
    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
504
    _rows_returned_counter =
577
504
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
504
    _blocks_returned_counter =
579
504
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
504
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
504
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
504
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
504
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
504
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
504
    _memory_used_counter =
586
504
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
504
    _common_profile->add_info_string("IsColocate",
588
504
                                     std::to_string(_parent->is_colocated_operator()));
589
504
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
504
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
504
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
504
    return Status::OK();
593
504
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
5.03k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
5.03k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
5.03k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
5.03k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
5.03k
    _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.03k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
5.03k
    _operator_profile->add_child(_common_profile.get(), true);
543
5.03k
    _operator_profile->add_child(_custom_profile.get(), true);
544
5.03k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
5.03k
    if constexpr (!is_fake_shared) {
546
5.03k
        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.03k
        } 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.01k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
5.01k
            _dependency = _shared_state->create_source_dependency(
562
5.01k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
5.01k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
5.01k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
5.01k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
21
        }
570
5.03k
    }
571
572
5.03k
    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.03k
    _rows_returned_counter =
577
5.03k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
5.03k
    _blocks_returned_counter =
579
5.03k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
5.03k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
5.03k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
5.03k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
5.03k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
5.03k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
5.03k
    _memory_used_counter =
586
5.03k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
5.03k
    _common_profile->add_info_string("IsColocate",
588
5.03k
                                     std::to_string(_parent->is_colocated_operator()));
589
5.03k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
5.03k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
5.03k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
5.03k
    return Status::OK();
593
5.03k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
657k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
657k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
657k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
657k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
657k
    _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
657k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
657k
    _operator_profile->add_child(_common_profile.get(), true);
543
657k
    _operator_profile->add_child(_custom_profile.get(), true);
544
657k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
657k
    if constexpr (!is_fake_shared) {
546
657k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
657k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
657k
                                    .first.get()
549
657k
                                    ->template cast<SharedStateArg>();
550
551
657k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
657k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
657k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
18.4E
        } 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
18.4E
        } else {
566
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
18.4E
                DCHECK(false);
568
18.4E
            }
569
18.4E
        }
570
657k
    }
571
572
657k
    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
657k
    _rows_returned_counter =
577
657k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
657k
    _blocks_returned_counter =
579
657k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
657k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
657k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
657k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
657k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
657k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
657k
    _memory_used_counter =
586
657k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
657k
    _common_profile->add_info_string("IsColocate",
588
657k
                                     std::to_string(_parent->is_colocated_operator()));
589
657k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
657k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
657k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
657k
    return Status::OK();
593
657k
}
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.48M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
2.48M
    _conjuncts.resize(_parent->_conjuncts.size());
598
2.48M
    _projections.resize(_parent->_projections.size());
599
2.81M
    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.04M
    for (size_t i = 0; i < _projections.size(); i++) {
603
2.56M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
2.56M
    }
605
2.48M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
2.49M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
7.89k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
51.5k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
43.6k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
43.6k
                    state, _intermediate_projections[i][j]));
611
43.6k
        }
612
7.89k
    }
613
2.48M
    return Status::OK();
614
2.48M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
138k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
138k
    _conjuncts.resize(_parent->_conjuncts.size());
598
138k
    _projections.resize(_parent->_projections.size());
599
139k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.17k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.17k
    }
602
717k
    for (size_t i = 0; i < _projections.size(); i++) {
603
579k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
579k
    }
605
138k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
138k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
877
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
8.93k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
8.05k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
8.05k
                    state, _intermediate_projections[i][j]));
611
8.05k
        }
612
877
    }
613
138k
    return Status::OK();
614
138k
}
_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
218k
    for (size_t i = 0; i < _projections.size(); i++) {
603
21.3k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
21.3k
    }
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
18
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
18
    _conjuncts.resize(_parent->_conjuncts.size());
598
18
    _projections.resize(_parent->_projections.size());
599
18
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
18
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
18
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
18
    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
18
    return Status::OK();
614
18
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
6.50k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
6.50k
    _conjuncts.resize(_parent->_conjuncts.size());
598
6.50k
    _projections.resize(_parent->_projections.size());
599
6.56k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
62
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
62
    }
602
30.6k
    for (size_t i = 0; i < _projections.size(); i++) {
603
24.1k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
24.1k
    }
605
6.50k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
6.51k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
5
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
39
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
34
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
34
                    state, _intermediate_projections[i][j]));
611
34
        }
612
5
    }
613
6.50k
    return Status::OK();
614
6.50k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
9.52k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
9.52k
    _conjuncts.resize(_parent->_conjuncts.size());
598
9.52k
    _projections.resize(_parent->_projections.size());
599
10.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
907
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
907
    }
602
25.9k
    for (size_t i = 0; i < _projections.size(); i++) {
603
16.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
16.4k
    }
605
9.52k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
9.69k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
168
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.27k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
1.10k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
1.10k
                    state, _intermediate_projections[i][j]));
611
1.10k
        }
612
168
    }
613
9.52k
    return Status::OK();
614
9.52k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
123k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
123k
    _conjuncts.resize(_parent->_conjuncts.size());
598
123k
    _projections.resize(_parent->_projections.size());
599
125k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.78k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.78k
    }
602
438k
    for (size_t i = 0; i < _projections.size(); i++) {
603
314k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
314k
    }
605
123k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
123k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
141
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.13k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
997
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
997
                    state, _intermediate_projections[i][j]));
611
997
        }
612
141
    }
613
123k
    return Status::OK();
614
123k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
317
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
317
    _conjuncts.resize(_parent->_conjuncts.size());
598
317
    _projections.resize(_parent->_projections.size());
599
317
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
755
    for (size_t i = 0; i < _projections.size(); i++) {
603
438
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
438
    }
605
317
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
317
    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
317
    return Status::OK();
614
317
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
1.29M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
1.29M
    _conjuncts.resize(_parent->_conjuncts.size());
598
1.29M
    _projections.resize(_parent->_projections.size());
599
1.62M
    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.81M
    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.29M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
1.30M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
6.70k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
40.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
33.4k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
33.4k
                    state, _intermediate_projections[i][j]));
611
33.4k
        }
612
6.70k
    }
613
1.29M
    return Status::OK();
614
1.29M
}
_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.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
93.0k
    }
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
6.97k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
6.97k
    _conjuncts.resize(_parent->_conjuncts.size());
598
6.97k
    _projections.resize(_parent->_projections.size());
599
7.66k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
692
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
692
    }
602
6.97k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
6.97k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
6.97k
    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
6.97k
    return Status::OK();
614
6.97k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
506
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
506
    _conjuncts.resize(_parent->_conjuncts.size());
598
506
    _projections.resize(_parent->_projections.size());
599
506
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
506
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
506
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
506
    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
506
    return Status::OK();
614
506
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
5.03k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
5.03k
    _conjuncts.resize(_parent->_conjuncts.size());
598
5.03k
    _projections.resize(_parent->_projections.size());
599
5.03k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
5.03k
    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.03k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
5.03k
    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.03k
    return Status::OK();
614
5.03k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
658k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
658k
    _conjuncts.resize(_parent->_conjuncts.size());
598
658k
    _projections.resize(_parent->_projections.size());
599
658k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
658k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
658k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
658k
    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
658k
    return Status::OK();
614
658k
}
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.35k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
8.35k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
8.35k
    _terminated = true;
622
8.35k
    return Status::OK();
623
8.35k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
1.60k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
1.60k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
1.60k
    _terminated = true;
622
1.60k
    return Status::OK();
623
1.60k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
200
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
200
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
200
    _terminated = true;
622
200
    return Status::OK();
623
200
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
182
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
182
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
182
    _terminated = true;
622
182
    return Status::OK();
623
182
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
942
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
942
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
942
    _terminated = true;
622
942
    return Status::OK();
623
942
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
4.53k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
4.53k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
4.53k
    _terminated = true;
622
4.53k
    return Status::OK();
623
4.53k
}
_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
61
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
61
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
61
    _terminated = true;
622
61
    return Status::OK();
623
61
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
2
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
2
    _terminated = true;
622
2
    return Status::OK();
623
2
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
810
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
810
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
810
    _terminated = true;
622
810
    return Status::OK();
623
810
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
14
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
14
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
14
    _terminated = true;
622
14
    return Status::OK();
623
14
}
624
625
template <typename SharedStateArg>
626
2.71M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
2.71M
    if (_closed) {
628
227k
        return Status::OK();
629
227k
    }
630
2.48M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
1.18M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
1.18M
    }
633
2.48M
    _closed = true;
634
2.48M
    return Status::OK();
635
2.71M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
138k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
138k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
138k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
138k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
138k
    }
633
138k
    _closed = true;
634
138k
    return Status::OK();
635
138k
}
_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
6.49k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
6.49k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
6.49k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
6.49k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
6.49k
    }
633
6.49k
    _closed = true;
634
6.49k
    return Status::OK();
635
6.49k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
19.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
19.1k
    if (_closed) {
628
9.64k
        return Status::OK();
629
9.64k
    }
630
9.51k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
9.51k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
9.51k
    }
633
9.51k
    _closed = true;
634
9.51k
    return Status::OK();
635
19.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
123k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
123k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
123k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
123k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
123k
    }
633
123k
    _closed = true;
634
123k
    return Status::OK();
635
123k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
310
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
310
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
310
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
310
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
310
    }
633
310
    _closed = true;
634
310
    return Status::OK();
635
310
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
1.31M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
1.31M
    if (_closed) {
628
15.2k
        return Status::OK();
629
15.2k
    }
630
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
    }
633
1.29M
    _closed = true;
634
1.29M
    return Status::OK();
635
1.31M
}
_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
729
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
729
    if (_closed) {
628
366
        return Status::OK();
629
366
    }
630
363
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
363
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
363
    }
633
363
    _closed = true;
634
363
    return Status::OK();
635
729
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
6.96k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
6.96k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
6.96k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
6.96k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
6.96k
    }
633
6.96k
    _closed = true;
634
6.96k
    return Status::OK();
635
6.96k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
807
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
807
    if (_closed) {
628
404
        return Status::OK();
629
404
    }
630
403
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
403
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
403
    }
633
403
    _closed = true;
634
403
    return Status::OK();
635
807
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
10.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
10.5k
    if (_closed) {
628
5.48k
        return Status::OK();
629
5.48k
    }
630
5.02k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
5.02k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
5.02k
    }
633
5.02k
    _closed = true;
634
5.02k
    return Status::OK();
635
10.5k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
660k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
660k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
660k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
660k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
660k
    }
633
660k
    _closed = true;
634
660k
    return Status::OK();
635
660k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
306
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
306
    if (_closed) {
628
156
        return Status::OK();
629
156
    }
630
150
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
150
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
150
    }
633
150
    _closed = true;
634
150
    return Status::OK();
635
306
}
636
637
template <typename SharedState>
638
1.88M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
1.88M
    _operator_profile =
641
1.88M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
1.88M
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
1.88M
    _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.88M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
1.88M
    _operator_profile->add_child(_common_profile, true);
650
1.88M
    _operator_profile->add_child(_custom_profile, true);
651
652
1.88M
    _operator_profile->set_metadata(_parent->node_id());
653
1.88M
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
1.88M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
1.88M
    if constexpr (!is_fake_shared) {
656
1.28M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
1.28M
            info.shared_state_map.end()) {
658
318k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
303k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
303k
            }
661
318k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
318k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
318k
                                                  ? 0
664
318k
                                                  : info.task_idx]
665
318k
                                  .get();
666
318k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
969k
        } else {
668
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
18.4E
                DCHECK(false);
670
18.4E
            }
671
969k
            _shared_state = info.shared_state->template cast<SharedState>();
672
969k
            _dependency = _shared_state->create_sink_dependency(
673
969k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
969k
        }
675
1.28M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
1.28M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
1.28M
    }
678
679
1.88M
    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.88M
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
1.88M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
1.88M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
1.88M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
1.88M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
1.88M
    _memory_used_counter =
689
1.88M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
1.88M
    _common_profile->add_info_string("IsColocate",
691
1.88M
                                     std::to_string(_parent->is_colocated_operator()));
692
1.88M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
1.88M
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
1.88M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
1.88M
    return Status::OK();
696
1.88M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
186k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
186k
    _operator_profile =
641
186k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
186k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
186k
    _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
186k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
186k
    _operator_profile->add_child(_common_profile, true);
650
186k
    _operator_profile->add_child(_custom_profile, true);
651
652
186k
    _operator_profile->set_metadata(_parent->node_id());
653
186k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
186k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
186k
    if constexpr (!is_fake_shared) {
656
186k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
186k
            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.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
13.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
13.2k
                                                  ? 0
664
13.2k
                                                  : info.task_idx]
665
13.2k
                                  .get();
666
13.2k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
172k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
172k
            _shared_state = info.shared_state->template cast<SharedState>();
672
172k
            _dependency = _shared_state->create_sink_dependency(
673
172k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
172k
        }
675
186k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
186k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
186k
    }
678
679
186k
    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
186k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
186k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
186k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
186k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
186k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
186k
    _memory_used_counter =
689
186k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
186k
    _common_profile->add_info_string("IsColocate",
691
186k
                                     std::to_string(_parent->is_colocated_operator()));
692
186k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
186k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
186k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
186k
    return Status::OK();
696
186k
}
_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
197k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
197k
    _operator_profile =
641
197k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
197k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
197k
    _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
197k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
197k
    _operator_profile->add_child(_common_profile, true);
650
197k
    _operator_profile->add_child(_custom_profile, true);
651
652
197k
    _operator_profile->set_metadata(_parent->node_id());
653
197k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
197k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
197k
    if constexpr (!is_fake_shared) {
656
197k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
197k
            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
197k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
197k
            _shared_state = info.shared_state->template cast<SharedState>();
672
197k
            _dependency = _shared_state->create_sink_dependency(
673
197k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
197k
        }
675
197k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
197k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
197k
    }
678
679
197k
    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
197k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
197k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
197k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
197k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
197k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
197k
    _memory_used_counter =
689
197k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
197k
    _common_profile->add_info_string("IsColocate",
691
197k
                                     std::to_string(_parent->is_colocated_operator()));
692
197k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
197k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
197k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
197k
    return Status::OK();
696
197k
}
_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
6.50k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
6.50k
    _operator_profile =
641
6.50k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
6.50k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
6.50k
    _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
6.50k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
6.50k
    _operator_profile->add_child(_common_profile, true);
650
6.50k
    _operator_profile->add_child(_custom_profile, true);
651
652
6.50k
    _operator_profile->set_metadata(_parent->node_id());
653
6.50k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
6.50k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
6.50k
    if constexpr (!is_fake_shared) {
656
6.50k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
6.50k
            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
6.50k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
6.50k
            _shared_state = info.shared_state->template cast<SharedState>();
672
6.50k
            _dependency = _shared_state->create_sink_dependency(
673
6.50k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
6.50k
        }
675
6.50k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
6.50k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
6.50k
    }
678
679
6.50k
    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
6.50k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
6.50k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
6.50k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
6.50k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
6.50k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
6.50k
    _memory_used_counter =
689
6.50k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
6.50k
    _common_profile->add_info_string("IsColocate",
691
6.50k
                                     std::to_string(_parent->is_colocated_operator()));
692
6.50k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
6.50k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
6.50k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
6.50k
    return Status::OK();
696
6.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
9.52k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
9.52k
    _operator_profile =
641
9.52k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
9.52k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
9.52k
    _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.52k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
9.52k
    _operator_profile->add_child(_common_profile, true);
650
9.52k
    _operator_profile->add_child(_custom_profile, true);
651
652
9.52k
    _operator_profile->set_metadata(_parent->node_id());
653
9.52k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
9.52k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
9.52k
    if constexpr (!is_fake_shared) {
656
9.52k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
9.52k
            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.52k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
9.52k
            _shared_state = info.shared_state->template cast<SharedState>();
672
9.52k
            _dependency = _shared_state->create_sink_dependency(
673
9.52k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
9.52k
        }
675
9.52k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
9.52k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
9.52k
    }
678
679
9.52k
    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.52k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
9.52k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
9.52k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
9.52k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
9.52k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
9.52k
    _memory_used_counter =
689
9.52k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
9.52k
    _common_profile->add_info_string("IsColocate",
691
9.52k
                                     std::to_string(_parent->is_colocated_operator()));
692
9.52k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
9.52k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
9.52k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
9.52k
    return Status::OK();
696
9.52k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
123k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
123k
    _operator_profile =
641
123k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
123k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
123k
    _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
123k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
123k
    _operator_profile->add_child(_common_profile, true);
650
123k
    _operator_profile->add_child(_custom_profile, true);
651
652
123k
    _operator_profile->set_metadata(_parent->node_id());
653
123k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
123k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
123k
    if constexpr (!is_fake_shared) {
656
123k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
123k
            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
123k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
123k
            _shared_state = info.shared_state->template cast<SharedState>();
672
123k
            _dependency = _shared_state->create_sink_dependency(
673
123k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
123k
        }
675
123k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
123k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
123k
    }
678
679
123k
    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
123k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
123k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
123k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
123k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
123k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
123k
    _memory_used_counter =
689
123k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
123k
    _common_profile->add_info_string("IsColocate",
691
123k
                                     std::to_string(_parent->is_colocated_operator()));
692
123k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
123k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
123k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
123k
    return Status::OK();
696
123k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
319
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
319
    _operator_profile =
641
319
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
319
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
319
    _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
319
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
319
    _operator_profile->add_child(_common_profile, true);
650
319
    _operator_profile->add_child(_custom_profile, true);
651
652
319
    _operator_profile->set_metadata(_parent->node_id());
653
319
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
319
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
319
    if constexpr (!is_fake_shared) {
656
319
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
319
            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
319
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
319
            _shared_state = info.shared_state->template cast<SharedState>();
672
319
            _dependency = _shared_state->create_sink_dependency(
673
319
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
319
        }
675
319
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
319
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
319
    }
678
679
319
    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
319
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
319
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
319
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
319
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
319
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
319
    _memory_used_counter =
689
319
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
319
    _common_profile->add_info_string("IsColocate",
691
319
                                     std::to_string(_parent->is_colocated_operator()));
692
319
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
319
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
319
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
319
    return Status::OK();
696
319
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
601k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
601k
    _operator_profile =
641
601k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
601k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
601k
    _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
601k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
601k
    _operator_profile->add_child(_common_profile, true);
650
601k
    _operator_profile->add_child(_custom_profile, true);
651
652
601k
    _operator_profile->set_metadata(_parent->node_id());
653
601k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
601k
    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
601k
    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
601k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
601k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
601k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
601k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
601k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
601k
    _memory_used_counter =
689
601k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
601k
    _common_profile->add_info_string("IsColocate",
691
601k
                                     std::to_string(_parent->is_colocated_operator()));
692
601k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
601k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
601k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
601k
    return Status::OK();
696
601k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
6.71k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
6.71k
    _operator_profile =
641
6.71k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
6.71k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
6.71k
    _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
6.71k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
6.71k
    _operator_profile->add_child(_common_profile, true);
650
6.71k
    _operator_profile->add_child(_custom_profile, true);
651
652
6.71k
    _operator_profile->set_metadata(_parent->node_id());
653
6.71k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
6.71k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
6.71k
    if constexpr (!is_fake_shared) {
656
6.71k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
6.71k
            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
6.71k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
6.71k
            _shared_state = info.shared_state->template cast<SharedState>();
672
6.71k
            _dependency = _shared_state->create_sink_dependency(
673
6.71k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
6.71k
        }
675
6.71k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
6.71k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
6.71k
    }
678
679
6.71k
    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
6.71k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
6.71k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
6.71k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
6.71k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
6.71k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
6.71k
    _memory_used_counter =
689
6.71k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
6.71k
    _common_profile->add_info_string("IsColocate",
691
6.71k
                                     std::to_string(_parent->is_colocated_operator()));
692
6.71k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
6.71k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
6.71k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
6.71k
    return Status::OK();
696
6.71k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
506
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
506
    _operator_profile =
641
506
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
506
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
506
    _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
506
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
506
    _operator_profile->add_child(_common_profile, true);
650
506
    _operator_profile->add_child(_custom_profile, true);
651
652
506
    _operator_profile->set_metadata(_parent->node_id());
653
506
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
506
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
506
    if constexpr (!is_fake_shared) {
656
506
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
506
            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
506
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
506
            _shared_state = info.shared_state->template cast<SharedState>();
672
506
            _dependency = _shared_state->create_sink_dependency(
673
506
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
506
        }
675
506
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
506
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
506
    }
678
679
506
    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
506
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
506
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
506
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
506
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
506
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
506
    _memory_used_counter =
689
506
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
506
    _common_profile->add_info_string("IsColocate",
691
506
                                     std::to_string(_parent->is_colocated_operator()));
692
506
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
506
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
506
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
506
    return Status::OK();
696
506
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
2.65k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
2.65k
    _operator_profile =
641
2.65k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
2.65k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
2.65k
    _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.65k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
2.65k
    _operator_profile->add_child(_common_profile, true);
650
2.65k
    _operator_profile->add_child(_custom_profile, true);
651
652
2.65k
    _operator_profile->set_metadata(_parent->node_id());
653
2.65k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
2.65k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
2.65k
    if constexpr (!is_fake_shared) {
656
2.65k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
2.65k
            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.65k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
2.65k
            _shared_state = info.shared_state->template cast<SharedState>();
672
2.65k
            _dependency = _shared_state->create_sink_dependency(
673
2.65k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
2.65k
        }
675
2.65k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
2.65k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
2.65k
    }
678
679
2.65k
    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.65k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
2.65k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
2.65k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
2.65k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
2.65k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
2.65k
    _memory_used_counter =
689
2.65k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
2.65k
    _common_profile->add_info_string("IsColocate",
691
2.65k
                                     std::to_string(_parent->is_colocated_operator()));
692
2.65k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
2.65k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
2.65k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
2.65k
    return Status::OK();
696
2.65k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
12.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
12.3k
    _operator_profile =
641
12.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
12.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
12.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
12.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
12.3k
    _operator_profile->add_child(_common_profile, true);
650
12.3k
    _operator_profile->add_child(_custom_profile, true);
651
652
12.3k
    _operator_profile->set_metadata(_parent->node_id());
653
12.3k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
12.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
12.3k
    if constexpr (!is_fake_shared) {
656
12.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
12.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
12.3k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
12.3k
            _shared_state = info.shared_state->template cast<SharedState>();
672
12.3k
            _dependency = _shared_state->create_sink_dependency(
673
12.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
12.3k
        }
675
12.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
12.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
12.3k
    }
678
679
12.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
12.3k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
12.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
12.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
12.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
12.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
12.3k
    _memory_used_counter =
689
12.3k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
12.3k
    _common_profile->add_info_string("IsColocate",
691
12.3k
                                     std::to_string(_parent->is_colocated_operator()));
692
12.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
12.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
12.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
12.3k
    return Status::OK();
696
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
303k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
303k
    _operator_profile =
641
303k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
303k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
303k
    _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
303k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
303k
    _operator_profile->add_child(_common_profile, true);
650
303k
    _operator_profile->add_child(_custom_profile, true);
651
652
303k
    _operator_profile->set_metadata(_parent->node_id());
653
303k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
303k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
303k
    if constexpr (!is_fake_shared) {
656
303k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
303k
            info.shared_state_map.end()) {
658
303k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
303k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
303k
            }
661
303k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
303k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
303k
                                                  ? 0
664
303k
                                                  : info.task_idx]
665
303k
                                  .get();
666
303k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
18.4E
        } else {
668
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
18.4E
                DCHECK(false);
670
18.4E
            }
671
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
672
18.4E
            _dependency = _shared_state->create_sink_dependency(
673
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
18.4E
        }
675
303k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
303k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
303k
    }
678
679
303k
    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
303k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
303k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
303k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
303k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
303k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
303k
    _memory_used_counter =
689
303k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
303k
    _common_profile->add_info_string("IsColocate",
691
303k
                                     std::to_string(_parent->is_colocated_operator()));
692
303k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
303k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
303k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
303k
    return Status::OK();
696
303k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
437k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
437k
    _operator_profile =
641
437k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
437k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
437k
    _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
437k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
437k
    _operator_profile->add_child(_common_profile, true);
650
437k
    _operator_profile->add_child(_custom_profile, true);
651
652
437k
    _operator_profile->set_metadata(_parent->node_id());
653
437k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
437k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
437k
    if constexpr (!is_fake_shared) {
656
437k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
437k
            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
957
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
957
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
957
                                                  ? 0
664
957
                                                  : info.task_idx]
665
957
                                  .get();
666
957
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
436k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
436k
            _shared_state = info.shared_state->template cast<SharedState>();
672
436k
            _dependency = _shared_state->create_sink_dependency(
673
436k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
436k
        }
675
437k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
437k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
437k
    }
678
679
437k
    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
437k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
437k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
437k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
437k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
437k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
437k
    _memory_used_counter =
689
437k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
437k
    _common_profile->add_info_string("IsColocate",
691
437k
                                     std::to_string(_parent->is_colocated_operator()));
692
437k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
437k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
437k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
437k
    return Status::OK();
696
437k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
367
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
367
    _operator_profile =
641
367
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
367
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
367
    _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
367
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
367
    _operator_profile->add_child(_common_profile, true);
650
367
    _operator_profile->add_child(_custom_profile, true);
651
652
367
    _operator_profile->set_metadata(_parent->node_id());
653
367
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
367
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
367
    if constexpr (!is_fake_shared) {
656
367
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
367
            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
367
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
367
            _shared_state = info.shared_state->template cast<SharedState>();
672
367
            _dependency = _shared_state->create_sink_dependency(
673
367
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
367
        }
675
367
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
367
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
367
    }
678
679
368
    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
367
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
367
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
367
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
367
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
367
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
367
    _memory_used_counter =
689
367
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
367
    _common_profile->add_info_string("IsColocate",
691
367
                                     std::to_string(_parent->is_colocated_operator()));
692
367
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
367
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
367
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
367
    return Status::OK();
696
367
}
_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.88M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
1.88M
    if (_closed) {
701
2
        return Status::OK();
702
2
    }
703
1.88M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
1.28M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
1.28M
    }
706
1.88M
    _closed = true;
707
1.88M
    return Status::OK();
708
1.88M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
185k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
185k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
185k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
185k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
185k
    }
706
185k
    _closed = true;
707
185k
    return Status::OK();
708
185k
}
_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
6.50k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
6.50k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
6.50k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
6.50k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
6.50k
    }
706
6.50k
    _closed = true;
707
6.50k
    return Status::OK();
708
6.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
9.50k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
9.50k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
9.50k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
9.50k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
9.50k
    }
706
9.50k
    _closed = true;
707
9.50k
    return Status::OK();
708
9.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
123k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
123k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
123k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
123k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
123k
    }
706
123k
    _closed = true;
707
123k
    return Status::OK();
708
123k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
312
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
312
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
312
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
312
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
312
    }
706
312
    _closed = true;
707
312
    return Status::OK();
708
312
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
600k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
600k
    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
600k
    _closed = true;
707
600k
    return Status::OK();
708
600k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
6.71k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
6.71k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
6.71k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
6.71k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
6.71k
    }
706
6.71k
    _closed = true;
707
6.71k
    return Status::OK();
708
6.71k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
402
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
402
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
402
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
402
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
402
    }
706
402
    _closed = true;
707
402
    return Status::OK();
708
402
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
2.66k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
2.66k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
2.66k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
2.66k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
2.66k
    }
706
2.66k
    _closed = true;
707
2.66k
    return Status::OK();
708
2.66k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
12.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
12.3k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
12.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
12.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
12.3k
    }
706
12.3k
    _closed = true;
707
12.3k
    return Status::OK();
708
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
304k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
304k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
304k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
304k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
304k
    }
706
304k
    _closed = true;
707
304k
    return Status::OK();
708
304k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
437k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
437k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
437k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
437k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
437k
    }
706
437k
    _closed = true;
707
437k
    return Status::OK();
708
437k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
366
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
366
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
366
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
366
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
366
    }
706
366
    _closed = true;
707
366
    return Status::OK();
708
366
}
_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
4.91k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
4.91k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
4.90k
    return pull(state, block, eos);
714
4.91k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
711
32
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
32
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
32
    return pull(state, block, eos);
714
32
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
711
4.87k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
4.87k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
4.87k
    return pull(state, block, eos);
714
4.87k
}
715
716
template <typename LocalStateType>
717
808k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
808k
    auto& local_state = get_local_state(state);
719
808k
    if (need_more_input_data(state)) {
720
732k
        local_state._child_block->clear_column_data(
721
732k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
732k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
732k
                state, local_state._child_block.get(), &local_state._child_eos));
724
732k
        *eos = local_state._child_eos;
725
732k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
53.5k
            return Status::OK();
727
53.5k
        }
728
678k
        {
729
678k
            SCOPED_TIMER(local_state.exec_time_counter());
730
678k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
678k
        }
732
678k
    }
733
734
755k
    if (!need_more_input_data(state)) {
735
713k
        SCOPED_TIMER(local_state.exec_time_counter());
736
713k
        bool new_eos = false;
737
713k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
713k
        if (new_eos) {
739
636k
            *eos = true;
740
636k
        } else if (!need_more_input_data(state)) {
741
26.9k
            *eos = false;
742
26.9k
        }
743
713k
    }
744
755k
    return Status::OK();
745
755k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
191k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
191k
    auto& local_state = get_local_state(state);
719
191k
    if (need_more_input_data(state)) {
720
128k
        local_state._child_block->clear_column_data(
721
128k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
128k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
128k
                state, local_state._child_block.get(), &local_state._child_eos));
724
128k
        *eos = local_state._child_eos;
725
128k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
27.3k
            return Status::OK();
727
27.3k
        }
728
101k
        {
729
101k
            SCOPED_TIMER(local_state.exec_time_counter());
730
101k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
101k
        }
732
101k
    }
733
734
163k
    if (!need_more_input_data(state)) {
735
163k
        SCOPED_TIMER(local_state.exec_time_counter());
736
163k
        bool new_eos = false;
737
163k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
163k
        if (new_eos) {
739
112k
            *eos = true;
740
112k
        } else if (!need_more_input_data(state)) {
741
12.6k
            *eos = false;
742
12.6k
        }
743
163k
    }
744
163k
    return Status::OK();
745
163k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
3.34k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
3.34k
    auto& local_state = get_local_state(state);
719
3.34k
    if (need_more_input_data(state)) {
720
2.06k
        local_state._child_block->clear_column_data(
721
2.06k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
2.06k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
2.06k
                state, local_state._child_block.get(), &local_state._child_eos));
724
2.06k
        *eos = local_state._child_eos;
725
2.06k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
290
            return Status::OK();
727
290
        }
728
1.77k
        {
729
1.77k
            SCOPED_TIMER(local_state.exec_time_counter());
730
1.77k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
1.77k
        }
732
1.77k
    }
733
734
3.05k
    if (!need_more_input_data(state)) {
735
3.05k
        SCOPED_TIMER(local_state.exec_time_counter());
736
3.05k
        bool new_eos = false;
737
3.05k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
3.05k
        if (new_eos) {
739
1.54k
            *eos = true;
740
1.54k
        } else if (!need_more_input_data(state)) {
741
1.27k
            *eos = false;
742
1.27k
        }
743
3.05k
    }
744
3.05k
    return Status::OK();
745
3.05k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
1.57k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
1.57k
    auto& local_state = get_local_state(state);
719
1.57k
    if (need_more_input_data(state)) {
720
1.57k
        local_state._child_block->clear_column_data(
721
1.57k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
1.57k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
1.57k
                state, local_state._child_block.get(), &local_state._child_eos));
724
1.57k
        *eos = local_state._child_eos;
725
1.57k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
645
            return Status::OK();
727
645
        }
728
934
        {
729
934
            SCOPED_TIMER(local_state.exec_time_counter());
730
934
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
934
        }
732
934
    }
733
734
934
    if (!need_more_input_data(state)) {
735
934
        SCOPED_TIMER(local_state.exec_time_counter());
736
934
        bool new_eos = false;
737
934
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
934
        if (new_eos) {
739
663
            *eos = true;
740
663
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
934
    }
744
934
    return Status::OK();
745
934
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
19.2k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
19.2k
    auto& local_state = get_local_state(state);
719
19.2k
    if (need_more_input_data(state)) {
720
19.1k
        local_state._child_block->clear_column_data(
721
19.1k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
19.1k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
19.1k
                state, local_state._child_block.get(), &local_state._child_eos));
724
19.1k
        *eos = local_state._child_eos;
725
19.1k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
5.16k
            return Status::OK();
727
5.16k
        }
728
14.0k
        {
729
14.0k
            SCOPED_TIMER(local_state.exec_time_counter());
730
14.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
14.0k
        }
732
14.0k
    }
733
734
14.0k
    if (!need_more_input_data(state)) {
735
8.03k
        SCOPED_TIMER(local_state.exec_time_counter());
736
8.03k
        bool new_eos = false;
737
8.03k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
8.03k
        if (new_eos) {
739
8.00k
            *eos = true;
740
8.00k
        } else if (!need_more_input_data(state)) {
741
11
            *eos = false;
742
11
        }
743
8.03k
    }
744
14.0k
    return Status::OK();
745
14.0k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
558k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
558k
    auto& local_state = get_local_state(state);
719
558k
    if (need_more_input_data(state)) {
720
558k
        local_state._child_block->clear_column_data(
721
558k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
558k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
558k
                state, local_state._child_block.get(), &local_state._child_eos));
724
558k
        *eos = local_state._child_eos;
725
558k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
18.0k
            return Status::OK();
727
18.0k
        }
728
540k
        {
729
540k
            SCOPED_TIMER(local_state.exec_time_counter());
730
540k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
540k
        }
732
540k
    }
733
734
539k
    if (!need_more_input_data(state)) {
735
505k
        SCOPED_TIMER(local_state.exec_time_counter());
736
505k
        bool new_eos = false;
737
505k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
505k
        if (new_eos) {
739
503k
            *eos = true;
740
503k
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
505k
    }
744
539k
    return Status::OK();
745
539k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
29.5k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
29.5k
    auto& local_state = get_local_state(state);
719
29.5k
    if (need_more_input_data(state)) {
720
16.8k
        local_state._child_block->clear_column_data(
721
16.8k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
16.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
16.8k
                state, local_state._child_block.get(), &local_state._child_eos));
724
16.8k
        *eos = local_state._child_eos;
725
16.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
1.65k
            return Status::OK();
727
1.65k
        }
728
15.2k
        {
729
15.2k
            SCOPED_TIMER(local_state.exec_time_counter());
730
15.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
15.2k
        }
732
15.2k
    }
733
734
27.8k
    if (!need_more_input_data(state)) {
735
26.8k
        SCOPED_TIMER(local_state.exec_time_counter());
736
26.8k
        bool new_eos = false;
737
26.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
26.8k
        if (new_eos) {
739
6.48k
            *eos = true;
740
20.3k
        } else if (!need_more_input_data(state)) {
741
12.6k
            *eos = false;
742
12.6k
        }
743
26.8k
    }
744
27.8k
    return Status::OK();
745
27.8k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
5.94k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
5.94k
    auto& local_state = get_local_state(state);
719
5.94k
    if (need_more_input_data(state)) {
720
5.57k
        local_state._child_block->clear_column_data(
721
5.57k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
5.57k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
5.57k
                state, local_state._child_block.get(), &local_state._child_eos));
724
5.57k
        *eos = local_state._child_eos;
725
5.57k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
416
            return Status::OK();
727
416
        }
728
5.15k
        {
729
5.15k
            SCOPED_TIMER(local_state.exec_time_counter());
730
5.15k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
5.15k
        }
732
5.15k
    }
733
734
5.52k
    if (!need_more_input_data(state)) {
735
5.52k
        SCOPED_TIMER(local_state.exec_time_counter());
736
5.52k
        bool new_eos = false;
737
5.52k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
5.52k
        if (new_eos) {
739
3.67k
            *eos = true;
740
3.67k
        } else if (!need_more_input_data(state)) {
741
374
            *eos = false;
742
374
        }
743
5.52k
    }
744
5.52k
    return Status::OK();
745
5.52k
}
746
747
template <typename Writer, typename Parent>
748
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
749
65.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
65.6k
    RETURN_IF_ERROR(Base::init(state, info));
751
65.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
65.6k
                                                         "AsyncWriterDependency", true);
753
65.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
65.6k
                             _finish_dependency));
755
756
65.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
65.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
65.6k
    return Status::OK();
759
65.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
330
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
330
    RETURN_IF_ERROR(Base::init(state, info));
751
330
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
330
                                                         "AsyncWriterDependency", true);
753
330
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
330
                             _finish_dependency));
755
756
330
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
330
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
330
    return Status::OK();
759
330
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
65.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
65.3k
    RETURN_IF_ERROR(Base::init(state, info));
751
65.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
65.3k
                                                         "AsyncWriterDependency", true);
753
65.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
65.3k
                             _finish_dependency));
755
756
65.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
65.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
65.3k
    return Status::OK();
759
65.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
8
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
8
    RETURN_IF_ERROR(Base::init(state, info));
751
8
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
8
                                                         "AsyncWriterDependency", true);
753
8
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
8
                             _finish_dependency));
755
756
8
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
8
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
8
    return Status::OK();
759
8
}
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
65.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
65.8k
    RETURN_IF_ERROR(Base::open(state));
765
65.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
453k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
387k
        RETURN_IF_ERROR(
768
387k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
387k
    }
770
65.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
65.8k
    return Status::OK();
772
65.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
331
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
331
    RETURN_IF_ERROR(Base::open(state));
765
331
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
1.75k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
1.42k
        RETURN_IF_ERROR(
768
1.42k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
1.42k
    }
770
331
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
331
    return Status::OK();
772
331
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
65.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
65.4k
    RETURN_IF_ERROR(Base::open(state));
765
65.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
451k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
385k
        RETURN_IF_ERROR(
768
385k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
385k
    }
770
65.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
65.4k
    return Status::OK();
772
65.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
8
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
8
    RETURN_IF_ERROR(Base::open(state));
765
8
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
144
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
136
        RETURN_IF_ERROR(
768
136
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
136
    }
770
8
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
8
    return Status::OK();
772
8
}
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
77.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
77.6k
    return _writer->sink(block, eos);
778
77.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
1.23k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
1.23k
    return _writer->sink(block, eos);
778
1.23k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
76.4k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
76.4k
    return _writer->sink(block, eos);
778
76.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
8
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
8
    return _writer->sink(block, eos);
778
8
}
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
65.9k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
65.9k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
65.9k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
65.9k
    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
65.9k
    if (_writer) {
790
65.9k
        Status st = _writer->get_writer_status();
791
65.9k
        if (exec_status.ok()) {
792
65.8k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
65.8k
                                                       : Status::Cancelled("force close"));
794
65.8k
        } else {
795
117
            _writer->force_close(exec_status);
796
117
        }
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
65.9k
        RETURN_IF_ERROR(st);
801
65.9k
    }
802
65.9k
    return Base::close(state, exec_status);
803
65.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
319
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
319
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
319
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
319
    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
319
    if (_writer) {
790
319
        Status st = _writer->get_writer_status();
791
319
        if (exec_status.ok()) {
792
319
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
319
                                                       : Status::Cancelled("force close"));
794
319
        } 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
319
        RETURN_IF_ERROR(st);
801
319
    }
802
319
    return Base::close(state, exec_status);
803
319
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
65.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
65.6k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
65.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
65.6k
    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
65.6k
    if (_writer) {
790
65.6k
        Status st = _writer->get_writer_status();
791
65.6k
        if (exec_status.ok()) {
792
65.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
65.5k
                                                       : Status::Cancelled("force close"));
794
65.5k
        } else {
795
117
            _writer->force_close(exec_status);
796
117
        }
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
65.6k
        RETURN_IF_ERROR(st);
801
65.6k
    }
802
65.5k
    return Base::close(state, exec_status);
803
65.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
8
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
8
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
8
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
8
    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
8
    if (_writer) {
790
8
        Status st = _writer->get_writer_status();
791
8
        if (exec_status.ok()) {
792
8
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
8
                                                       : Status::Cancelled("force close"));
794
8
        } 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
8
        RETURN_IF_ERROR(st);
801
8
    }
802
8
    return Base::close(state, exec_status);
803
8
}
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