Coverage Report

Created: 2026-03-15 17:00

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.19M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
2.19M
    if (_parent->nereids_id() == -1) {
117
1.11M
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
1.11M
    } else {
119
1.07M
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
1.07M
                           std::to_string(_parent->nereids_id()),
121
1.07M
                           std::to_string(_parent->node_id()));
122
1.07M
    }
123
2.19M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
139k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
139k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
139k
    } else {
119
139k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
139k
                           std::to_string(_parent->nereids_id()),
121
139k
                           std::to_string(_parent->node_id()));
122
139k
    }
123
139k
}
_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
214k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
214k
    if (_parent->nereids_id() == -1) {
117
12
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
214k
    } else {
119
214k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
214k
                           std::to_string(_parent->nereids_id()),
121
214k
                           std::to_string(_parent->node_id()));
122
214k
    }
123
214k
}
_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.88k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
6.88k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
6.88k
    } else {
119
6.88k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
6.88k
                           std::to_string(_parent->nereids_id()),
121
6.88k
                           std::to_string(_parent->node_id()));
122
6.88k
    }
123
6.88k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
9.82k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
9.82k
    if (_parent->nereids_id() == -1) {
117
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
9.81k
    } else {
119
9.81k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
9.81k
                           std::to_string(_parent->nereids_id()),
121
9.81k
                           std::to_string(_parent->node_id()));
122
9.81k
    }
123
9.82k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
116k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
116k
    if (_parent->nereids_id() == -1) {
117
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
116k
    } else {
119
116k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
116k
                           std::to_string(_parent->nereids_id()),
121
116k
                           std::to_string(_parent->node_id()));
122
116k
    }
123
116k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
283
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
283
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
283
    } else {
119
283
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
283
                           std::to_string(_parent->nereids_id()),
121
283
                           std::to_string(_parent->node_id()));
122
283
    }
123
283
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
985k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
985k
    if (_parent->nereids_id() == -1) {
117
441k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
543k
    } else {
119
543k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
543k
                           std::to_string(_parent->nereids_id()),
121
543k
                           std::to_string(_parent->node_id()));
122
543k
    }
123
985k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
39.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
39.7k
    if (_parent->nereids_id() == -1) {
117
2
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
39.7k
    } else {
119
39.7k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
39.7k
                           std::to_string(_parent->nereids_id()),
121
39.7k
                           std::to_string(_parent->node_id()));
122
39.7k
    }
123
39.7k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
369
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
369
    if (_parent->nereids_id() == -1) {
117
368
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
368
    } else {
119
1
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
1
                           std::to_string(_parent->nereids_id()),
121
1
                           std::to_string(_parent->node_id()));
122
1
    }
123
369
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
7.23k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
7.23k
    if (_parent->nereids_id() == -1) {
117
7.23k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
7.23k
    } 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
7.23k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
523
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
523
    if (_parent->nereids_id() == -1) {
117
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
421
    } else {
119
421
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
421
                           std::to_string(_parent->nereids_id()),
121
421
                           std::to_string(_parent->node_id()));
122
421
    }
123
523
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
4.93k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
4.93k
    if (_parent->nereids_id() == -1) {
117
10
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
4.92k
    } else {
119
4.92k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
4.92k
                           std::to_string(_parent->nereids_id()),
121
4.92k
                           std::to_string(_parent->node_id()));
122
4.92k
    }
123
4.93k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
667k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
667k
    if (_parent->nereids_id() == -1) {
117
666k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
666k
    } else {
119
1.26k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
1.26k
                           std::to_string(_parent->nereids_id()),
121
1.26k
                           std::to_string(_parent->node_id()));
122
1.26k
    }
123
667k
}
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.29M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
1.29M
    if (_parent->nereids_id() == -1) {
128
744k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
744k
    } else {
130
548k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
548k
                           std::to_string(_parent->nereids_id()),
132
548k
                           std::to_string(_parent->node_id()));
133
548k
    }
134
1.29M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
188k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
188k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
188k
    } else {
130
188k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
188k
                           std::to_string(_parent->nereids_id()),
132
188k
                           std::to_string(_parent->node_id()));
133
188k
    }
134
188k
}
_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
216k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
216k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
216k
    } else {
130
216k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
216k
                           std::to_string(_parent->nereids_id()),
132
216k
                           std::to_string(_parent->node_id()));
133
216k
    }
134
216k
}
_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.94k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
6.94k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
6.94k
    } else {
130
6.94k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
6.94k
                           std::to_string(_parent->nereids_id()),
132
6.94k
                           std::to_string(_parent->node_id()));
133
6.94k
    }
134
6.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
9.95k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
9.95k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
9.94k
    } else {
130
9.94k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
9.94k
                           std::to_string(_parent->nereids_id()),
132
9.94k
                           std::to_string(_parent->node_id()));
133
9.94k
    }
134
9.95k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
117k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
117k
    if (_parent->nereids_id() == -1) {
128
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
117k
    } else {
130
117k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
117k
                           std::to_string(_parent->nereids_id()),
132
117k
                           std::to_string(_parent->node_id()));
133
117k
    }
134
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
289
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
289
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
289
    } else {
130
289
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
289
                           std::to_string(_parent->nereids_id()),
132
289
                           std::to_string(_parent->node_id()));
133
289
    }
134
289
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
47
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
47
    if (_parent->nereids_id() == -1) {
128
46
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
46
    } 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
47
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
7.61k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
7.61k
    if (_parent->nereids_id() == -1) {
128
3
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
7.61k
    } else {
130
7.61k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
7.61k
                           std::to_string(_parent->nereids_id()),
132
7.61k
                           std::to_string(_parent->node_id()));
133
7.61k
    }
134
7.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
525
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
525
    if (_parent->nereids_id() == -1) {
128
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
423
    } else {
130
423
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
423
                           std::to_string(_parent->nereids_id()),
132
423
                           std::to_string(_parent->node_id()));
133
423
    }
134
525
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
12.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
12.1k
    if (_parent->nereids_id() == -1) {
128
12.1k
        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
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
290k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
291k
    if (_parent->nereids_id() == -1) {
128
291k
        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
290k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
440k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
440k
    if (_parent->nereids_id() == -1) {
128
440k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
440k
    } else {
130
414
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
414
                           std::to_string(_parent->nereids_id()),
132
414
                           std::to_string(_parent->node_id()));
133
414
    }
134
440k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
368
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
369
    if (_parent->nereids_id() == -1) {
128
369
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
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
368
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
300
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
300
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
300
    } else {
130
300
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
300
                           std::to_string(_parent->nereids_id()),
132
300
                           std::to_string(_parent->node_id()));
133
300
    }
134
300
}
135
136
template <typename SharedStateArg>
137
30.9k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
30.9k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
30.9k
    _terminated = true;
142
30.9k
    return Status::OK();
143
30.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
494
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
494
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
494
    _terminated = true;
142
494
    return Status::OK();
143
494
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
3
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
3
    _terminated = true;
142
3
    return Status::OK();
143
3
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
7
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
7
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
7
    _terminated = true;
142
7
    return Status::OK();
143
7
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
4.44k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
4.44k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
4.44k
    _terminated = true;
142
4.44k
    return Status::OK();
143
4.44k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
1.57k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
1.57k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
1.57k
    _terminated = true;
142
1.57k
    return Status::OK();
143
1.57k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
3
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
3
    _terminated = true;
142
3
    return Status::OK();
143
3
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
2
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
2
    _terminated = true;
142
2
    return Status::OK();
143
2
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
59
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
59
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
59
    _terminated = true;
142
59
    return Status::OK();
143
59
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
3
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
3
    _terminated = true;
142
3
    return Status::OK();
143
3
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
171
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
171
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
171
    _terminated = true;
142
171
    return Status::OK();
143
171
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
137
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
137
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
137
    _terminated = true;
142
137
    return Status::OK();
143
137
}
144
145
621k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
146
621k
    return _child && _child->is_serial_operator() && !is_source()
147
621k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
148
621k
                   : DataDistribution(ExchangeType::NOOP);
149
621k
}
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
46.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
46.1k
    fmt::memory_buffer debug_string_buffer;
158
46.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
46.1k
    return fmt::to_string(debug_string_buffer);
160
46.1k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
3
    fmt::memory_buffer debug_string_buffer;
158
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
3
    return fmt::to_string(debug_string_buffer);
160
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
46.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
46.1k
    fmt::memory_buffer debug_string_buffer;
158
46.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
46.1k
    return fmt::to_string(debug_string_buffer);
160
46.1k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
1
    fmt::memory_buffer debug_string_buffer;
158
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
1
    return fmt::to_string(debug_string_buffer);
160
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
48
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
48
    fmt::memory_buffer debug_string_buffer;
158
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
48
    return fmt::to_string(debug_string_buffer);
160
48
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
161
162
template <typename SharedStateArg>
163
46.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
46.1k
    fmt::memory_buffer debug_string_buffer;
165
46.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
46.1k
    return fmt::to_string(debug_string_buffer);
167
46.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
48
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
48
    fmt::memory_buffer debug_string_buffer;
165
48
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
48
    return fmt::to_string(debug_string_buffer);
167
48
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
46.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
46.1k
    fmt::memory_buffer debug_string_buffer;
165
46.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
46.1k
    return fmt::to_string(debug_string_buffer);
167
46.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
168
169
46.8k
std::string OperatorXBase::debug_string(int indentation_level) const {
170
46.8k
    fmt::memory_buffer debug_string_buffer;
171
46.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
172
46.8k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
173
46.8k
                   _is_serial_operator);
174
46.8k
    return fmt::to_string(debug_string_buffer);
175
46.8k
}
176
177
46.1k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
178
46.1k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
179
46.1k
}
180
181
569k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
182
569k
    std::string node_name = print_plan_node_type(tnode.node_type);
183
569k
    _nereids_id = tnode.nereids_id;
184
569k
    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
569k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
198
569k
    _op_name = substr + "_OPERATOR";
199
200
569k
    if (tnode.__isset.vconjunct) {
201
0
        return Status::InternalError("vconjunct is not supported yet");
202
569k
    } else if (tnode.__isset.conjuncts) {
203
258k
        for (const auto& conjunct : tnode.conjuncts) {
204
258k
            VExprContextSPtr context;
205
258k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
206
258k
            _conjuncts.emplace_back(context);
207
258k
        }
208
87.7k
    }
209
210
    // create the projections expr
211
569k
    if (tnode.__isset.projections) {
212
245k
        DCHECK(tnode.__isset.output_tuple_id);
213
245k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
214
245k
    }
215
569k
    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
569k
    return Status::OK();
225
569k
}
226
227
596k
Status OperatorXBase::prepare(RuntimeState* state) {
228
596k
    for (auto& conjunct : _conjuncts) {
229
258k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
230
258k
    }
231
596k
    if (state->enable_adjust_conjunct_order_by_cost()) {
232
546k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
233
340k
            return a->execute_cost() < b->execute_cost();
234
340k
        });
235
546k
    };
236
237
599k
    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
596k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
242
243
596k
    if (has_output_row_desc()) {
244
245k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
245
245k
    }
246
247
596k
    for (auto& conjunct : _conjuncts) {
248
258k
        RETURN_IF_ERROR(conjunct->open(state));
249
258k
    }
250
596k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
251
596k
    for (auto& projections : _intermediate_projections) {
252
3.79k
        RETURN_IF_ERROR(VExpr::open(projections, state));
253
3.79k
    }
254
596k
    if (_child && !is_source()) {
255
138k
        RETURN_IF_ERROR(_child->prepare(state));
256
138k
    }
257
258
596k
    if (VExpr::contains_blockable_function(_conjuncts) ||
259
596k
        VExpr::contains_blockable_function(_projections)) {
260
0
        _blockable = true;
261
0
    }
262
263
596k
    return Status::OK();
264
596k
}
265
266
9.09k
Status OperatorXBase::terminate(RuntimeState* state) {
267
9.09k
    if (_child && !is_source()) {
268
2.12k
        RETURN_IF_ERROR(_child->terminate(state));
269
2.12k
    }
270
9.09k
    auto result = state->get_local_state_result(operator_id());
271
9.09k
    if (!result) {
272
0
        return result.error();
273
0
    }
274
9.09k
    return result.value()->terminate(state);
275
9.09k
}
276
277
6.45M
Status OperatorXBase::close(RuntimeState* state) {
278
6.45M
    if (_child && !is_source()) {
279
1.42M
        RETURN_IF_ERROR(_child->close(state));
280
1.42M
    }
281
6.45M
    auto result = state->get_local_state_result(operator_id());
282
6.45M
    if (!result) {
283
0
        return result.error();
284
0
    }
285
6.45M
    return result.value()->close(state);
286
6.45M
}
287
288
338k
void PipelineXLocalStateBase::clear_origin_block() {
289
338k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
290
338k
}
291
292
589k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
293
589k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
294
295
589k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
296
589k
    return Status::OK();
297
589k
}
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
338k
                                     Block* output_block) const {
306
338k
    auto* local_state = state->get_local_state(operator_id());
307
338k
    SCOPED_TIMER(local_state->exec_time_counter());
308
338k
    SCOPED_TIMER(local_state->_projection_timer);
309
338k
    const size_t rows = origin_block->rows();
310
338k
    if (rows == 0) {
311
220k
        return Status::OK();
312
220k
    }
313
118k
    Block input_block = *origin_block;
314
315
118k
    size_t bytes_usage = 0;
316
118k
    ColumnsWithTypeAndName new_columns;
317
118k
    for (const auto& projections : local_state->_intermediate_projections) {
318
962
        if (projections.empty()) {
319
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
320
0
                                         node_id());
321
0
        }
322
962
        new_columns.resize(projections.size());
323
6.51k
        for (int i = 0; i < projections.size(); i++) {
324
5.55k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
325
5.55k
            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.55k
        }
333
962
        Block tmp_block {new_columns};
334
962
        bytes_usage += tmp_block.allocated_bytes();
335
962
        input_block.swap(tmp_block);
336
962
    }
337
338
118k
    if (input_block.rows() != rows) {
339
0
        return Status::InternalError(
340
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
341
0
                "input_block: {}",
342
0
                input_block.rows(), rows, input_block.dump_structure());
343
0
    }
344
590k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
345
590k
        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
590k
        } else {
355
590k
            if (_keep_origin || !from->is_exclusive()) {
356
581k
                to->insert_range_from(*from, 0, rows);
357
581k
                bytes_usage += from->allocated_bytes();
358
581k
            } else {
359
9.06k
                to = from->assume_mutable();
360
9.06k
            }
361
590k
        }
362
590k
    };
363
364
118k
    MutableBlock mutable_block =
365
118k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
366
118k
    if (rows != 0) {
367
118k
        auto& mutable_columns = mutable_block.mutable_columns();
368
118k
        const size_t origin_columns_count = input_block.columns();
369
118k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
709k
        for (int i = 0; i < mutable_columns.size(); ++i) {
371
590k
            auto result_column_id = -1;
372
590k
            ColumnPtr column_ptr;
373
590k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
374
590k
            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
590k
            column_ptr = column_ptr->convert_to_full_column_if_const();
381
590k
            if (result_column_id >= origin_columns_count) {
382
590k
                bytes_usage += column_ptr->allocated_bytes();
383
590k
            }
384
590k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
385
590k
        }
386
118k
        DCHECK(mutable_block.rows() == rows);
387
118k
        output_block->set_columns(std::move(mutable_columns));
388
118k
    }
389
390
118k
    local_state->_estimate_memory_usage += bytes_usage;
391
392
118k
    return Status::OK();
393
118k
}
394
395
3.78M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
396
3.78M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
397
3.78M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
398
3.78M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
399
3.78M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
400
3.78M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
401
3.78M
            if (_debug_point_count++ % 2 == 0) {
402
3.78M
                return Status::OK();
403
3.78M
            }
404
3.78M
        }
405
3.78M
    });
406
407
3.78M
    Status status;
408
3.78M
    auto* local_state = state->get_local_state(operator_id());
409
3.78M
    Defer defer([&]() {
410
3.78M
        if (status.ok()) {
411
3.78M
            if (auto rows = block->rows()) {
412
726k
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
413
726k
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
414
726k
            }
415
3.78M
        }
416
3.78M
    });
417
3.78M
    if (_output_row_descriptor) {
418
338k
        local_state->clear_origin_block();
419
338k
        status = get_block(state, &local_state->_origin_block, eos);
420
338k
        if (UNLIKELY(!status.ok())) {
421
13
            return status;
422
13
        }
423
338k
        status = do_projections(state, &local_state->_origin_block, block);
424
338k
        return status;
425
338k
    }
426
3.44M
    status = get_block(state, block, eos);
427
3.44M
    RETURN_IF_ERROR(block->check_type_and_column());
428
3.44M
    return status;
429
3.44M
}
430
431
2.43M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
432
2.43M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
433
1.70k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
434
1.70k
        *eos = true;
435
1.70k
    }
436
437
2.43M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
438
2.43M
        auto op_name = to_lower(_parent->_op_name);
439
2.43M
        auto arg_op_name = dp->param<std::string>("op_name");
440
2.43M
        arg_op_name = to_lower(arg_op_name);
441
442
2.43M
        if (op_name == arg_op_name) {
443
2.43M
            *eos = true;
444
2.43M
        }
445
2.43M
    });
446
447
2.43M
    if (auto rows = block->rows()) {
448
646k
        _num_rows_returned += rows;
449
646k
    }
450
2.43M
}
451
452
30.9k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
453
30.9k
    auto result = state->get_sink_local_state_result();
454
30.9k
    if (!result) {
455
0
        return result.error();
456
0
    }
457
30.9k
    return result.value()->terminate(state);
458
30.9k
}
459
460
46.7k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
461
46.7k
    fmt::memory_buffer debug_string_buffer;
462
463
46.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
464
46.7k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
465
46.7k
    return fmt::to_string(debug_string_buffer);
466
46.7k
}
467
468
46.1k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
469
46.1k
    return state->get_sink_local_state()->debug_string(indentation_level);
470
46.1k
}
471
472
334k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
473
334k
    std::string op_name = "UNKNOWN_SINK";
474
334k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
475
476
334k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
477
334k
        op_name = it->second;
478
334k
    }
479
334k
    _name = op_name + "_OPERATOR";
480
334k
    return Status::OK();
481
334k
}
482
483
168k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
484
168k
    std::string op_name = print_plan_node_type(tnode.node_type);
485
168k
    _nereids_id = tnode.nereids_id;
486
168k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
487
168k
    _name = substr + "_SINK_OPERATOR";
488
168k
    return Status::OK();
489
168k
}
490
491
template <typename LocalStateType>
492
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
493
1.92M
                                                            LocalSinkStateInfo& info) {
494
1.92M
    auto local_state = LocalStateType::create_unique(this, state);
495
1.92M
    RETURN_IF_ERROR(local_state->init(state, info));
496
1.92M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
1.92M
    return Status::OK();
498
1.92M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
188k
                                                            LocalSinkStateInfo& info) {
494
188k
    auto local_state = LocalStateType::create_unique(this, state);
495
188k
    RETURN_IF_ERROR(local_state->init(state, info));
496
188k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
188k
    return Status::OK();
498
188k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
375k
                                                            LocalSinkStateInfo& info) {
494
375k
    auto local_state = LocalStateType::create_unique(this, state);
495
375k
    RETURN_IF_ERROR(local_state->init(state, info));
496
375k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
375k
    return Status::OK();
498
375k
}
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
341
                                                            LocalSinkStateInfo& info) {
494
341
    auto local_state = LocalStateType::create_unique(this, state);
495
341
    RETURN_IF_ERROR(local_state->init(state, info));
496
341
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
341
    return Status::OK();
498
341
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
66.0k
                                                            LocalSinkStateInfo& info) {
494
66.0k
    auto local_state = LocalStateType::create_unique(this, state);
495
66.0k
    RETURN_IF_ERROR(local_state->init(state, info));
496
66.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
66.0k
    return Status::OK();
498
66.0k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
5
                                                            LocalSinkStateInfo& info) {
494
5
    auto local_state = LocalStateType::create_unique(this, state);
495
5
    RETURN_IF_ERROR(local_state->init(state, info));
496
5
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
5
    return Status::OK();
498
5
}
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.96k
                                                            LocalSinkStateInfo& info) {
494
9.96k
    auto local_state = LocalStateType::create_unique(this, state);
495
9.96k
    RETURN_IF_ERROR(local_state->init(state, info));
496
9.96k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
9.96k
    return Status::OK();
498
9.96k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
41
                                                            LocalSinkStateInfo& info) {
494
41
    auto local_state = LocalStateType::create_unique(this, state);
495
41
    RETURN_IF_ERROR(local_state->init(state, info));
496
41
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
41
    return Status::OK();
498
41
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
217k
                                                            LocalSinkStateInfo& info) {
494
217k
    auto local_state = LocalStateType::create_unique(this, state);
495
217k
    RETURN_IF_ERROR(local_state->init(state, info));
496
217k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
217k
    return Status::OK();
498
217k
}
_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
291k
                                                            LocalSinkStateInfo& info) {
494
291k
    auto local_state = LocalStateType::create_unique(this, state);
495
291k
    RETURN_IF_ERROR(local_state->init(state, info));
496
291k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
291k
    return Status::OK();
498
291k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
117k
                                                            LocalSinkStateInfo& info) {
494
117k
    auto local_state = LocalStateType::create_unique(this, state);
495
117k
    RETURN_IF_ERROR(local_state->init(state, info));
496
117k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
117k
    return Status::OK();
498
117k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
289
                                                            LocalSinkStateInfo& info) {
494
289
    auto local_state = LocalStateType::create_unique(this, state);
495
289
    RETURN_IF_ERROR(local_state->init(state, info));
496
289
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
289
    return Status::OK();
498
289
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
626k
                                                            LocalSinkStateInfo& info) {
494
626k
    auto local_state = LocalStateType::create_unique(this, state);
495
626k
    RETURN_IF_ERROR(local_state->init(state, info));
496
626k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
626k
    return Status::OK();
498
626k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
6.94k
                                                            LocalSinkStateInfo& info) {
494
6.94k
    auto local_state = LocalStateType::create_unique(this, state);
495
6.94k
    RETURN_IF_ERROR(local_state->init(state, info));
496
6.94k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
6.94k
    return Status::OK();
498
6.94k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
7.60k
                                                            LocalSinkStateInfo& info) {
494
7.60k
    auto local_state = LocalStateType::create_unique(this, state);
495
7.60k
    RETURN_IF_ERROR(local_state->init(state, info));
496
7.60k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
7.60k
    return Status::OK();
498
7.60k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.70k
                                                            LocalSinkStateInfo& info) {
494
2.70k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.70k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.70k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.70k
    return Status::OK();
498
2.70k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
421
                                                            LocalSinkStateInfo& info) {
494
421
    auto local_state = LocalStateType::create_unique(this, state);
495
421
    RETURN_IF_ERROR(local_state->init(state, info));
496
421
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
421
    return Status::OK();
498
421
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
4.64k
                                                            LocalSinkStateInfo& info) {
494
4.64k
    auto local_state = LocalStateType::create_unique(this, state);
495
4.64k
    RETURN_IF_ERROR(local_state->init(state, info));
496
4.64k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
4.64k
    return Status::OK();
498
4.64k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.56k
                                                            LocalSinkStateInfo& info) {
494
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.56k
    return Status::OK();
498
2.56k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.41k
                                                            LocalSinkStateInfo& info) {
494
2.41k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.41k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.41k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.41k
    return Status::OK();
498
2.41k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.49k
                                                            LocalSinkStateInfo& info) {
494
2.49k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.49k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.49k
    return Status::OK();
498
2.49k
}
_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.59M
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.59M
    } else {
509
1.59M
        auto ss = LocalStateType::SharedStateType::create_shared();
510
1.59M
        ss->id = operator_id();
511
1.59M
        for (auto& dest : dests_id()) {
512
1.59M
            ss->related_op_ids.insert(dest);
513
1.59M
        }
514
1.59M
        return ss;
515
1.59M
    }
516
1.59M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
171k
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
171k
    } else {
509
171k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
171k
        ss->id = operator_id();
511
171k
        for (auto& dest : dests_id()) {
512
171k
            ss->related_op_ids.insert(dest);
513
171k
        }
514
171k
        return ss;
515
171k
    }
516
171k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
376k
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
376k
    } else {
509
376k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
376k
        ss->id = operator_id();
511
376k
        for (auto& dest : dests_id()) {
512
375k
            ss->related_op_ids.insert(dest);
513
375k
        }
514
376k
        return ss;
515
376k
    }
516
376k
}
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
341
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
341
    } else {
509
341
        auto ss = LocalStateType::SharedStateType::create_shared();
510
341
        ss->id = operator_id();
511
341
        for (auto& dest : dests_id()) {
512
341
            ss->related_op_ids.insert(dest);
513
341
        }
514
341
        return ss;
515
341
    }
516
341
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
65.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
65.1k
    } else {
509
65.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
65.1k
        ss->id = operator_id();
511
65.1k
        for (auto& dest : dests_id()) {
512
65.0k
            ss->related_op_ids.insert(dest);
513
65.0k
        }
514
65.1k
        return ss;
515
65.1k
    }
516
65.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
501
5
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
5
    } else {
509
5
        auto ss = LocalStateType::SharedStateType::create_shared();
510
5
        ss->id = operator_id();
511
5
        for (auto& dest : dests_id()) {
512
5
            ss->related_op_ids.insert(dest);
513
5
        }
514
5
        return ss;
515
5
    }
516
5
}
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.98k
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.98k
    } else {
509
9.98k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
9.98k
        ss->id = operator_id();
511
9.98k
        for (auto& dest : dests_id()) {
512
9.93k
            ss->related_op_ids.insert(dest);
513
9.93k
        }
514
9.98k
        return ss;
515
9.98k
    }
516
9.98k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
45
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
45
    } else {
509
45
        auto ss = LocalStateType::SharedStateType::create_shared();
510
45
        ss->id = operator_id();
511
47
        for (auto& dest : dests_id()) {
512
47
            ss->related_op_ids.insert(dest);
513
47
        }
514
45
        return ss;
515
45
    }
516
45
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
217k
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
217k
    } else {
509
217k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
217k
        ss->id = operator_id();
511
217k
        for (auto& dest : dests_id()) {
512
216k
            ss->related_op_ids.insert(dest);
513
216k
        }
514
217k
        return ss;
515
217k
    }
516
217k
}
_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
117k
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
117k
    } else {
509
117k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
117k
        ss->id = operator_id();
511
117k
        for (auto& dest : dests_id()) {
512
117k
            ss->related_op_ids.insert(dest);
513
117k
        }
514
117k
        return ss;
515
117k
    }
516
117k
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
288
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
288
    } else {
509
288
        auto ss = LocalStateType::SharedStateType::create_shared();
510
288
        ss->id = operator_id();
511
288
        for (auto& dest : dests_id()) {
512
288
            ss->related_op_ids.insert(dest);
513
288
        }
514
288
        return ss;
515
288
    }
516
288
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
627k
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
627k
    } else {
509
627k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
627k
        ss->id = operator_id();
511
627k
        for (auto& dest : dests_id()) {
512
623k
            ss->related_op_ids.insert(dest);
513
623k
        }
514
627k
        return ss;
515
627k
    }
516
627k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
6.94k
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.94k
    } else {
509
6.94k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
6.94k
        ss->id = operator_id();
511
6.94k
        for (auto& dest : dests_id()) {
512
6.93k
            ss->related_op_ids.insert(dest);
513
6.93k
        }
514
6.94k
        return ss;
515
6.94k
    }
516
6.94k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
526
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
526
    } else {
509
526
        auto ss = LocalStateType::SharedStateType::create_shared();
510
526
        ss->id = operator_id();
511
526
        for (auto& dest : dests_id()) {
512
526
            ss->related_op_ids.insert(dest);
513
526
        }
514
526
        return ss;
515
526
    }
516
526
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
501
2.42k
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.42k
    } else {
509
2.42k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.42k
        ss->id = operator_id();
511
2.42k
        for (auto& dest : dests_id()) {
512
2.41k
            ss->related_op_ids.insert(dest);
513
2.41k
        }
514
2.42k
        return ss;
515
2.42k
    }
516
2.42k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_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
}
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.53M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.53M
    auto local_state = LocalStateType::create_unique(state, this);
521
2.53M
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.53M
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.53M
    return Status::OK();
524
2.53M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
139k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
139k
    auto local_state = LocalStateType::create_unique(state, this);
521
139k
    RETURN_IF_ERROR(local_state->init(state, info));
522
139k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
139k
    return Status::OK();
524
139k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
322k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
322k
    auto local_state = LocalStateType::create_unique(state, this);
521
322k
    RETURN_IF_ERROR(local_state->init(state, info));
522
322k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
322k
    return Status::OK();
524
322k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
76
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
76
    auto local_state = LocalStateType::create_unique(state, this);
521
76
    RETURN_IF_ERROR(local_state->init(state, info));
522
76
    state->emplace_local_state(operator_id(), std::move(local_state));
523
76
    return Status::OK();
524
76
}
_ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
4
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
4
    auto local_state = LocalStateType::create_unique(state, this);
521
4
    RETURN_IF_ERROR(local_state->init(state, info));
522
4
    state->emplace_local_state(operator_id(), std::move(local_state));
523
4
    return Status::OK();
524
4
}
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.66k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.66k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.66k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.66k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.66k
    return Status::OK();
524
2.66k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
9.86k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
9.86k
    auto local_state = LocalStateType::create_unique(state, this);
521
9.86k
    RETURN_IF_ERROR(local_state->init(state, info));
522
9.86k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
9.86k
    return Status::OK();
524
9.86k
}
_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
202k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
202k
    auto local_state = LocalStateType::create_unique(state, this);
521
202k
    RETURN_IF_ERROR(local_state->init(state, info));
522
202k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
202k
    return Status::OK();
524
202k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
117k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
117k
    auto local_state = LocalStateType::create_unique(state, this);
521
117k
    RETURN_IF_ERROR(local_state->init(state, info));
522
117k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
117k
    return Status::OK();
524
117k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
283
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
283
    auto local_state = LocalStateType::create_unique(state, this);
521
283
    RETURN_IF_ERROR(local_state->init(state, info));
522
283
    state->emplace_local_state(operator_id(), std::move(local_state));
523
283
    return Status::OK();
524
283
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
3.10k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
3.10k
    auto local_state = LocalStateType::create_unique(state, this);
521
3.10k
    RETURN_IF_ERROR(local_state->init(state, info));
522
3.10k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
3.10k
    return Status::OK();
524
3.10k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
444k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
444k
    auto local_state = LocalStateType::create_unique(state, this);
521
444k
    RETURN_IF_ERROR(local_state->init(state, info));
522
444k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
444k
    return Status::OK();
524
444k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.30k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.30k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.30k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.30k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.30k
    return Status::OK();
524
1.30k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
6.91k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
6.91k
    auto local_state = LocalStateType::create_unique(state, this);
521
6.91k
    RETURN_IF_ERROR(local_state->init(state, info));
522
6.91k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
6.91k
    return Status::OK();
524
6.91k
}
_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.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_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
39.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
39.8k
    auto local_state = LocalStateType::create_unique(state, this);
521
39.8k
    RETURN_IF_ERROR(local_state->init(state, info));
522
39.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
39.8k
    return Status::OK();
524
39.8k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
7.23k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
7.23k
    auto local_state = LocalStateType::create_unique(state, this);
521
7.23k
    RETURN_IF_ERROR(local_state->init(state, info));
522
7.23k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
7.23k
    return Status::OK();
524
7.23k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
420
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
420
    auto local_state = LocalStateType::create_unique(state, this);
521
420
    RETURN_IF_ERROR(local_state->init(state, info));
522
420
    state->emplace_local_state(operator_id(), std::move(local_state));
523
420
    return Status::OK();
524
420
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.42k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.42k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.42k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.42k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.42k
    return Status::OK();
524
2.42k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.50k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.50k
    return Status::OK();
524
2.50k
}
_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.01k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
5.01k
    auto local_state = LocalStateType::create_unique(state, this);
521
5.01k
    RETURN_IF_ERROR(local_state->init(state, info));
522
5.01k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
5.01k
    return Status::OK();
524
5.01k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
672k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
672k
    auto local_state = LocalStateType::create_unique(state, this);
521
672k
    RETURN_IF_ERROR(local_state->init(state, info));
522
672k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
672k
    return Status::OK();
524
672k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
364
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
364
    auto local_state = LocalStateType::create_unique(state, this);
521
364
    RETURN_IF_ERROR(local_state->init(state, info));
522
364
    state->emplace_local_state(operator_id(), std::move(local_state));
523
364
    return Status::OK();
524
364
}
_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
867
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
867
    auto local_state = LocalStateType::create_unique(state, this);
521
867
    RETURN_IF_ERROR(local_state->init(state, info));
522
867
    state->emplace_local_state(operator_id(), std::move(local_state));
523
867
    return Status::OK();
524
867
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
8.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
8.43k
    auto local_state = LocalStateType::create_unique(state, this);
521
8.43k
    RETURN_IF_ERROR(local_state->init(state, info));
522
8.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
8.43k
    return Status::OK();
524
8.43k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
521k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
521k
    auto local_state = LocalStateType::create_unique(state, this);
521
521k
    RETURN_IF_ERROR(local_state->init(state, info));
522
521k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
521k
    return Status::OK();
524
521k
}
525
526
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
527
                                                         RuntimeState* state)
528
1.92M
        : _parent(parent), _state(state) {}
529
530
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
531
2.52M
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
532
533
template <typename SharedStateArg>
534
2.53M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
2.53M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
2.53M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
2.53M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
2.53M
    _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.53M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
2.53M
    _operator_profile->add_child(_common_profile.get(), true);
543
2.53M
    _operator_profile->add_child(_custom_profile.get(), true);
544
2.53M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
2.53M
    if constexpr (!is_fake_shared) {
546
1.21M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
682k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
682k
                                    .first.get()
549
682k
                                    ->template cast<SharedStateArg>();
550
551
682k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
682k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
682k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
682k
        } else if (info.shared_state) {
555
478k
            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
478k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
478k
            _dependency = _shared_state->create_source_dependency(
562
478k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
478k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
478k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
478k
        } else {
566
52.9k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
5.13k
                DCHECK(false);
568
5.13k
            }
569
52.9k
        }
570
1.21M
    }
571
572
2.53M
    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.53M
    _rows_returned_counter =
577
2.53M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
2.53M
    _blocks_returned_counter =
579
2.53M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
2.53M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
2.53M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
2.53M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
2.53M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
2.53M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
2.53M
    _memory_used_counter =
586
2.53M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
2.53M
    _common_profile->add_info_string("IsColocate",
588
2.53M
                                     std::to_string(_parent->is_colocated_operator()));
589
2.53M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
2.53M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
2.53M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
2.53M
    return Status::OK();
593
2.53M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
140k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
140k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
140k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
140k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
140k
    _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
140k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
140k
    _operator_profile->add_child(_common_profile.get(), true);
543
140k
    _operator_profile->add_child(_custom_profile.get(), true);
544
140k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
140k
    if constexpr (!is_fake_shared) {
546
140k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
16.8k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
16.8k
                                    .first.get()
549
16.8k
                                    ->template cast<SharedStateArg>();
550
551
16.8k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
16.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
16.8k
                    _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
122k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
122k
            _dependency = _shared_state->create_source_dependency(
562
122k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
122k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
122k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
122k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
1.47k
        }
570
140k
    }
571
572
140k
    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
140k
    _rows_returned_counter =
577
140k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
140k
    _blocks_returned_counter =
579
140k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
140k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
140k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
140k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
140k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
140k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
140k
    _memory_used_counter =
586
140k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
140k
    _common_profile->add_info_string("IsColocate",
588
140k
                                     std::to_string(_parent->is_colocated_operator()));
589
140k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
140k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
140k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
140k
    return Status::OK();
593
140k
}
_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
215k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
215k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
215k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
215k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
215k
    _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
215k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
215k
    _operator_profile->add_child(_common_profile.get(), true);
543
215k
    _operator_profile->add_child(_custom_profile.get(), true);
544
215k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
215k
    if constexpr (!is_fake_shared) {
546
215k
        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
215k
        } 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
207k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
207k
            _dependency = _shared_state->create_source_dependency(
562
207k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
207k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
207k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
207k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
8.45k
        }
570
215k
    }
571
572
215k
    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
215k
    _rows_returned_counter =
577
215k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
215k
    _blocks_returned_counter =
579
215k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
215k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
215k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
215k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
215k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
215k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
215k
    _memory_used_counter =
586
215k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
215k
    _common_profile->add_info_string("IsColocate",
588
215k
                                     std::to_string(_parent->is_colocated_operator()));
589
215k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
215k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
215k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
215k
    return Status::OK();
593
215k
}
_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.89k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
6.89k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
6.89k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
6.89k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
6.89k
    _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.89k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
6.89k
    _operator_profile->add_child(_common_profile.get(), true);
543
6.89k
    _operator_profile->add_child(_custom_profile.get(), true);
544
6.89k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
6.89k
    if constexpr (!is_fake_shared) {
546
6.89k
        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.90k
        } 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.90k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
6.90k
            _dependency = _shared_state->create_source_dependency(
562
6.90k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
6.90k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
6.90k
                    _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
6.89k
    }
571
572
6.89k
    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.89k
    _rows_returned_counter =
577
6.89k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
6.89k
    _blocks_returned_counter =
579
6.89k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
6.89k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
6.89k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
6.89k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
6.89k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
6.89k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
6.89k
    _memory_used_counter =
586
6.89k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
6.89k
    _common_profile->add_info_string("IsColocate",
588
6.89k
                                     std::to_string(_parent->is_colocated_operator()));
589
6.89k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
6.89k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
6.89k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
6.89k
    return Status::OK();
593
6.89k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
9.85k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
9.85k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
9.85k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
9.85k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
9.85k
    _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.85k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
9.85k
    _operator_profile->add_child(_common_profile.get(), true);
543
9.85k
    _operator_profile->add_child(_custom_profile.get(), true);
544
9.85k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
9.85k
    if constexpr (!is_fake_shared) {
546
9.85k
        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.85k
        } 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.65k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
9.65k
            _dependency = _shared_state->create_source_dependency(
562
9.65k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
9.65k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
9.65k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
9.65k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
198
        }
570
9.85k
    }
571
572
9.85k
    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.85k
    _rows_returned_counter =
577
9.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
9.85k
    _blocks_returned_counter =
579
9.85k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
9.85k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
9.85k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
9.85k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
9.85k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
9.85k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
9.85k
    _memory_used_counter =
586
9.85k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
9.85k
    _common_profile->add_info_string("IsColocate",
588
9.85k
                                     std::to_string(_parent->is_colocated_operator()));
589
9.85k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
9.85k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
9.85k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
9.85k
    return Status::OK();
593
9.85k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
117k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
117k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
117k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
117k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
117k
    _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
117k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
117k
    _operator_profile->add_child(_common_profile.get(), true);
543
117k
    _operator_profile->add_child(_custom_profile.get(), true);
544
117k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
117k
    if constexpr (!is_fake_shared) {
546
117k
        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
117k
        } 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
115k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
115k
            _dependency = _shared_state->create_source_dependency(
562
115k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
115k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
115k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
115k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
1.55k
        }
570
117k
    }
571
572
117k
    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
117k
    _rows_returned_counter =
577
117k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
117k
    _blocks_returned_counter =
579
117k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
117k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
117k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
117k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
117k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
117k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
117k
    _memory_used_counter =
586
117k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
117k
    _common_profile->add_info_string("IsColocate",
588
117k
                                     std::to_string(_parent->is_colocated_operator()));
589
117k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
117k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
117k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
117k
    return Status::OK();
593
117k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
283
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
283
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
283
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
283
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
283
    _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
283
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
283
    _operator_profile->add_child(_common_profile.get(), true);
543
283
    _operator_profile->add_child(_custom_profile.get(), true);
544
283
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
283
    if constexpr (!is_fake_shared) {
546
283
        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
283
        } 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
283
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
283
            _dependency = _shared_state->create_source_dependency(
562
283
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
283
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
283
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
283
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
283
    }
571
572
283
    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
283
    _rows_returned_counter =
577
283
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
283
    _blocks_returned_counter =
579
283
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
283
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
283
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
283
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
283
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
283
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
283
    _memory_used_counter =
586
283
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
283
    _common_profile->add_info_string("IsColocate",
588
283
                                     std::to_string(_parent->is_colocated_operator()));
589
283
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
283
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
283
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
283
    return Status::OK();
593
283
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
1.31M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
1.31M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
1.31M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
1.31M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
1.31M
    _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.31M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
1.31M
    _operator_profile->add_child(_common_profile.get(), true);
543
1.31M
    _operator_profile->add_child(_custom_profile.get(), true);
544
1.31M
    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.31M
    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.31M
    _rows_returned_counter =
577
1.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
1.31M
    _blocks_returned_counter =
579
1.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
1.31M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
1.31M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
1.31M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
1.31M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
1.31M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
1.31M
    _memory_used_counter =
586
1.31M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
1.31M
    _common_profile->add_info_string("IsColocate",
588
1.31M
                                     std::to_string(_parent->is_colocated_operator()));
589
1.31M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
1.31M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
1.31M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
1.31M
    return Status::OK();
593
1.31M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
39.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
39.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
39.7k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
39.7k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
39.7k
    _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.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
39.7k
    _operator_profile->add_child(_common_profile.get(), true);
543
39.7k
    _operator_profile->add_child(_custom_profile.get(), true);
544
39.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
39.7k
    if constexpr (!is_fake_shared) {
546
39.7k
        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.7k
        } 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.66k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
3.66k
            _dependency = _shared_state->create_source_dependency(
562
3.66k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
3.66k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
3.66k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
36.1k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
36.1k
        }
570
39.7k
    }
571
572
39.7k
    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.7k
    _rows_returned_counter =
577
39.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
39.7k
    _blocks_returned_counter =
579
39.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
39.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
39.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
39.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
39.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
39.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
39.7k
    _memory_used_counter =
586
39.7k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
39.7k
    _common_profile->add_info_string("IsColocate",
588
39.7k
                                     std::to_string(_parent->is_colocated_operator()));
589
39.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
39.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
39.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
39.7k
    return Status::OK();
593
39.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
367
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
367
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
367
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
367
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
367
    _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
367
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
367
    _operator_profile->add_child(_common_profile.get(), true);
543
367
    _operator_profile->add_child(_custom_profile.get(), true);
544
367
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
367
    if constexpr (!is_fake_shared) {
546
367
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
369
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
369
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
369
            _dependency = _shared_state->create_source_dependency(
562
369
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
369
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
369
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
18.4E
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
18.4E
        }
570
367
    }
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
367
    _rows_returned_counter =
577
367
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
367
    _blocks_returned_counter =
579
367
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
367
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
367
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
367
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
367
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
367
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
367
    _memory_used_counter =
586
367
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
367
    _common_profile->add_info_string("IsColocate",
588
367
                                     std::to_string(_parent->is_colocated_operator()));
589
367
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
367
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
367
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
367
    return Status::OK();
593
367
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
7.23k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
7.23k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
7.23k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
7.23k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
7.23k
    _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
7.23k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
7.23k
    _operator_profile->add_child(_common_profile.get(), true);
543
7.23k
    _operator_profile->add_child(_custom_profile.get(), true);
544
7.23k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
7.23k
    if constexpr (!is_fake_shared) {
546
7.23k
        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
7.23k
        } 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
7.22k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
7.22k
            _dependency = _shared_state->create_source_dependency(
562
7.22k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
7.22k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
7.22k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
7.22k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
9
        }
570
7.23k
    }
571
572
7.23k
    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
7.23k
    _rows_returned_counter =
577
7.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
7.23k
    _blocks_returned_counter =
579
7.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
7.23k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
7.23k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
7.23k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
7.23k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
7.23k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
7.23k
    _memory_used_counter =
586
7.23k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
7.23k
    _common_profile->add_info_string("IsColocate",
588
7.23k
                                     std::to_string(_parent->is_colocated_operator()));
589
7.23k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
7.23k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
7.23k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
7.23k
    return Status::OK();
593
7.23k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
524
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
524
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
524
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
524
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
524
    _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
524
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
524
    _operator_profile->add_child(_common_profile.get(), true);
543
524
    _operator_profile->add_child(_custom_profile.get(), true);
544
524
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
524
    if constexpr (!is_fake_shared) {
546
524
        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
524
        } 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
522
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
522
            _dependency = _shared_state->create_source_dependency(
562
522
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
522
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
522
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
522
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
2
        }
570
524
    }
571
572
524
    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
524
    _rows_returned_counter =
577
524
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
524
    _blocks_returned_counter =
579
524
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
524
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
524
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
524
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
524
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
524
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
524
    _memory_used_counter =
586
524
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
524
    _common_profile->add_info_string("IsColocate",
588
524
                                     std::to_string(_parent->is_colocated_operator()));
589
524
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
524
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
524
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
524
    return Status::OK();
593
524
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
4.94k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
4.94k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
4.94k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
4.94k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
4.94k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
4.94k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
4.94k
    _operator_profile->add_child(_common_profile.get(), true);
543
4.94k
    _operator_profile->add_child(_custom_profile.get(), true);
544
4.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
4.94k
    if constexpr (!is_fake_shared) {
546
4.94k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
4.94k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
4.92k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
4.92k
            _dependency = _shared_state->create_source_dependency(
562
4.92k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
4.92k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
4.92k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
4.92k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
17
        }
570
4.94k
    }
571
572
4.94k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
4.94k
    _rows_returned_counter =
577
4.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
4.94k
    _blocks_returned_counter =
579
4.94k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
4.94k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
4.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
4.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
4.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
4.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
4.94k
    _memory_used_counter =
586
4.94k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
4.94k
    _common_profile->add_info_string("IsColocate",
588
4.94k
                                     std::to_string(_parent->is_colocated_operator()));
589
4.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
4.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
4.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
4.94k
    return Status::OK();
593
4.94k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
671k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
671k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
671k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
671k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
671k
    _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
671k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
671k
    _operator_profile->add_child(_common_profile.get(), true);
543
671k
    _operator_profile->add_child(_custom_profile.get(), true);
544
671k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
671k
    if constexpr (!is_fake_shared) {
546
671k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
666k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
666k
                                    .first.get()
549
666k
                                    ->template cast<SharedStateArg>();
550
551
666k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
666k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
666k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
666k
        } 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
5.13k
        } else {
566
5.13k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
5.13k
                DCHECK(false);
568
5.13k
            }
569
5.13k
        }
570
671k
    }
571
572
671k
    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
671k
    _rows_returned_counter =
577
671k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
671k
    _blocks_returned_counter =
579
671k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
671k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
671k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
671k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
671k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
671k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
671k
    _memory_used_counter =
586
671k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
671k
    _common_profile->add_info_string("IsColocate",
588
671k
                                     std::to_string(_parent->is_colocated_operator()));
589
671k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
671k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
671k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
671k
    return Status::OK();
593
671k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
149
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
149
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
149
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
149
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
149
    _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
149
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
149
    _operator_profile->add_child(_common_profile.get(), true);
543
149
    _operator_profile->add_child(_custom_profile.get(), true);
544
149
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
149
    if constexpr (!is_fake_shared) {
546
149
        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
18.4E
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
18.4E
        }
570
149
    }
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
149
    _rows_returned_counter =
577
149
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
149
    _blocks_returned_counter =
579
149
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
149
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
149
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
149
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
149
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
149
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
149
    _memory_used_counter =
586
149
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
149
    _common_profile->add_info_string("IsColocate",
588
149
                                     std::to_string(_parent->is_colocated_operator()));
589
149
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
149
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
149
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
149
    return Status::OK();
593
149
}
594
595
template <typename SharedStateArg>
596
2.55M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
2.55M
    _conjuncts.resize(_parent->_conjuncts.size());
598
2.55M
    _projections.resize(_parent->_projections.size());
599
2.88M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
332k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
332k
    }
602
5.13M
    for (size_t i = 0; i < _projections.size(); i++) {
603
2.58M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
2.58M
    }
605
2.55M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
2.55M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
8.08k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
51.3k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
43.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
43.2k
                    state, _intermediate_projections[i][j]));
611
43.2k
        }
612
8.08k
    }
613
2.55M
    return Status::OK();
614
2.55M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
140k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
140k
    _conjuncts.resize(_parent->_conjuncts.size());
598
140k
    _projections.resize(_parent->_projections.size());
599
141k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.32k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.32k
    }
602
734k
    for (size_t i = 0; i < _projections.size(); i++) {
603
594k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
594k
    }
605
140k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
141k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
673
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
6.01k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
5.34k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
5.34k
                    state, _intermediate_projections[i][j]));
611
5.34k
        }
612
673
    }
613
140k
    return Status::OK();
614
140k
}
_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
218k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
218k
    _conjuncts.resize(_parent->_conjuncts.size());
598
218k
    _projections.resize(_parent->_projections.size());
599
218k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
236k
    for (size_t i = 0; i < _projections.size(); i++) {
603
18.8k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
18.8k
    }
605
218k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
218k
    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
218k
    return Status::OK();
614
218k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
20
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
20
    _conjuncts.resize(_parent->_conjuncts.size());
598
20
    _projections.resize(_parent->_projections.size());
599
20
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
20
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
20
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
20
    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
20
    return Status::OK();
614
20
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
6.94k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
6.94k
    _conjuncts.resize(_parent->_conjuncts.size());
598
6.94k
    _projections.resize(_parent->_projections.size());
599
7.07k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
127
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
127
    }
602
31.5k
    for (size_t i = 0; i < _projections.size(); i++) {
603
24.5k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
24.5k
    }
605
6.94k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
6.98k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
38
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
237
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
199
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
199
                    state, _intermediate_projections[i][j]));
611
199
        }
612
38
    }
613
6.94k
    return Status::OK();
614
6.94k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
10.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
10.0k
    _conjuncts.resize(_parent->_conjuncts.size());
598
10.0k
    _projections.resize(_parent->_projections.size());
599
10.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
930
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
930
    }
602
25.6k
    for (size_t i = 0; i < _projections.size(); i++) {
603
15.6k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
15.6k
    }
605
10.0k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
10.1k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
174
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.31k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
1.13k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
1.13k
                    state, _intermediate_projections[i][j]));
611
1.13k
        }
612
174
    }
613
10.0k
    return Status::OK();
614
10.0k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
117k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
117k
    _conjuncts.resize(_parent->_conjuncts.size());
598
117k
    _projections.resize(_parent->_projections.size());
599
119k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.72k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.72k
    }
602
429k
    for (size_t i = 0; i < _projections.size(); i++) {
603
312k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
312k
    }
605
117k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
117k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
111
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
826
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
715
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
715
                    state, _intermediate_projections[i][j]));
611
715
        }
612
111
    }
613
117k
    return Status::OK();
614
117k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
287
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
287
    _conjuncts.resize(_parent->_conjuncts.size());
598
287
    _projections.resize(_parent->_projections.size());
599
287
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
681
    for (size_t i = 0; i < _projections.size(); i++) {
603
394
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
394
    }
605
287
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
287
    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
287
    return Status::OK();
614
287
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
1.32M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
1.32M
    _conjuncts.resize(_parent->_conjuncts.size());
598
1.32M
    _projections.resize(_parent->_projections.size());
599
1.65M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
327k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
327k
    }
602
2.85M
    for (size_t i = 0; i < _projections.size(); i++) {
603
1.52M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
1.52M
    }
605
1.32M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
1.33M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
7.08k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
42.9k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
35.8k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
35.8k
                    state, _intermediate_projections[i][j]));
611
35.8k
        }
612
7.08k
    }
613
1.32M
    return Status::OK();
614
1.32M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
39.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
39.9k
    _conjuncts.resize(_parent->_conjuncts.size());
598
39.9k
    _projections.resize(_parent->_projections.size());
599
39.9k
    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.9k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
39.9k
    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.9k
    return Status::OK();
614
39.9k
}
_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
7.23k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
7.23k
    _conjuncts.resize(_parent->_conjuncts.size());
598
7.23k
    _projections.resize(_parent->_projections.size());
599
7.80k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
567
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
567
    }
602
7.23k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
7.23k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
7.23k
    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
7.23k
    return Status::OK();
614
7.23k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
526
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
526
    _conjuncts.resize(_parent->_conjuncts.size());
598
526
    _projections.resize(_parent->_projections.size());
599
526
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
526
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
526
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
526
    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
526
    return Status::OK();
614
526
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
4.94k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
4.94k
    _conjuncts.resize(_parent->_conjuncts.size());
598
4.94k
    _projections.resize(_parent->_projections.size());
599
4.94k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
4.94k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
4.94k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
4.94k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
4.94k
    return Status::OK();
614
4.94k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
679k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
679k
    _conjuncts.resize(_parent->_conjuncts.size());
598
679k
    _projections.resize(_parent->_projections.size());
599
679k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
679k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
679k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
679k
    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
679k
    return Status::OK();
614
679k
}
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
9.09k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
9.09k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
9.09k
    _terminated = true;
622
9.09k
    return Status::OK();
623
9.09k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
1.53k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
1.53k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
1.53k
    _terminated = true;
622
1.53k
    return Status::OK();
623
1.53k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
131
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
131
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
131
    _terminated = true;
622
131
    return Status::OK();
623
131
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
204
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
204
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
204
    _terminated = true;
622
204
    return Status::OK();
623
204
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
837
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
837
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
837
    _terminated = true;
622
837
    return Status::OK();
623
837
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
5.65k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
5.65k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
5.65k
    _terminated = true;
622
5.65k
    return Status::OK();
623
5.65k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
4
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
4
    _terminated = true;
622
4
    return Status::OK();
623
4
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
10
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
10
    _terminated = true;
622
10
    return Status::OK();
623
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
3
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
3
    _terminated = true;
622
3
    return Status::OK();
623
3
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
696
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
696
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
696
    _terminated = true;
622
696
    return Status::OK();
623
696
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
19
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
19
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
19
    _terminated = true;
622
19
    return Status::OK();
623
19
}
624
625
template <typename SharedStateArg>
626
2.79M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
2.79M
    if (_closed) {
628
246k
        return Status::OK();
629
246k
    }
630
2.55M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
1.22M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
1.22M
    }
633
2.55M
    _closed = true;
634
2.55M
    return Status::OK();
635
2.79M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
140k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
140k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
140k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
140k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
140k
    }
633
140k
    _closed = true;
634
140k
    return Status::OK();
635
140k
}
_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
434k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
434k
    if (_closed) {
628
217k
        return Status::OK();
629
217k
    }
630
216k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
216k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
216k
    }
633
216k
    _closed = true;
634
216k
    return Status::OK();
635
434k
}
_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.94k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
6.94k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
6.94k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
6.94k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
6.94k
    }
633
6.94k
    _closed = true;
634
6.94k
    return Status::OK();
635
6.94k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
20.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
20.1k
    if (_closed) {
628
10.1k
        return Status::OK();
629
10.1k
    }
630
9.99k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
9.99k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
9.99k
    }
633
9.99k
    _closed = true;
634
9.99k
    return Status::OK();
635
20.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
117k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
117k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
117k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
117k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
117k
    }
633
117k
    _closed = true;
634
117k
    return Status::OK();
635
117k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
280
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
280
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
280
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
280
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
280
    }
633
280
    _closed = true;
634
280
    return Status::OK();
635
280
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
1.33M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
1.33M
    if (_closed) {
628
13.7k
        return Status::OK();
629
13.7k
    }
630
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
    }
633
1.32M
    _closed = true;
634
1.32M
    return Status::OK();
635
1.33M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
39.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
39.9k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
39.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
39.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
39.9k
    }
633
39.9k
    _closed = true;
634
39.9k
    return Status::OK();
635
39.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
730
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
730
    if (_closed) {
628
366
        return Status::OK();
629
366
    }
630
364
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
364
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
364
    }
633
364
    _closed = true;
634
364
    return Status::OK();
635
730
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
7.21k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
7.21k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
7.21k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
7.21k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
7.21k
    }
633
7.21k
    _closed = true;
634
7.21k
    return Status::OK();
635
7.21k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
846
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
846
    if (_closed) {
628
424
        return Status::OK();
629
424
    }
630
422
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
422
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
422
    }
633
422
    _closed = true;
634
422
    return Status::OK();
635
846
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
9.89k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
9.89k
    if (_closed) {
628
4.95k
        return Status::OK();
629
4.95k
    }
630
4.93k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
4.93k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
4.93k
    }
633
4.93k
    _closed = true;
634
4.93k
    return Status::OK();
635
9.89k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
681k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
681k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
681k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
681k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
681k
    }
633
681k
    _closed = true;
634
681k
    return Status::OK();
635
681k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
307
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
307
    if (_closed) {
628
157
        return Status::OK();
629
157
    }
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
307
}
636
637
template <typename SharedState>
638
1.92M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
1.92M
    _operator_profile =
641
1.92M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
1.92M
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
1.92M
    _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.92M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
1.92M
    _operator_profile->add_child(_common_profile, true);
650
1.92M
    _operator_profile->add_child(_custom_profile, true);
651
652
1.92M
    _operator_profile->set_metadata(_parent->node_id());
653
1.92M
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
1.92M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
1.92M
    if constexpr (!is_fake_shared) {
656
1.29M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
1.29M
            info.shared_state_map.end()) {
658
308k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
290k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
290k
            }
661
308k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
308k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
308k
                                                  ? 0
664
308k
                                                  : info.task_idx]
665
308k
                                  .get();
666
308k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
988k
        } else {
668
988k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
305
                DCHECK(false);
670
305
            }
671
988k
            _shared_state = info.shared_state->template cast<SharedState>();
672
988k
            _dependency = _shared_state->create_sink_dependency(
673
988k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
988k
        }
675
1.29M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
1.29M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
1.29M
    }
678
679
1.92M
    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.92M
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
1.92M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
1.92M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
1.92M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
1.92M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
1.92M
    _memory_used_counter =
689
1.92M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
1.92M
    _common_profile->add_info_string("IsColocate",
691
1.92M
                                     std::to_string(_parent->is_colocated_operator()));
692
1.92M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
1.92M
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
1.92M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
1.92M
    return Status::OK();
696
1.92M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
188k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
188k
    _operator_profile =
641
188k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
188k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
188k
    _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
188k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
188k
    _operator_profile->add_child(_common_profile, true);
650
188k
    _operator_profile->add_child(_custom_profile, true);
651
652
188k
    _operator_profile->set_metadata(_parent->node_id());
653
188k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
188k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
188k
    if constexpr (!is_fake_shared) {
656
188k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
188k
            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
16.8k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
16.8k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
16.8k
                                                  ? 0
664
16.8k
                                                  : info.task_idx]
665
16.8k
                                  .get();
666
16.8k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
171k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
171k
            _shared_state = info.shared_state->template cast<SharedState>();
672
171k
            _dependency = _shared_state->create_sink_dependency(
673
171k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
171k
        }
675
188k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
188k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
188k
    }
678
679
188k
    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
188k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
188k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
188k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
188k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
188k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
188k
    _memory_used_counter =
689
188k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
188k
    _common_profile->add_info_string("IsColocate",
691
188k
                                     std::to_string(_parent->is_colocated_operator()));
692
188k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
188k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
188k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
188k
    return Status::OK();
696
188k
}
_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
217k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
217k
    _operator_profile =
641
217k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
217k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
217k
    _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
217k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
217k
    _operator_profile->add_child(_common_profile, true);
650
217k
    _operator_profile->add_child(_custom_profile, true);
651
652
217k
    _operator_profile->set_metadata(_parent->node_id());
653
217k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
217k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
217k
    if constexpr (!is_fake_shared) {
656
217k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
217k
            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
217k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
217k
            _shared_state = info.shared_state->template cast<SharedState>();
672
217k
            _dependency = _shared_state->create_sink_dependency(
673
217k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
217k
        }
675
217k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
217k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
217k
    }
678
679
217k
    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
217k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
217k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
217k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
217k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
217k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
217k
    _memory_used_counter =
689
217k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
217k
    _common_profile->add_info_string("IsColocate",
691
217k
                                     std::to_string(_parent->is_colocated_operator()));
692
217k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
217k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
217k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
217k
    return Status::OK();
696
217k
}
_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.94k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
6.94k
    _operator_profile =
641
6.94k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
6.94k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
6.94k
    _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.94k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
6.94k
    _operator_profile->add_child(_common_profile, true);
650
6.94k
    _operator_profile->add_child(_custom_profile, true);
651
652
6.94k
    _operator_profile->set_metadata(_parent->node_id());
653
6.94k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
6.94k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
6.94k
    if constexpr (!is_fake_shared) {
656
6.94k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
6.94k
            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.94k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
6.94k
            _shared_state = info.shared_state->template cast<SharedState>();
672
6.94k
            _dependency = _shared_state->create_sink_dependency(
673
6.94k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
6.94k
        }
675
6.94k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
6.94k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
6.94k
    }
678
679
6.94k
    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.94k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
6.94k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
6.94k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
6.94k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
6.94k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
6.94k
    _memory_used_counter =
689
6.94k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
6.94k
    _common_profile->add_info_string("IsColocate",
691
6.94k
                                     std::to_string(_parent->is_colocated_operator()));
692
6.94k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
6.94k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
6.94k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
6.94k
    return Status::OK();
696
6.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
9.98k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
9.98k
    _operator_profile =
641
9.98k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
9.98k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
9.98k
    _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.98k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
9.98k
    _operator_profile->add_child(_common_profile, true);
650
9.98k
    _operator_profile->add_child(_custom_profile, true);
651
652
9.98k
    _operator_profile->set_metadata(_parent->node_id());
653
9.98k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
9.98k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
9.98k
    if constexpr (!is_fake_shared) {
656
9.98k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
9.98k
            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.98k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
9.98k
            _shared_state = info.shared_state->template cast<SharedState>();
672
9.98k
            _dependency = _shared_state->create_sink_dependency(
673
9.98k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
9.98k
        }
675
9.98k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
9.98k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
9.98k
    }
678
679
9.98k
    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.98k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
9.98k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
9.98k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
9.98k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
9.98k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
9.98k
    _memory_used_counter =
689
9.98k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
9.98k
    _common_profile->add_info_string("IsColocate",
691
9.98k
                                     std::to_string(_parent->is_colocated_operator()));
692
9.98k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
9.98k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
9.98k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
9.98k
    return Status::OK();
696
9.98k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
117k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
117k
    _operator_profile =
641
117k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
117k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
117k
    _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
117k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
117k
    _operator_profile->add_child(_common_profile, true);
650
117k
    _operator_profile->add_child(_custom_profile, true);
651
652
117k
    _operator_profile->set_metadata(_parent->node_id());
653
117k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
117k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
117k
    if constexpr (!is_fake_shared) {
656
117k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
117k
            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
117k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
117k
            _shared_state = info.shared_state->template cast<SharedState>();
672
117k
            _dependency = _shared_state->create_sink_dependency(
673
117k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
117k
        }
675
117k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
117k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
117k
    }
678
679
117k
    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
117k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
117k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
117k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
117k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
117k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
117k
    _memory_used_counter =
689
117k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
117k
    _common_profile->add_info_string("IsColocate",
691
117k
                                     std::to_string(_parent->is_colocated_operator()));
692
117k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
117k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
117k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
117k
    return Status::OK();
696
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
289
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
289
    _operator_profile =
641
289
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
289
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
289
    _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
289
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
289
    _operator_profile->add_child(_common_profile, true);
650
289
    _operator_profile->add_child(_custom_profile, true);
651
652
289
    _operator_profile->set_metadata(_parent->node_id());
653
289
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
289
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
289
    if constexpr (!is_fake_shared) {
656
289
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
289
            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
289
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
289
            _shared_state = info.shared_state->template cast<SharedState>();
672
289
            _dependency = _shared_state->create_sink_dependency(
673
289
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
289
        }
675
289
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
289
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
289
    }
678
679
289
    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
289
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
289
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
289
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
289
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
289
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
289
    _memory_used_counter =
689
289
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
289
    _common_profile->add_info_string("IsColocate",
691
289
                                     std::to_string(_parent->is_colocated_operator()));
692
289
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
289
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
289
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
289
    return Status::OK();
696
289
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
629k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
629k
    _operator_profile =
641
629k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
629k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
629k
    _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
629k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
629k
    _operator_profile->add_child(_common_profile, true);
650
629k
    _operator_profile->add_child(_custom_profile, true);
651
652
629k
    _operator_profile->set_metadata(_parent->node_id());
653
629k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
629k
    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
629k
    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
629k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
629k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
629k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
629k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
629k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
629k
    _memory_used_counter =
689
629k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
629k
    _common_profile->add_info_string("IsColocate",
691
629k
                                     std::to_string(_parent->is_colocated_operator()));
692
629k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
629k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
629k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
629k
    return Status::OK();
696
629k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
7.61k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
7.61k
    _operator_profile =
641
7.61k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
7.61k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
7.61k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
7.61k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
7.61k
    _operator_profile->add_child(_common_profile, true);
650
7.61k
    _operator_profile->add_child(_custom_profile, true);
651
652
7.61k
    _operator_profile->set_metadata(_parent->node_id());
653
7.61k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
7.61k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
7.61k
    if constexpr (!is_fake_shared) {
656
7.61k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
7.61k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
7.61k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
7.61k
            _shared_state = info.shared_state->template cast<SharedState>();
672
7.61k
            _dependency = _shared_state->create_sink_dependency(
673
7.61k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
7.61k
        }
675
7.61k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
7.61k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
7.61k
    }
678
679
7.61k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
7.61k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
7.61k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
7.61k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
7.61k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
7.61k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
7.61k
    _memory_used_counter =
689
7.61k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
7.61k
    _common_profile->add_info_string("IsColocate",
691
7.61k
                                     std::to_string(_parent->is_colocated_operator()));
692
7.61k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
7.61k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
7.61k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
7.61k
    return Status::OK();
696
7.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
526
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
526
    _operator_profile =
641
526
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
526
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
526
    _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
526
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
526
    _operator_profile->add_child(_common_profile, true);
650
526
    _operator_profile->add_child(_custom_profile, true);
651
652
526
    _operator_profile->set_metadata(_parent->node_id());
653
526
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
526
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
526
    if constexpr (!is_fake_shared) {
656
526
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
526
            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
526
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
526
            _shared_state = info.shared_state->template cast<SharedState>();
672
526
            _dependency = _shared_state->create_sink_dependency(
673
526
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
526
        }
675
526
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
526
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
526
    }
678
679
526
    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
526
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
526
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
526
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
526
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
526
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
526
    _memory_used_counter =
689
526
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
526
    _common_profile->add_info_string("IsColocate",
691
526
                                     std::to_string(_parent->is_colocated_operator()));
692
526
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
526
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
526
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
526
    return Status::OK();
696
526
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
2.70k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
2.70k
    _operator_profile =
641
2.70k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
2.70k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
2.70k
    _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.70k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
2.70k
    _operator_profile->add_child(_common_profile, true);
650
2.70k
    _operator_profile->add_child(_custom_profile, true);
651
652
2.70k
    _operator_profile->set_metadata(_parent->node_id());
653
2.70k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
2.70k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
2.70k
    if constexpr (!is_fake_shared) {
656
2.70k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
2.70k
            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.70k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
2.70k
            _shared_state = info.shared_state->template cast<SharedState>();
672
2.70k
            _dependency = _shared_state->create_sink_dependency(
673
2.70k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
2.70k
        }
675
2.70k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
2.70k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
2.70k
    }
678
679
2.70k
    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.70k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
2.70k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
2.70k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
2.70k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
2.70k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
2.70k
    _memory_used_counter =
689
2.70k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
2.70k
    _common_profile->add_info_string("IsColocate",
691
2.70k
                                     std::to_string(_parent->is_colocated_operator()));
692
2.70k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
2.70k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
2.70k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
2.70k
    return Status::OK();
696
2.70k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
12.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
12.2k
    _operator_profile =
641
12.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
12.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
12.2k
    _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.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
12.2k
    _operator_profile->add_child(_common_profile, true);
650
12.2k
    _operator_profile->add_child(_custom_profile, true);
651
652
12.2k
    _operator_profile->set_metadata(_parent->node_id());
653
12.2k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
12.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
12.2k
    if constexpr (!is_fake_shared) {
656
12.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
12.2k
            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.2k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
12.2k
            _shared_state = info.shared_state->template cast<SharedState>();
672
12.2k
            _dependency = _shared_state->create_sink_dependency(
673
12.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
12.2k
        }
675
12.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
12.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
12.2k
    }
678
679
12.2k
    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.2k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
12.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
12.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
12.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
12.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
12.2k
    _memory_used_counter =
689
12.2k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
12.2k
    _common_profile->add_info_string("IsColocate",
691
12.2k
                                     std::to_string(_parent->is_colocated_operator()));
692
12.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
12.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
12.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
12.2k
    return Status::OK();
696
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
291k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
291k
    _operator_profile =
641
291k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
291k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
291k
    _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
291k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
291k
    _operator_profile->add_child(_common_profile, true);
650
291k
    _operator_profile->add_child(_custom_profile, true);
651
652
291k
    _operator_profile->set_metadata(_parent->node_id());
653
291k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
291k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
291k
    if constexpr (!is_fake_shared) {
656
291k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
291k
            info.shared_state_map.end()) {
658
290k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
290k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
290k
            }
661
290k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
290k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
290k
                                                  ? 0
664
290k
                                                  : info.task_idx]
665
290k
                                  .get();
666
290k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
290k
        } else {
668
305
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
305
                DCHECK(false);
670
305
            }
671
305
            _shared_state = info.shared_state->template cast<SharedState>();
672
305
            _dependency = _shared_state->create_sink_dependency(
673
305
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
305
        }
675
291k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
291k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
291k
    }
678
679
291k
    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
291k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
291k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
291k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
291k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
291k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
291k
    _memory_used_counter =
689
291k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
291k
    _common_profile->add_info_string("IsColocate",
691
291k
                                     std::to_string(_parent->is_colocated_operator()));
692
291k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
291k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
291k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
291k
    return Status::OK();
696
291k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
441k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
441k
    _operator_profile =
641
441k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
441k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
441k
    _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
441k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
441k
    _operator_profile->add_child(_common_profile, true);
650
441k
    _operator_profile->add_child(_custom_profile, true);
651
652
441k
    _operator_profile->set_metadata(_parent->node_id());
653
441k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
441k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
441k
    if constexpr (!is_fake_shared) {
656
441k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
441k
            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
865
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
865
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
865
                                                  ? 0
664
865
                                                  : info.task_idx]
665
865
                                  .get();
666
865
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
440k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
440k
            _shared_state = info.shared_state->template cast<SharedState>();
672
440k
            _dependency = _shared_state->create_sink_dependency(
673
440k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
440k
        }
675
441k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
441k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
441k
    }
678
679
441k
    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
441k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
441k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
441k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
441k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
441k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
441k
    _memory_used_counter =
689
441k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
441k
    _common_profile->add_info_string("IsColocate",
691
441k
                                     std::to_string(_parent->is_colocated_operator()));
692
441k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
441k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
441k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
441k
    return Status::OK();
696
441k
}
_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.93M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
1.93M
    if (_closed) {
701
2
        return Status::OK();
702
2
    }
703
1.93M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
1.30M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
1.30M
    }
706
1.93M
    _closed = true;
707
1.93M
    return Status::OK();
708
1.93M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
188k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
188k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
188k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
188k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
188k
    }
706
188k
    _closed = true;
707
188k
    return Status::OK();
708
188k
}
_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
217k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
217k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
217k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
217k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
217k
    }
706
217k
    _closed = true;
707
217k
    return Status::OK();
708
217k
}
_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.92k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
6.92k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
6.92k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
6.92k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
6.92k
    }
706
6.92k
    _closed = true;
707
6.92k
    return Status::OK();
708
6.92k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
9.94k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
9.94k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
9.94k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
9.94k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
9.94k
    }
706
9.94k
    _closed = true;
707
9.94k
    return Status::OK();
708
9.94k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
117k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
117k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
117k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
117k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
117k
    }
706
117k
    _closed = true;
707
117k
    return Status::OK();
708
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
282
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
282
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
282
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
282
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
282
    }
706
282
    _closed = true;
707
282
    return Status::OK();
708
282
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
631k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
631k
    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
631k
    _closed = true;
707
631k
    return Status::OK();
708
631k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
7.61k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
7.61k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
7.61k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
7.61k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
7.61k
    }
706
7.61k
    _closed = true;
707
7.61k
    return Status::OK();
708
7.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
422
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
422
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
422
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
422
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
422
    }
706
422
    _closed = true;
707
422
    return Status::OK();
708
422
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
2.69k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
2.69k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
2.69k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
2.69k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
2.69k
    }
706
2.69k
    _closed = true;
707
2.69k
    return Status::OK();
708
2.69k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
12.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
12.2k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
12.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
12.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
12.2k
    }
706
12.2k
    _closed = true;
707
12.2k
    return Status::OK();
708
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
291k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
291k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
291k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
291k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
291k
    }
706
291k
    _closed = true;
707
291k
    return Status::OK();
708
291k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
446k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
446k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
446k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
446k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
446k
    }
706
446k
    _closed = true;
707
446k
    return Status::OK();
708
446k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
365
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
365
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
365
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
365
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
365
    }
706
365
    _closed = true;
707
365
    return Status::OK();
708
365
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
300
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
300
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
300
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
300
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
300
    }
706
300
    _closed = true;
707
300
    return Status::OK();
708
300
}
709
710
template <typename LocalStateType>
711
6.13k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
6.13k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
6.13k
    return pull(state, block, eos);
714
6.13k
}
_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
6.10k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
6.10k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
6.09k
    return pull(state, block, eos);
714
6.10k
}
715
716
template <typename LocalStateType>
717
815k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
815k
    auto& local_state = get_local_state(state);
719
815k
    if (need_more_input_data(state)) {
720
739k
        local_state._child_block->clear_column_data(
721
739k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
739k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
739k
                state, local_state._child_block.get(), &local_state._child_eos));
724
739k
        *eos = local_state._child_eos;
725
739k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
47.7k
            return Status::OK();
727
47.7k
        }
728
691k
        {
729
691k
            SCOPED_TIMER(local_state.exec_time_counter());
730
691k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
691k
        }
732
691k
    }
733
734
768k
    if (!need_more_input_data(state)) {
735
729k
        SCOPED_TIMER(local_state.exec_time_counter());
736
729k
        bool new_eos = false;
737
729k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
729k
        if (new_eos) {
739
657k
            *eos = true;
740
657k
        } else if (!need_more_input_data(state)) {
741
27.3k
            *eos = false;
742
27.3k
        }
743
729k
    }
744
768k
    return Status::OK();
745
768k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
187k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
187k
    auto& local_state = get_local_state(state);
719
187k
    if (need_more_input_data(state)) {
720
123k
        local_state._child_block->clear_column_data(
721
123k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
123k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
123k
                state, local_state._child_block.get(), &local_state._child_eos));
724
123k
        *eos = local_state._child_eos;
725
123k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
24.7k
            return Status::OK();
727
24.7k
        }
728
99.2k
        {
729
99.2k
            SCOPED_TIMER(local_state.exec_time_counter());
730
99.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
99.2k
        }
732
99.2k
    }
733
734
162k
    if (!need_more_input_data(state)) {
735
162k
        SCOPED_TIMER(local_state.exec_time_counter());
736
162k
        bool new_eos = false;
737
162k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
162k
        if (new_eos) {
739
114k
            *eos = true;
740
114k
        } else if (!need_more_input_data(state)) {
741
13.0k
            *eos = false;
742
13.0k
        }
743
162k
    }
744
162k
    return Status::OK();
745
162k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
3.29k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
3.29k
    auto& local_state = get_local_state(state);
719
3.29k
    if (need_more_input_data(state)) {
720
1.97k
        local_state._child_block->clear_column_data(
721
1.97k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
1.97k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
1.97k
                state, local_state._child_block.get(), &local_state._child_eos));
724
1.97k
        *eos = local_state._child_eos;
725
1.97k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
378
            return Status::OK();
727
378
        }
728
1.59k
        {
729
1.59k
            SCOPED_TIMER(local_state.exec_time_counter());
730
1.59k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
1.59k
        }
732
1.59k
    }
733
734
2.93k
    if (!need_more_input_data(state)) {
735
2.93k
        SCOPED_TIMER(local_state.exec_time_counter());
736
2.93k
        bool new_eos = false;
737
2.93k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
2.93k
        if (new_eos) {
739
1.29k
            *eos = true;
740
1.63k
        } else if (!need_more_input_data(state)) {
741
1.33k
            *eos = false;
742
1.33k
        }
743
2.93k
    }
744
2.91k
    return Status::OK();
745
2.91k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
1.53k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
1.53k
    auto& local_state = get_local_state(state);
719
1.53k
    if (need_more_input_data(state)) {
720
1.53k
        local_state._child_block->clear_column_data(
721
1.53k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
1.53k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
1.53k
                state, local_state._child_block.get(), &local_state._child_eos));
724
1.53k
        *eos = local_state._child_eos;
725
1.53k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
634
            return Status::OK();
727
634
        }
728
903
        {
729
903
            SCOPED_TIMER(local_state.exec_time_counter());
730
903
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
903
        }
732
903
    }
733
734
903
    if (!need_more_input_data(state)) {
735
903
        SCOPED_TIMER(local_state.exec_time_counter());
736
903
        bool new_eos = false;
737
903
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
903
        if (new_eos) {
739
663
            *eos = true;
740
663
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
903
    }
744
903
    return Status::OK();
745
903
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
20.7k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
20.7k
    auto& local_state = get_local_state(state);
719
20.8k
    if (need_more_input_data(state)) {
720
20.8k
        local_state._child_block->clear_column_data(
721
20.8k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
20.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
20.8k
                state, local_state._child_block.get(), &local_state._child_eos));
724
20.8k
        *eos = local_state._child_eos;
725
20.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
5.96k
            return Status::OK();
727
5.96k
        }
728
14.8k
        {
729
14.8k
            SCOPED_TIMER(local_state.exec_time_counter());
730
14.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
14.8k
        }
732
14.8k
    }
733
734
14.8k
    if (!need_more_input_data(state)) {
735
8.49k
        SCOPED_TIMER(local_state.exec_time_counter());
736
8.49k
        bool new_eos = false;
737
8.49k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
8.49k
        if (new_eos) {
739
8.35k
            *eos = true;
740
8.35k
        } else if (!need_more_input_data(state)) {
741
8
            *eos = false;
742
8
        }
743
8.49k
    }
744
14.8k
    return Status::OK();
745
14.8k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
568k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
568k
    auto& local_state = get_local_state(state);
719
570k
    if (need_more_input_data(state)) {
720
570k
        local_state._child_block->clear_column_data(
721
570k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
570k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
570k
                state, local_state._child_block.get(), &local_state._child_eos));
724
570k
        *eos = local_state._child_eos;
725
570k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
13.9k
            return Status::OK();
727
13.9k
        }
728
556k
        {
729
556k
            SCOPED_TIMER(local_state.exec_time_counter());
730
556k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
556k
        }
732
556k
    }
733
734
554k
    if (!need_more_input_data(state)) {
735
523k
        SCOPED_TIMER(local_state.exec_time_counter());
736
523k
        bool new_eos = false;
737
523k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
523k
        if (new_eos) {
739
522k
            *eos = true;
740
522k
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
523k
    }
744
554k
    return Status::OK();
745
554k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
28.6k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
28.6k
    auto& local_state = get_local_state(state);
719
28.6k
    if (need_more_input_data(state)) {
720
16.0k
        local_state._child_block->clear_column_data(
721
16.0k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
16.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
16.0k
                state, local_state._child_block.get(), &local_state._child_eos));
724
16.0k
        *eos = local_state._child_eos;
725
16.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
1.61k
            return Status::OK();
727
1.61k
        }
728
14.4k
        {
729
14.4k
            SCOPED_TIMER(local_state.exec_time_counter());
730
14.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
14.4k
        }
732
14.4k
    }
733
734
26.9k
    if (!need_more_input_data(state)) {
735
25.9k
        SCOPED_TIMER(local_state.exec_time_counter());
736
25.9k
        bool new_eos = false;
737
25.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
25.9k
        if (new_eos) {
739
6.92k
            *eos = true;
740
18.9k
        } else if (!need_more_input_data(state)) {
741
12.5k
            *eos = false;
742
12.5k
        }
743
25.9k
    }
744
26.9k
    return Status::OK();
745
26.9k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
5.41k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
5.41k
    auto& local_state = get_local_state(state);
719
5.41k
    if (need_more_input_data(state)) {
720
5.04k
        local_state._child_block->clear_column_data(
721
5.04k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
5.04k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
5.04k
                state, local_state._child_block.get(), &local_state._child_eos));
724
5.04k
        *eos = local_state._child_eos;
725
5.04k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
482
            return Status::OK();
727
482
        }
728
4.56k
        {
729
4.56k
            SCOPED_TIMER(local_state.exec_time_counter());
730
4.56k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
4.56k
        }
732
4.56k
    }
733
734
4.93k
    if (!need_more_input_data(state)) {
735
4.93k
        SCOPED_TIMER(local_state.exec_time_counter());
736
4.93k
        bool new_eos = false;
737
4.93k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
4.93k
        if (new_eos) {
739
3.07k
            *eos = true;
740
3.07k
        } else if (!need_more_input_data(state)) {
741
374
            *eos = false;
742
374
        }
743
4.93k
    }
744
4.93k
    return Status::OK();
745
4.93k
}
746
747
template <typename Writer, typename Parent>
748
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
749
66.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
66.1k
    RETURN_IF_ERROR(Base::init(state, info));
751
66.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
66.1k
                                                         "AsyncWriterDependency", true);
753
66.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
66.1k
                             _finish_dependency));
755
756
66.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
66.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
66.1k
    return Status::OK();
759
66.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
341
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
341
    RETURN_IF_ERROR(Base::init(state, info));
751
341
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
341
                                                         "AsyncWriterDependency", true);
753
341
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
341
                             _finish_dependency));
755
756
341
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
341
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
341
    return Status::OK();
759
341
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
65.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
65.8k
    RETURN_IF_ERROR(Base::init(state, info));
751
65.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
65.8k
                                                         "AsyncWriterDependency", true);
753
65.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
65.8k
                             _finish_dependency));
755
756
65.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
65.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
65.8k
    return Status::OK();
759
65.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
5
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
5
    RETURN_IF_ERROR(Base::init(state, info));
751
5
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
5
                                                         "AsyncWriterDependency", true);
753
5
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
5
                             _finish_dependency));
755
756
5
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
5
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
5
    return Status::OK();
759
5
}
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
66.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
66.7k
    RETURN_IF_ERROR(Base::open(state));
765
66.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
476k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
410k
        RETURN_IF_ERROR(
768
410k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
410k
    }
770
66.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
66.7k
    return Status::OK();
772
66.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
340
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
340
    RETURN_IF_ERROR(Base::open(state));
765
340
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
1.78k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
1.44k
        RETURN_IF_ERROR(
768
1.44k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
1.44k
    }
770
340
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
340
    return Status::OK();
772
340
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
66.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
66.3k
    RETURN_IF_ERROR(Base::open(state));
765
66.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
474k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
408k
        RETURN_IF_ERROR(
768
408k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
408k
    }
770
66.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
66.3k
    return Status::OK();
772
66.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
5
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
5
    RETURN_IF_ERROR(Base::open(state));
765
5
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
90
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
85
        RETURN_IF_ERROR(
768
85
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
85
    }
770
5
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
5
    return Status::OK();
772
5
}
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
80.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
80.1k
    return _writer->sink(block, eos);
778
80.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
1.19k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
1.19k
    return _writer->sink(block, eos);
778
1.19k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
78.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
78.9k
    return _writer->sink(block, eos);
778
78.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
5
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
5
    return _writer->sink(block, eos);
778
5
}
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
66.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
66.8k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
66.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
66.8k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
66.9k
    if (_writer) {
790
66.9k
        Status st = _writer->get_writer_status();
791
66.9k
        if (exec_status.ok()) {
792
66.8k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
66.8k
                                                       : Status::Cancelled("force close"));
794
66.8k
        } else {
795
69
            _writer->force_close(exec_status);
796
69
        }
797
        // If there is an error in process_block thread, then we should get the writer
798
        // status before call force_close. For example, the thread may failed in commit
799
        // transaction.
800
66.9k
        RETURN_IF_ERROR(st);
801
66.9k
    }
802
66.8k
    return Base::close(state, exec_status);
803
66.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
329
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
329
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
329
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
329
    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
329
    if (_writer) {
790
329
        Status st = _writer->get_writer_status();
791
329
        if (exec_status.ok()) {
792
329
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
329
                                                       : Status::Cancelled("force close"));
794
329
        } 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
329
        RETURN_IF_ERROR(st);
801
329
    }
802
329
    return Base::close(state, exec_status);
803
329
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
66.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
66.5k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
66.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
66.5k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
66.5k
    if (_writer) {
790
66.5k
        Status st = _writer->get_writer_status();
791
66.5k
        if (exec_status.ok()) {
792
66.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
66.4k
                                                       : Status::Cancelled("force close"));
794
66.4k
        } else {
795
69
            _writer->force_close(exec_status);
796
69
        }
797
        // If there is an error in process_block thread, then we should get the writer
798
        // status before call force_close. For example, the thread may failed in commit
799
        // transaction.
800
66.5k
        RETURN_IF_ERROR(st);
801
66.5k
    }
802
66.4k
    return Base::close(state, exec_status);
803
66.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
5
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
5
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
5
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
5
    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
5
    if (_writer) {
790
5
        Status st = _writer->get_writer_status();
791
5
        if (exec_status.ok()) {
792
5
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
5
                                                       : Status::Cancelled("force close"));
794
5
        } 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
5
        RETURN_IF_ERROR(st);
801
5
    }
802
5
    return Base::close(state, exec_status);
803
5
}
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