Coverage Report

Created: 2026-03-14 11:58

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.25M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
2.25M
    if (_parent->nereids_id() == -1) {
117
1.15M
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
1.15M
    } else {
119
1.09M
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
1.09M
                           std::to_string(_parent->nereids_id()),
121
1.09M
                           std::to_string(_parent->node_id()));
122
1.09M
    }
123
2.25M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
138k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
138k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
138k
    } else {
119
138k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
138k
                           std::to_string(_parent->nereids_id()),
121
138k
                           std::to_string(_parent->node_id()));
122
138k
    }
123
138k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
1
    if (_parent->nereids_id() == -1) {
117
1
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
1
    } else {
119
0
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
0
                           std::to_string(_parent->nereids_id()),
121
0
                           std::to_string(_parent->node_id()));
122
0
    }
123
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
195k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
195k
    if (_parent->nereids_id() == -1) {
117
12
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
195k
    } else {
119
195k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
195k
                           std::to_string(_parent->nereids_id()),
121
195k
                           std::to_string(_parent->node_id()));
122
195k
    }
123
195k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
15
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
15
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
15
    } else {
119
15
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
15
                           std::to_string(_parent->nereids_id()),
121
15
                           std::to_string(_parent->node_id()));
122
15
    }
123
15
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
5.55k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
5.55k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
5.55k
    } else {
119
5.55k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
5.55k
                           std::to_string(_parent->nereids_id()),
121
5.55k
                           std::to_string(_parent->node_id()));
122
5.55k
    }
123
5.55k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
8.71k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
8.71k
    if (_parent->nereids_id() == -1) {
117
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
8.70k
    } else {
119
8.70k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
8.70k
                           std::to_string(_parent->nereids_id()),
121
8.70k
                           std::to_string(_parent->node_id()));
122
8.70k
    }
123
8.71k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
113k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
113k
    if (_parent->nereids_id() == -1) {
117
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
113k
    } else {
119
113k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
113k
                           std::to_string(_parent->nereids_id()),
121
113k
                           std::to_string(_parent->node_id()));
122
113k
    }
123
113k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
9
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
9
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
9
    } else {
119
9
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
9
                           std::to_string(_parent->nereids_id()),
121
9
                           std::to_string(_parent->node_id()));
122
9
    }
123
9
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
1.05M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
1.05M
    if (_parent->nereids_id() == -1) {
117
465k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
589k
    } else {
119
589k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
589k
                           std::to_string(_parent->nereids_id()),
121
589k
                           std::to_string(_parent->node_id()));
122
589k
    }
123
1.05M
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
39.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
39.5k
    if (_parent->nereids_id() == -1) {
117
2
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
39.5k
    } else {
119
39.5k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
39.5k
                           std::to_string(_parent->nereids_id()),
121
39.5k
                           std::to_string(_parent->node_id()));
122
39.5k
    }
123
39.5k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
366
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
366
    if (_parent->nereids_id() == -1) {
117
366
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
366
    } 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
366
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
6.92k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
6.92k
    if (_parent->nereids_id() == -1) {
117
6.92k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
18.4E
    } else {
119
18.4E
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
18.4E
                           std::to_string(_parent->nereids_id()),
121
18.4E
                           std::to_string(_parent->node_id()));
122
18.4E
    }
123
6.92k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
382
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
382
    if (_parent->nereids_id() == -1) {
117
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
280
    } else {
119
280
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
280
                           std::to_string(_parent->nereids_id()),
121
280
                           std::to_string(_parent->node_id()));
122
280
    }
123
382
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
4.78k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
4.78k
    if (_parent->nereids_id() == -1) {
117
10
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
4.77k
    } else {
119
4.77k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
4.77k
                           std::to_string(_parent->nereids_id()),
121
4.77k
                           std::to_string(_parent->node_id()));
122
4.77k
    }
123
4.78k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
684k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
684k
    if (_parent->nereids_id() == -1) {
117
684k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
18.4E
    } else {
119
18.4E
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
18.4E
                           std::to_string(_parent->nereids_id()),
121
18.4E
                           std::to_string(_parent->node_id()));
122
18.4E
    }
123
684k
}
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.30M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
1.30M
    if (_parent->nereids_id() == -1) {
128
787k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
787k
    } else {
130
520k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
520k
                           std::to_string(_parent->nereids_id()),
132
520k
                           std::to_string(_parent->node_id()));
133
520k
    }
134
1.30M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
187k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
187k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
187k
    } else {
130
187k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
187k
                           std::to_string(_parent->nereids_id()),
132
187k
                           std::to_string(_parent->node_id()));
133
187k
    }
134
187k
}
_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
197k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
197k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
197k
    } else {
130
197k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
197k
                           std::to_string(_parent->nereids_id()),
132
197k
                           std::to_string(_parent->node_id()));
133
197k
    }
134
197k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
18
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
18
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
18
    } else {
130
18
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
18
                           std::to_string(_parent->nereids_id()),
132
18
                           std::to_string(_parent->node_id()));
133
18
    }
134
18
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
5.57k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
5.57k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
5.57k
    } else {
130
5.57k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
5.57k
                           std::to_string(_parent->nereids_id()),
132
5.57k
                           std::to_string(_parent->node_id()));
133
5.57k
    }
134
5.57k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
8.74k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
8.74k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
8.73k
    } else {
130
8.73k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
8.73k
                           std::to_string(_parent->nereids_id()),
132
8.73k
                           std::to_string(_parent->node_id()));
133
8.73k
    }
134
8.74k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
113k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
113k
    if (_parent->nereids_id() == -1) {
128
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
113k
    } else {
130
113k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
113k
                           std::to_string(_parent->nereids_id()),
132
113k
                           std::to_string(_parent->node_id()));
133
113k
    }
134
113k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
15
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
15
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
15
    } else {
130
15
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
15
                           std::to_string(_parent->nereids_id()),
132
15
                           std::to_string(_parent->node_id()));
133
15
    }
134
15
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
16
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
16
    if (_parent->nereids_id() == -1) {
128
16
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
16
    } else {
130
0
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
0
                           std::to_string(_parent->nereids_id()),
132
0
                           std::to_string(_parent->node_id()));
133
0
    }
134
16
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
7.28k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
7.28k
    if (_parent->nereids_id() == -1) {
128
3
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
7.27k
    } else {
130
7.27k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
7.27k
                           std::to_string(_parent->nereids_id()),
132
7.27k
                           std::to_string(_parent->node_id()));
133
7.27k
    }
134
7.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
384
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
384
    if (_parent->nereids_id() == -1) {
128
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
282
    } else {
130
282
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
282
                           std::to_string(_parent->nereids_id()),
132
282
                           std::to_string(_parent->node_id()));
133
282
    }
134
384
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
12.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
12.0k
    if (_parent->nereids_id() == -1) {
128
11.9k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
11.9k
    } else {
130
11
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
11
                           std::to_string(_parent->nereids_id()),
132
11
                           std::to_string(_parent->node_id()));
133
11
    }
134
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
310k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
310k
    if (_parent->nereids_id() == -1) {
128
310k
        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
310k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
463k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
464k
    if (_parent->nereids_id() == -1) {
128
464k
        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
463k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
367
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
368
    if (_parent->nereids_id() == -1) {
128
368
        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
367
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
300
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
300
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
300
    } else {
130
300
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
300
                           std::to_string(_parent->nereids_id()),
132
300
                           std::to_string(_parent->node_id()));
133
300
    }
134
300
}
135
136
template <typename SharedStateArg>
137
29.4k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
29.4k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
29.4k
    _terminated = true;
142
29.4k
    return Status::OK();
143
29.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
24.0k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
24.0k
    _terminated = true;
142
24.0k
    return Status::OK();
143
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
478
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
478
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
478
    _terminated = true;
142
478
    return Status::OK();
143
478
}
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
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
2.94k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
2.94k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
2.94k
    _terminated = true;
142
2.94k
    return Status::OK();
143
2.94k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
1.65k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
1.65k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
1.65k
    _terminated = true;
142
1.65k
    return Status::OK();
143
1.65k
}
_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
9
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
9
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
9
    _terminated = true;
142
9
    return Status::OK();
143
9
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
186
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
186
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
186
    _terminated = true;
142
186
    return Status::OK();
143
186
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
134
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
134
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
134
    _terminated = true;
142
134
    return Status::OK();
143
134
}
144
145
614k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
146
614k
    return _child && _child->is_serial_operator() && !is_source()
147
614k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
148
614k
                   : DataDistribution(ExchangeType::NOOP);
149
614k
}
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
57.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
57.1k
    fmt::memory_buffer debug_string_buffer;
158
57.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
57.1k
    return fmt::to_string(debug_string_buffer);
160
57.1k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
36
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
36
    fmt::memory_buffer debug_string_buffer;
158
36
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
36
    return fmt::to_string(debug_string_buffer);
160
36
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
3
    fmt::memory_buffer debug_string_buffer;
158
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
3
    return fmt::to_string(debug_string_buffer);
160
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
57.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
57.0k
    fmt::memory_buffer debug_string_buffer;
158
57.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
57.0k
    return fmt::to_string(debug_string_buffer);
160
57.0k
}
_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
57.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
57.1k
    fmt::memory_buffer debug_string_buffer;
165
57.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
57.1k
    return fmt::to_string(debug_string_buffer);
167
57.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_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
84
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
84
    fmt::memory_buffer debug_string_buffer;
165
84
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
84
    return fmt::to_string(debug_string_buffer);
167
84
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
57.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
57.0k
    fmt::memory_buffer debug_string_buffer;
165
57.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
57.0k
    return fmt::to_string(debug_string_buffer);
167
57.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
168
169
57.3k
std::string OperatorXBase::debug_string(int indentation_level) const {
170
57.3k
    fmt::memory_buffer debug_string_buffer;
171
57.3k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
172
57.3k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
173
57.3k
                   _is_serial_operator);
174
57.3k
    return fmt::to_string(debug_string_buffer);
175
57.3k
}
176
177
57.1k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
178
57.1k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
179
57.1k
}
180
181
562k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
182
562k
    std::string node_name = print_plan_node_type(tnode.node_type);
183
562k
    _nereids_id = tnode.nereids_id;
184
562k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
185
2.88k
        if (!tnode.__isset.output_tuple_id) {
186
0
            return Status::InternalError("no final output tuple id");
187
0
        }
188
2.88k
        if (tnode.intermediate_output_tuple_id_list.size() !=
189
2.88k
            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.88k
    }
197
562k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
198
562k
    _op_name = substr + "_OPERATOR";
199
200
562k
    if (tnode.__isset.vconjunct) {
201
0
        return Status::InternalError("vconjunct is not supported yet");
202
562k
    } else if (tnode.__isset.conjuncts) {
203
257k
        for (const auto& conjunct : tnode.conjuncts) {
204
257k
            VExprContextSPtr context;
205
257k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
206
257k
            _conjuncts.emplace_back(context);
207
257k
        }
208
87.5k
    }
209
210
    // create the projections expr
211
562k
    if (tnode.__isset.projections) {
212
242k
        DCHECK(tnode.__isset.output_tuple_id);
213
242k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
214
242k
    }
215
562k
    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
562k
    return Status::OK();
225
562k
}
226
227
589k
Status OperatorXBase::prepare(RuntimeState* state) {
228
589k
    for (auto& conjunct : _conjuncts) {
229
257k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
230
257k
    }
231
589k
    if (state->enable_adjust_conjunct_order_by_cost()) {
232
539k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
233
339k
            return a->execute_cost() < b->execute_cost();
234
339k
        });
235
539k
    };
236
237
592k
    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
589k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
242
243
589k
    if (has_output_row_desc()) {
244
242k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
245
242k
    }
246
247
589k
    for (auto& conjunct : _conjuncts) {
248
257k
        RETURN_IF_ERROR(conjunct->open(state));
249
257k
    }
250
589k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
251
588k
    for (auto& projections : _intermediate_projections) {
252
3.79k
        RETURN_IF_ERROR(VExpr::open(projections, state));
253
3.79k
    }
254
588k
    if (_child && !is_source()) {
255
137k
        RETURN_IF_ERROR(_child->prepare(state));
256
137k
    }
257
258
588k
    if (VExpr::contains_blockable_function(_conjuncts) ||
259
588k
        VExpr::contains_blockable_function(_projections)) {
260
0
        _blockable = true;
261
0
    }
262
263
588k
    return Status::OK();
264
588k
}
265
266
7.61k
Status OperatorXBase::terminate(RuntimeState* state) {
267
7.61k
    if (_child && !is_source()) {
268
2.18k
        RETURN_IF_ERROR(_child->terminate(state));
269
2.18k
    }
270
7.61k
    auto result = state->get_local_state_result(operator_id());
271
7.61k
    if (!result) {
272
0
        return result.error();
273
0
    }
274
7.61k
    return result.value()->terminate(state);
275
7.61k
}
276
277
6.64M
Status OperatorXBase::close(RuntimeState* state) {
278
6.64M
    if (_child && !is_source()) {
279
1.51M
        RETURN_IF_ERROR(_child->close(state));
280
1.51M
    }
281
6.64M
    auto result = state->get_local_state_result(operator_id());
282
6.64M
    if (!result) {
283
0
        return result.error();
284
0
    }
285
6.64M
    return result.value()->close(state);
286
6.64M
}
287
288
333k
void PipelineXLocalStateBase::clear_origin_block() {
289
333k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
290
333k
}
291
292
619k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
293
619k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
294
295
619k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
296
619k
    return Status::OK();
297
619k
}
298
299
0
bool PipelineXLocalStateBase::is_blockable() const {
300
0
    return std::any_of(_projections.begin(), _projections.end(),
301
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
302
0
}
303
304
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
305
333k
                                     Block* output_block) const {
306
333k
    auto* local_state = state->get_local_state(operator_id());
307
333k
    SCOPED_TIMER(local_state->exec_time_counter());
308
333k
    SCOPED_TIMER(local_state->_projection_timer);
309
333k
    const size_t rows = origin_block->rows();
310
333k
    if (rows == 0) {
311
217k
        return Status::OK();
312
217k
    }
313
116k
    Block input_block = *origin_block;
314
315
116k
    size_t bytes_usage = 0;
316
116k
    ColumnsWithTypeAndName new_columns;
317
116k
    for (const auto& projections : local_state->_intermediate_projections) {
318
957
        if (projections.empty()) {
319
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
320
0
                                         node_id());
321
0
        }
322
957
        new_columns.resize(projections.size());
323
6.50k
        for (int i = 0; i < projections.size(); i++) {
324
5.54k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
325
5.54k
            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.54k
        }
333
957
        Block tmp_block {new_columns};
334
957
        bytes_usage += tmp_block.allocated_bytes();
335
957
        input_block.swap(tmp_block);
336
957
    }
337
338
116k
    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
582k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
345
582k
        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
582k
        } else {
355
582k
            if (_keep_origin || !from->is_exclusive()) {
356
574k
                to->insert_range_from(*from, 0, rows);
357
574k
                bytes_usage += from->allocated_bytes();
358
574k
            } else {
359
8.76k
                to = from->assume_mutable();
360
8.76k
            }
361
582k
        }
362
582k
    };
363
364
116k
    MutableBlock mutable_block =
365
116k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
366
116k
    if (rows != 0) {
367
116k
        auto& mutable_columns = mutable_block.mutable_columns();
368
116k
        const size_t origin_columns_count = input_block.columns();
369
116k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
699k
        for (int i = 0; i < mutable_columns.size(); ++i) {
371
582k
            auto result_column_id = -1;
372
582k
            ColumnPtr column_ptr;
373
582k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
374
582k
            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
582k
            column_ptr = column_ptr->convert_to_full_column_if_const();
381
582k
            if (result_column_id >= origin_columns_count) {
382
582k
                bytes_usage += column_ptr->allocated_bytes();
383
582k
            }
384
582k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
385
582k
        }
386
116k
        DCHECK(mutable_block.rows() == rows);
387
116k
        output_block->set_columns(std::move(mutable_columns));
388
116k
    }
389
390
116k
    local_state->_estimate_memory_usage += bytes_usage;
391
392
116k
    return Status::OK();
393
116k
}
394
395
3.92M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
396
3.92M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
397
3.92M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
398
3.92M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
399
3.92M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
400
3.92M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
401
3.92M
            if (_debug_point_count++ % 2 == 0) {
402
3.92M
                return Status::OK();
403
3.92M
            }
404
3.92M
        }
405
3.92M
    });
406
407
3.92M
    Status status;
408
3.92M
    auto* local_state = state->get_local_state(operator_id());
409
3.92M
    Defer defer([&]() {
410
3.92M
        if (status.ok()) {
411
3.92M
            if (auto rows = block->rows()) {
412
709k
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
413
709k
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
414
709k
            }
415
3.92M
        }
416
3.92M
    });
417
3.92M
    if (_output_row_descriptor) {
418
333k
        local_state->clear_origin_block();
419
333k
        status = get_block(state, &local_state->_origin_block, eos);
420
333k
        if (UNLIKELY(!status.ok())) {
421
14
            return status;
422
14
        }
423
333k
        status = do_projections(state, &local_state->_origin_block, block);
424
333k
        return status;
425
333k
    }
426
3.58M
    status = get_block(state, block, eos);
427
3.58M
    RETURN_IF_ERROR(block->check_type_and_column());
428
3.58M
    return status;
429
3.58M
}
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.48k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
434
1.48k
        *eos = true;
435
1.48k
    }
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
639k
        _num_rows_returned += rows;
449
639k
    }
450
2.43M
}
451
452
29.4k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
453
29.4k
    auto result = state->get_sink_local_state_result();
454
29.4k
    if (!result) {
455
0
        return result.error();
456
0
    }
457
29.4k
    return result.value()->terminate(state);
458
29.4k
}
459
460
57.2k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
461
57.2k
    fmt::memory_buffer debug_string_buffer;
462
463
57.2k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
464
57.2k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
465
57.2k
    return fmt::to_string(debug_string_buffer);
466
57.2k
}
467
468
57.1k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
469
57.1k
    return state->get_sink_local_state()->debug_string(indentation_level);
470
57.1k
}
471
472
331k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
473
331k
    std::string op_name = "UNKNOWN_SINK";
474
331k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
475
476
332k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
477
332k
        op_name = it->second;
478
332k
    }
479
331k
    _name = op_name + "_OPERATOR";
480
331k
    return Status::OK();
481
331k
}
482
483
166k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
484
166k
    std::string op_name = print_plan_node_type(tnode.node_type);
485
166k
    _nereids_id = tnode.nereids_id;
486
166k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
487
166k
    _name = substr + "_SINK_OPERATOR";
488
166k
    return Status::OK();
489
166k
}
490
491
template <typename LocalStateType>
492
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
493
1.93M
                                                            LocalSinkStateInfo& info) {
494
1.93M
    auto local_state = LocalStateType::create_unique(this, state);
495
1.93M
    RETURN_IF_ERROR(local_state->init(state, info));
496
1.93M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
1.93M
    return Status::OK();
498
1.93M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
187k
                                                            LocalSinkStateInfo& info) {
494
187k
    auto local_state = LocalStateType::create_unique(this, state);
495
187k
    RETURN_IF_ERROR(local_state->init(state, info));
496
187k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
187k
    return Status::OK();
498
187k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
397k
                                                            LocalSinkStateInfo& info) {
494
397k
    auto local_state = LocalStateType::create_unique(this, state);
495
397k
    RETURN_IF_ERROR(local_state->init(state, info));
496
397k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
397k
    return Status::OK();
498
397k
}
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
342
                                                            LocalSinkStateInfo& info) {
494
342
    auto local_state = LocalStateType::create_unique(this, state);
495
342
    RETURN_IF_ERROR(local_state->init(state, info));
496
342
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
342
    return Status::OK();
498
342
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
66.2k
                                                            LocalSinkStateInfo& info) {
494
66.2k
    auto local_state = LocalStateType::create_unique(this, state);
495
66.2k
    RETURN_IF_ERROR(local_state->init(state, info));
496
66.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
66.2k
    return Status::OK();
498
66.2k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
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
8.74k
                                                            LocalSinkStateInfo& info) {
494
8.74k
    auto local_state = LocalStateType::create_unique(this, state);
495
8.74k
    RETURN_IF_ERROR(local_state->init(state, info));
496
8.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
8.74k
    return Status::OK();
498
8.74k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
10
                                                            LocalSinkStateInfo& info) {
494
10
    auto local_state = LocalStateType::create_unique(this, state);
495
10
    RETURN_IF_ERROR(local_state->init(state, info));
496
10
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
10
    return Status::OK();
498
10
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
197k
                                                            LocalSinkStateInfo& info) {
494
197k
    auto local_state = LocalStateType::create_unique(this, state);
495
197k
    RETURN_IF_ERROR(local_state->init(state, info));
496
197k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
197k
    return Status::OK();
498
197k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
18
                                                            LocalSinkStateInfo& info) {
494
18
    auto local_state = LocalStateType::create_unique(this, state);
495
18
    RETURN_IF_ERROR(local_state->init(state, info));
496
18
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
18
    return Status::OK();
498
18
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
310k
                                                            LocalSinkStateInfo& info) {
494
310k
    auto local_state = LocalStateType::create_unique(this, state);
495
310k
    RETURN_IF_ERROR(local_state->init(state, info));
496
310k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
310k
    return Status::OK();
498
310k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
113k
                                                            LocalSinkStateInfo& info) {
494
113k
    auto local_state = LocalStateType::create_unique(this, state);
495
113k
    RETURN_IF_ERROR(local_state->init(state, info));
496
113k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
113k
    return Status::OK();
498
113k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
15
                                                            LocalSinkStateInfo& info) {
494
15
    auto local_state = LocalStateType::create_unique(this, state);
495
15
    RETURN_IF_ERROR(local_state->init(state, info));
496
15
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
15
    return Status::OK();
498
15
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
625k
                                                            LocalSinkStateInfo& info) {
494
625k
    auto local_state = LocalStateType::create_unique(this, state);
495
625k
    RETURN_IF_ERROR(local_state->init(state, info));
496
625k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
625k
    return Status::OK();
498
625k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
5.57k
                                                            LocalSinkStateInfo& info) {
494
5.57k
    auto local_state = LocalStateType::create_unique(this, state);
495
5.57k
    RETURN_IF_ERROR(local_state->init(state, info));
496
5.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
5.57k
    return Status::OK();
498
5.57k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
7.27k
                                                            LocalSinkStateInfo& info) {
494
7.27k
    auto local_state = LocalStateType::create_unique(this, state);
495
7.27k
    RETURN_IF_ERROR(local_state->init(state, info));
496
7.27k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
7.27k
    return Status::OK();
498
7.27k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.68k
                                                            LocalSinkStateInfo& info) {
494
2.68k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.68k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.68k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.68k
    return Status::OK();
498
2.68k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
283
                                                            LocalSinkStateInfo& info) {
494
283
    auto local_state = LocalStateType::create_unique(this, state);
495
283
    RETURN_IF_ERROR(local_state->init(state, info));
496
283
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
283
    return Status::OK();
498
283
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
4.60k
                                                            LocalSinkStateInfo& info) {
494
4.60k
    auto local_state = LocalStateType::create_unique(this, state);
495
4.60k
    RETURN_IF_ERROR(local_state->init(state, info));
496
4.60k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
4.60k
    return Status::OK();
498
4.60k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.50k
                                                            LocalSinkStateInfo& info) {
494
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.50k
    return Status::OK();
498
2.50k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.39k
                                                            LocalSinkStateInfo& info) {
494
2.39k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.39k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.39k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.39k
    return Status::OK();
498
2.39k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.45k
                                                            LocalSinkStateInfo& info) {
494
2.45k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.45k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.45k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.45k
    return Status::OK();
498
2.45k
}
_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
363
                                                            LocalSinkStateInfo& info) {
494
363
    auto local_state = LocalStateType::create_unique(this, state);
495
363
    RETURN_IF_ERROR(local_state->init(state, info));
496
363
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
363
    return Status::OK();
498
363
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
104
                                                            LocalSinkStateInfo& info) {
494
104
    auto local_state = LocalStateType::create_unique(this, state);
495
104
    RETURN_IF_ERROR(local_state->init(state, info));
496
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
104
    return Status::OK();
498
104
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
150
                                                            LocalSinkStateInfo& info) {
494
150
    auto local_state = LocalStateType::create_unique(this, state);
495
150
    RETURN_IF_ERROR(local_state->init(state, info));
496
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
150
    return Status::OK();
498
150
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
150
                                                            LocalSinkStateInfo& info) {
494
150
    auto local_state = LocalStateType::create_unique(this, state);
495
150
    RETURN_IF_ERROR(local_state->init(state, info));
496
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
150
    return Status::OK();
498
150
}
499
500
template <typename LocalStateType>
501
1.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
172k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
172k
    } else {
509
172k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
172k
        ss->id = operator_id();
511
172k
        for (auto& dest : dests_id()) {
512
172k
            ss->related_op_ids.insert(dest);
513
172k
        }
514
172k
        return ss;
515
172k
    }
516
172k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
398k
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
398k
    } else {
509
398k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
398k
        ss->id = operator_id();
511
398k
        for (auto& dest : dests_id()) {
512
398k
            ss->related_op_ids.insert(dest);
513
398k
        }
514
398k
        return ss;
515
398k
    }
516
398k
}
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
343
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
343
    } else {
509
343
        auto ss = LocalStateType::SharedStateType::create_shared();
510
343
        ss->id = operator_id();
511
343
        for (auto& dest : dests_id()) {
512
342
            ss->related_op_ids.insert(dest);
513
342
        }
514
343
        return ss;
515
343
    }
516
343
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
65.3k
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.3k
    } else {
509
65.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
65.3k
        ss->id = operator_id();
511
65.3k
        for (auto& dest : dests_id()) {
512
65.2k
            ss->related_op_ids.insert(dest);
513
65.2k
        }
514
65.3k
        return ss;
515
65.3k
    }
516
65.3k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
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
8.75k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
8.75k
    } else {
509
8.75k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
8.75k
        ss->id = operator_id();
511
8.75k
        for (auto& dest : dests_id()) {
512
8.75k
            ss->related_op_ids.insert(dest);
513
8.75k
        }
514
8.75k
        return ss;
515
8.75k
    }
516
8.75k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
13
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
13
    } else {
509
13
        auto ss = LocalStateType::SharedStateType::create_shared();
510
13
        ss->id = operator_id();
511
14
        for (auto& dest : dests_id()) {
512
14
            ss->related_op_ids.insert(dest);
513
14
        }
514
13
        return ss;
515
13
    }
516
13
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
198k
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
198k
    } else {
509
198k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
198k
        ss->id = operator_id();
511
198k
        for (auto& dest : dests_id()) {
512
197k
            ss->related_op_ids.insert(dest);
513
197k
        }
514
198k
        return ss;
515
198k
    }
516
198k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
20
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
20
    } else {
509
20
        auto ss = LocalStateType::SharedStateType::create_shared();
510
20
        ss->id = operator_id();
511
20
        for (auto& dest : dests_id()) {
512
20
            ss->related_op_ids.insert(dest);
513
20
        }
514
20
        return ss;
515
20
    }
516
20
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
113k
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
113k
    } else {
509
113k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
113k
        ss->id = operator_id();
511
113k
        for (auto& dest : dests_id()) {
512
113k
            ss->related_op_ids.insert(dest);
513
113k
        }
514
113k
        return ss;
515
113k
    }
516
113k
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
14
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
14
    } else {
509
14
        auto ss = LocalStateType::SharedStateType::create_shared();
510
14
        ss->id = operator_id();
511
14
        for (auto& dest : dests_id()) {
512
14
            ss->related_op_ids.insert(dest);
513
14
        }
514
14
        return ss;
515
14
    }
516
14
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
626k
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
626k
    } else {
509
626k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
626k
        ss->id = operator_id();
511
626k
        for (auto& dest : dests_id()) {
512
624k
            ss->related_op_ids.insert(dest);
513
624k
        }
514
626k
        return ss;
515
626k
    }
516
626k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
5.58k
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.58k
    } else {
509
5.58k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
5.58k
        ss->id = operator_id();
511
5.58k
        for (auto& dest : dests_id()) {
512
5.57k
            ss->related_op_ids.insert(dest);
513
5.57k
        }
514
5.58k
        return ss;
515
5.58k
    }
516
5.58k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
385
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
385
    } else {
509
385
        auto ss = LocalStateType::SharedStateType::create_shared();
510
385
        ss->id = operator_id();
511
385
        for (auto& dest : dests_id()) {
512
382
            ss->related_op_ids.insert(dest);
513
382
        }
514
385
        return ss;
515
385
    }
516
385
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
501
2.41k
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.41k
    } else {
509
2.41k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.41k
        ss->id = operator_id();
511
2.41k
        for (auto& dest : dests_id()) {
512
2.40k
            ss->related_op_ids.insert(dest);
513
2.40k
        }
514
2.41k
        return ss;
515
2.41k
    }
516
2.41k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
501
2.46k
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.46k
    } else {
509
2.46k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.46k
        ss->id = operator_id();
511
2.46k
        for (auto& dest : dests_id()) {
512
2.46k
            ss->related_op_ids.insert(dest);
513
2.46k
        }
514
2.46k
        return ss;
515
2.46k
    }
516
2.46k
}
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.58M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.58M
    auto local_state = LocalStateType::create_unique(state, this);
521
2.58M
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.58M
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.58M
    return Status::OK();
524
2.58M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
138k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
138k
    auto local_state = LocalStateType::create_unique(state, this);
521
138k
    RETURN_IF_ERROR(local_state->init(state, info));
522
138k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
138k
    return Status::OK();
524
138k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
323k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
323k
    auto local_state = LocalStateType::create_unique(state, this);
521
323k
    RETURN_IF_ERROR(local_state->init(state, info));
522
323k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
323k
    return Status::OK();
524
323k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
72
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
72
    auto local_state = LocalStateType::create_unique(state, this);
521
72
    RETURN_IF_ERROR(local_state->init(state, info));
522
72
    state->emplace_local_state(operator_id(), std::move(local_state));
523
72
    return Status::OK();
524
72
}
_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.65k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.65k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.65k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.65k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.65k
    return Status::OK();
524
2.65k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
8.71k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
8.71k
    auto local_state = LocalStateType::create_unique(state, this);
521
8.71k
    RETURN_IF_ERROR(local_state->init(state, info));
522
8.71k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
8.71k
    return Status::OK();
524
8.71k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
10.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
521
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
522
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
10.8k
    return Status::OK();
524
10.8k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
15
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
15
    auto local_state = LocalStateType::create_unique(state, this);
521
15
    RETURN_IF_ERROR(local_state->init(state, info));
522
15
    state->emplace_local_state(operator_id(), std::move(local_state));
523
15
    return Status::OK();
524
15
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
186k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
186k
    auto local_state = LocalStateType::create_unique(state, this);
521
186k
    RETURN_IF_ERROR(local_state->init(state, info));
522
186k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
186k
    return Status::OK();
524
186k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
113k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
113k
    auto local_state = LocalStateType::create_unique(state, this);
521
113k
    RETURN_IF_ERROR(local_state->init(state, info));
522
113k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
113k
    return Status::OK();
524
113k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
9
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
9
    auto local_state = LocalStateType::create_unique(state, this);
521
9
    RETURN_IF_ERROR(local_state->init(state, info));
522
9
    state->emplace_local_state(operator_id(), std::move(local_state));
523
9
    return Status::OK();
524
9
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
3.85k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
3.85k
    auto local_state = LocalStateType::create_unique(state, this);
521
3.85k
    RETURN_IF_ERROR(local_state->init(state, info));
522
3.85k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
3.85k
    return Status::OK();
524
3.85k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
466k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
466k
    auto local_state = LocalStateType::create_unique(state, this);
521
466k
    RETURN_IF_ERROR(local_state->init(state, info));
522
466k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
466k
    return Status::OK();
524
466k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.43k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.43k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.43k
    return Status::OK();
524
1.43k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
5.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
5.55k
    auto local_state = LocalStateType::create_unique(state, this);
521
5.55k
    RETURN_IF_ERROR(local_state->init(state, info));
522
5.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
5.55k
    return Status::OK();
524
5.55k
}
_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.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.56k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.56k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.56k
    return Status::OK();
524
1.56k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
39.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
39.5k
    auto local_state = LocalStateType::create_unique(state, this);
521
39.5k
    RETURN_IF_ERROR(local_state->init(state, info));
522
39.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
39.5k
    return Status::OK();
524
39.5k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
6.92k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
6.92k
    auto local_state = LocalStateType::create_unique(state, this);
521
6.92k
    RETURN_IF_ERROR(local_state->init(state, info));
522
6.92k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
6.92k
    return Status::OK();
524
6.92k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
277
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
277
    auto local_state = LocalStateType::create_unique(state, this);
521
277
    RETURN_IF_ERROR(local_state->init(state, info));
522
277
    state->emplace_local_state(operator_id(), std::move(local_state));
523
277
    return Status::OK();
524
277
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.37k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.37k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.37k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.37k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.37k
    return Status::OK();
524
2.37k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.37k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.37k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.37k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.37k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.37k
    return Status::OK();
524
2.37k
}
_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.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.53k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.53k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.53k
    return Status::OK();
524
1.53k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
5.04k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
5.04k
    auto local_state = LocalStateType::create_unique(state, this);
521
5.04k
    RETURN_IF_ERROR(local_state->init(state, info));
522
5.04k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
5.04k
    return Status::OK();
524
5.04k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
687k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
687k
    auto local_state = LocalStateType::create_unique(state, this);
521
687k
    RETURN_IF_ERROR(local_state->init(state, info));
522
687k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
687k
    return Status::OK();
524
687k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
362
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
362
    auto local_state = LocalStateType::create_unique(state, this);
521
362
    RETURN_IF_ERROR(local_state->init(state, info));
522
362
    state->emplace_local_state(operator_id(), std::move(local_state));
523
362
    return Status::OK();
524
362
}
_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.84k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.84k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.84k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.84k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.84k
    return Status::OK();
524
1.84k
}
_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
698
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
698
    auto local_state = LocalStateType::create_unique(state, this);
521
698
    RETURN_IF_ERROR(local_state->init(state, info));
522
698
    state->emplace_local_state(operator_id(), std::move(local_state));
523
698
    return Status::OK();
524
698
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
8.04k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
8.04k
    auto local_state = LocalStateType::create_unique(state, this);
521
8.04k
    RETURN_IF_ERROR(local_state->init(state, info));
522
8.04k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
8.04k
    return Status::OK();
524
8.04k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
566k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
566k
    auto local_state = LocalStateType::create_unique(state, this);
521
566k
    RETURN_IF_ERROR(local_state->init(state, info));
522
566k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
566k
    return Status::OK();
524
566k
}
525
526
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
527
                                                         RuntimeState* state)
528
1.93M
        : _parent(parent), _state(state) {}
529
530
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
531
2.58M
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
532
533
template <typename SharedStateArg>
534
2.59M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
2.59M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
2.59M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
2.59M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
2.59M
    _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.59M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
2.59M
    _operator_profile->add_child(_common_profile.get(), true);
543
2.59M
    _operator_profile->add_child(_custom_profile.get(), true);
544
2.59M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
2.59M
    if constexpr (!is_fake_shared) {
546
1.20M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
699k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
699k
                                    .first.get()
549
699k
                                    ->template cast<SharedStateArg>();
550
551
699k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
699k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
699k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
699k
        } else if (info.shared_state) {
555
459k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
0
                DCHECK(false);
557
0
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
459k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
459k
            _dependency = _shared_state->create_source_dependency(
562
459k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
459k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
459k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
459k
        } else {
566
45.8k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
2.52k
                DCHECK(false);
568
2.52k
            }
569
45.8k
        }
570
1.20M
    }
571
572
2.59M
    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.59M
    _rows_returned_counter =
577
2.59M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
2.59M
    _blocks_returned_counter =
579
2.59M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
2.59M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
2.59M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
2.59M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
2.59M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
2.59M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
2.59M
    _memory_used_counter =
586
2.59M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
2.59M
    _common_profile->add_info_string("IsColocate",
588
2.59M
                                     std::to_string(_parent->is_colocated_operator()));
589
2.59M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
2.59M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
2.59M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
2.59M
    return Status::OK();
593
2.59M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
139k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
139k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
139k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
139k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
139k
    _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
139k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
139k
    _operator_profile->add_child(_common_profile.get(), true);
543
139k
    _operator_profile->add_child(_custom_profile.get(), true);
544
139k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
139k
    if constexpr (!is_fake_shared) {
546
139k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
14.5k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
14.5k
                                    .first.get()
549
14.5k
                                    ->template cast<SharedStateArg>();
550
551
14.5k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
14.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
14.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
124k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
123k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
123k
            _dependency = _shared_state->create_source_dependency(
562
123k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
123k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
123k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
123k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
1.69k
        }
570
139k
    }
571
572
139k
    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
139k
    _rows_returned_counter =
577
139k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
139k
    _blocks_returned_counter =
579
139k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
139k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
139k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
139k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
139k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
139k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
139k
    _memory_used_counter =
586
139k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
139k
    _common_profile->add_info_string("IsColocate",
588
139k
                                     std::to_string(_parent->is_colocated_operator()));
589
139k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
139k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
139k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
139k
    return Status::OK();
593
139k
}
_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
197k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
197k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
197k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
197k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
197k
    _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
197k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
197k
    _operator_profile->add_child(_common_profile.get(), true);
543
197k
    _operator_profile->add_child(_custom_profile.get(), true);
544
197k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
197k
    if constexpr (!is_fake_shared) {
546
197k
        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
197k
        } 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
193k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
193k
            _dependency = _shared_state->create_source_dependency(
562
193k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
193k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
193k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
193k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
4.12k
        }
570
197k
    }
571
572
197k
    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
197k
    _rows_returned_counter =
577
197k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
197k
    _blocks_returned_counter =
579
197k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
197k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
197k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
197k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
197k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
197k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
197k
    _memory_used_counter =
586
197k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
197k
    _common_profile->add_info_string("IsColocate",
588
197k
                                     std::to_string(_parent->is_colocated_operator()));
589
197k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
197k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
197k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
197k
    return Status::OK();
593
197k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
15
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
15
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
15
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
15
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
15
    _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
15
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
15
    _operator_profile->add_child(_common_profile.get(), true);
543
15
    _operator_profile->add_child(_custom_profile.get(), true);
544
15
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
15
    if constexpr (!is_fake_shared) {
546
15
        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
15
        } 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
15
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
15
            _dependency = _shared_state->create_source_dependency(
562
15
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
15
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
15
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
15
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
15
    }
571
572
15
    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
15
    _rows_returned_counter =
577
15
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
15
    _blocks_returned_counter =
579
15
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
15
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
15
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
15
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
15
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
15
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
15
    _memory_used_counter =
586
15
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
15
    _common_profile->add_info_string("IsColocate",
588
15
                                     std::to_string(_parent->is_colocated_operator()));
589
15
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
15
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
15
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
15
    return Status::OK();
593
15
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
5.55k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
5.55k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
5.55k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
5.55k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
5.55k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
5.55k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
5.55k
    _operator_profile->add_child(_common_profile.get(), true);
543
5.55k
    _operator_profile->add_child(_custom_profile.get(), true);
544
5.55k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
5.55k
    if constexpr (!is_fake_shared) {
546
5.55k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
5.55k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
5.53k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
5.53k
            _dependency = _shared_state->create_source_dependency(
562
5.53k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
5.53k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
5.53k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
5.53k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
23
        }
570
5.55k
    }
571
572
5.55k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
5.55k
    _rows_returned_counter =
577
5.55k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
5.55k
    _blocks_returned_counter =
579
5.55k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
5.55k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
5.55k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
5.55k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
5.55k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
5.55k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
5.55k
    _memory_used_counter =
586
5.55k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
5.55k
    _common_profile->add_info_string("IsColocate",
588
5.55k
                                     std::to_string(_parent->is_colocated_operator()));
589
5.55k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
5.55k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
5.55k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
5.55k
    return Status::OK();
593
5.55k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
8.73k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
8.73k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
8.73k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
8.73k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
8.73k
    _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
8.73k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
8.73k
    _operator_profile->add_child(_common_profile.get(), true);
543
8.73k
    _operator_profile->add_child(_custom_profile.get(), true);
544
8.73k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
8.73k
    if constexpr (!is_fake_shared) {
546
8.73k
        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
8.73k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
8.68k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
8.68k
            _dependency = _shared_state->create_source_dependency(
562
8.68k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
8.68k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
8.68k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
8.68k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
41
        }
570
8.73k
    }
571
572
8.73k
    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
8.73k
    _rows_returned_counter =
577
8.73k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
8.73k
    _blocks_returned_counter =
579
8.73k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
8.73k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
8.73k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
8.73k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
8.73k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
8.73k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
8.73k
    _memory_used_counter =
586
8.73k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
8.73k
    _common_profile->add_info_string("IsColocate",
588
8.73k
                                     std::to_string(_parent->is_colocated_operator()));
589
8.73k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
8.73k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
8.73k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
8.73k
    return Status::OK();
593
8.73k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
113k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
113k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
113k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
113k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
113k
    _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
113k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
113k
    _operator_profile->add_child(_common_profile.get(), true);
543
113k
    _operator_profile->add_child(_custom_profile.get(), true);
544
113k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
113k
    if constexpr (!is_fake_shared) {
546
113k
        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
113k
        } 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
112k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
112k
            _dependency = _shared_state->create_source_dependency(
562
112k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
112k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
112k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
112k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
997
        }
570
113k
    }
571
572
113k
    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
113k
    _rows_returned_counter =
577
113k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
113k
    _blocks_returned_counter =
579
113k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
113k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
113k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
113k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
113k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
113k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
113k
    _memory_used_counter =
586
113k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
113k
    _common_profile->add_info_string("IsColocate",
588
113k
                                     std::to_string(_parent->is_colocated_operator()));
589
113k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
113k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
113k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
113k
    return Status::OK();
593
113k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
9
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
9
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
9
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
9
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
9
    _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
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
9
    _operator_profile->add_child(_common_profile.get(), true);
543
9
    _operator_profile->add_child(_custom_profile.get(), true);
544
9
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
9
    if constexpr (!is_fake_shared) {
546
9
        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
        } 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
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
9
            _dependency = _shared_state->create_source_dependency(
562
9
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
9
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
9
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
9
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
9
    }
571
572
9
    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
    _rows_returned_counter =
577
9
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
9
    _blocks_returned_counter =
579
9
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
9
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
9
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
9
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
9
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
9
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
9
    _memory_used_counter =
586
9
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
9
    _common_profile->add_info_string("IsColocate",
588
9
                                     std::to_string(_parent->is_colocated_operator()));
589
9
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
9
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
9
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
9
    return Status::OK();
593
9
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
1.38M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
1.38M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
1.38M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
1.38M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
1.38M
    _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.38M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
1.38M
    _operator_profile->add_child(_common_profile.get(), true);
543
1.38M
    _operator_profile->add_child(_custom_profile.get(), true);
544
1.38M
    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.38M
    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.38M
    _rows_returned_counter =
577
1.38M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
1.38M
    _blocks_returned_counter =
579
1.38M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
1.38M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
1.38M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
1.38M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
1.38M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
1.38M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
1.38M
    _memory_used_counter =
586
1.38M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
1.38M
    _common_profile->add_info_string("IsColocate",
588
1.38M
                                     std::to_string(_parent->is_colocated_operator()));
589
1.38M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
1.38M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
1.38M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
1.38M
    return Status::OK();
593
1.38M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
39.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
39.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
39.5k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
39.5k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
39.5k
    _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.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
39.5k
    _operator_profile->add_child(_common_profile.get(), true);
543
39.5k
    _operator_profile->add_child(_custom_profile.get(), true);
544
39.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
39.5k
    if constexpr (!is_fake_shared) {
546
39.5k
        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.5k
        } 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.39k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
3.39k
            _dependency = _shared_state->create_source_dependency(
562
3.39k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
3.39k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
3.39k
                    _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.5k
    }
571
572
39.5k
    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.5k
    _rows_returned_counter =
577
39.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
39.5k
    _blocks_returned_counter =
579
39.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
39.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
39.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
39.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
39.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
39.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
39.5k
    _memory_used_counter =
586
39.5k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
39.5k
    _common_profile->add_info_string("IsColocate",
588
39.5k
                                     std::to_string(_parent->is_colocated_operator()));
589
39.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
39.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
39.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
39.5k
    return Status::OK();
593
39.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
365
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
365
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
365
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
365
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
365
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
365
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
365
    _operator_profile->add_child(_common_profile.get(), true);
543
365
    _operator_profile->add_child(_custom_profile.get(), true);
544
365
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
365
    if constexpr (!is_fake_shared) {
546
365
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
365
        } 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
365
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
365
            _dependency = _shared_state->create_source_dependency(
562
365
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
365
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
365
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
365
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
365
    }
571
572
365
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
365
    _rows_returned_counter =
577
365
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
365
    _blocks_returned_counter =
579
365
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
365
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
365
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
365
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
365
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
365
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
365
    _memory_used_counter =
586
365
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
365
    _common_profile->add_info_string("IsColocate",
588
365
                                     std::to_string(_parent->is_colocated_operator()));
589
365
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
365
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
365
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
365
    return Status::OK();
593
365
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
6.93k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
6.93k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
6.93k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
6.93k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
6.93k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
6.93k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
6.93k
    _operator_profile->add_child(_common_profile.get(), true);
543
6.93k
    _operator_profile->add_child(_custom_profile.get(), true);
544
6.93k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
6.93k
    if constexpr (!is_fake_shared) {
546
6.93k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
6.93k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
6.91k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
6.91k
            _dependency = _shared_state->create_source_dependency(
562
6.91k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
6.91k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
6.91k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
6.91k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
20
        }
570
6.93k
    }
571
572
6.93k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
6.93k
    _rows_returned_counter =
577
6.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
6.93k
    _blocks_returned_counter =
579
6.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
6.93k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
6.93k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
6.93k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
6.93k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
6.93k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
6.93k
    _memory_used_counter =
586
6.93k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
6.93k
    _common_profile->add_info_string("IsColocate",
588
6.93k
                                     std::to_string(_parent->is_colocated_operator()));
589
6.93k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
6.93k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
6.93k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
6.93k
    return Status::OK();
593
6.93k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
381
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
381
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
381
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
381
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
381
    _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
381
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
381
    _operator_profile->add_child(_common_profile.get(), true);
543
381
    _operator_profile->add_child(_custom_profile.get(), true);
544
381
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
381
    if constexpr (!is_fake_shared) {
546
381
        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
381
        } 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
376
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
376
            _dependency = _shared_state->create_source_dependency(
562
376
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
376
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
376
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
376
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
5
        }
570
381
    }
571
572
381
    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
381
    _rows_returned_counter =
577
381
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
381
    _blocks_returned_counter =
579
381
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
381
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
381
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
381
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
381
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
381
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
381
    _memory_used_counter =
586
381
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
381
    _common_profile->add_info_string("IsColocate",
588
381
                                     std::to_string(_parent->is_colocated_operator()));
589
381
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
381
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
381
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
381
    return Status::OK();
593
381
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
4.84k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
4.84k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
4.84k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
4.84k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
4.84k
    _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.84k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
4.84k
    _operator_profile->add_child(_common_profile.get(), true);
543
4.84k
    _operator_profile->add_child(_custom_profile.get(), true);
544
4.84k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
4.84k
    if constexpr (!is_fake_shared) {
546
4.84k
        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.84k
        } 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.54k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
4.54k
            _dependency = _shared_state->create_source_dependency(
562
4.54k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
4.54k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
4.54k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
4.54k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
302
        }
570
4.84k
    }
571
572
4.84k
    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.84k
    _rows_returned_counter =
577
4.84k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
4.84k
    _blocks_returned_counter =
579
4.84k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
4.84k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
4.84k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
4.84k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
4.84k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
4.84k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
4.84k
    _memory_used_counter =
586
4.84k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
4.84k
    _common_profile->add_info_string("IsColocate",
588
4.84k
                                     std::to_string(_parent->is_colocated_operator()));
589
4.84k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
4.84k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
4.84k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
4.84k
    return Status::OK();
593
4.84k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
687k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
687k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
687k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
687k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
687k
    _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
687k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
687k
    _operator_profile->add_child(_common_profile.get(), true);
543
687k
    _operator_profile->add_child(_custom_profile.get(), true);
544
687k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
687k
    if constexpr (!is_fake_shared) {
546
687k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
685k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
685k
                                    .first.get()
549
685k
                                    ->template cast<SharedStateArg>();
550
551
685k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
685k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
685k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
685k
        } 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
2.52k
        } else {
566
2.52k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
2.52k
                DCHECK(false);
568
2.52k
            }
569
2.52k
        }
570
687k
    }
571
572
687k
    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
687k
    _rows_returned_counter =
577
687k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
687k
    _blocks_returned_counter =
579
687k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
687k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
687k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
687k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
687k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
687k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
687k
    _memory_used_counter =
586
687k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
687k
    _common_profile->add_info_string("IsColocate",
588
687k
                                     std::to_string(_parent->is_colocated_operator()));
589
687k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
687k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
687k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
687k
    return Status::OK();
593
687k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
150
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
150
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
150
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
150
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
150
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
150
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
150
    _operator_profile->add_child(_common_profile.get(), true);
543
150
    _operator_profile->add_child(_custom_profile.get(), true);
544
150
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
150
    if constexpr (!is_fake_shared) {
546
150
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
150
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
150
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
150
            _dependency = _shared_state->create_source_dependency(
562
150
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
150
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
150
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
150
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
150
    }
571
572
150
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
150
    _rows_returned_counter =
577
150
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
150
    _blocks_returned_counter =
579
150
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
150
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
150
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
150
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
150
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
150
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
150
    _memory_used_counter =
586
150
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
150
    _common_profile->add_info_string("IsColocate",
588
150
                                     std::to_string(_parent->is_colocated_operator()));
589
150
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
150
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
150
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
150
    return Status::OK();
593
150
}
594
595
template <typename SharedStateArg>
596
2.60M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
2.60M
    _conjuncts.resize(_parent->_conjuncts.size());
598
2.60M
    _projections.resize(_parent->_projections.size());
599
2.93M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
328k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
328k
    }
602
5.17M
    for (size_t i = 0; i < _projections.size(); i++) {
603
2.56M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
2.56M
    }
605
2.60M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
2.60M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
6.39k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
40.5k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
34.1k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
34.1k
                    state, _intermediate_projections[i][j]));
611
34.1k
        }
612
6.39k
    }
613
2.60M
    return Status::OK();
614
2.60M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
139k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
139k
    _conjuncts.resize(_parent->_conjuncts.size());
598
139k
    _projections.resize(_parent->_projections.size());
599
140k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.16k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.16k
    }
602
726k
    for (size_t i = 0; i < _projections.size(); i++) {
603
586k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
586k
    }
605
139k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
140k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
444
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
3.79k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
3.35k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
3.35k
                    state, _intermediate_projections[i][j]));
611
3.35k
        }
612
444
    }
613
139k
    return Status::OK();
614
139k
}
_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
198k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
198k
    _conjuncts.resize(_parent->_conjuncts.size());
598
198k
    _projections.resize(_parent->_projections.size());
599
198k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
217k
    for (size_t i = 0; i < _projections.size(); i++) {
603
19.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
19.0k
    }
605
198k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
198k
    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
198k
    return Status::OK();
614
198k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
15
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
15
    _conjuncts.resize(_parent->_conjuncts.size());
598
15
    _projections.resize(_parent->_projections.size());
599
15
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
15
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
15
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
15
    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
15
    return Status::OK();
614
15
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
5.57k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
5.57k
    _conjuncts.resize(_parent->_conjuncts.size());
598
5.57k
    _projections.resize(_parent->_projections.size());
599
5.64k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
71
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
71
    }
602
24.3k
    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
5.57k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
5.58k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
13
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
114
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
101
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
101
                    state, _intermediate_projections[i][j]));
611
101
        }
612
13
    }
613
5.57k
    return Status::OK();
614
5.57k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
8.76k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
8.76k
    _conjuncts.resize(_parent->_conjuncts.size());
598
8.76k
    _projections.resize(_parent->_projections.size());
599
9.53k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
771
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
771
    }
602
23.5k
    for (size_t i = 0; i < _projections.size(); i++) {
603
14.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
14.7k
    }
605
8.76k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
8.92k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
167
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.26k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
1.09k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
1.09k
                    state, _intermediate_projections[i][j]));
611
1.09k
        }
612
167
    }
613
8.76k
    return Status::OK();
614
8.76k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
113k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
113k
    _conjuncts.resize(_parent->_conjuncts.size());
598
113k
    _projections.resize(_parent->_projections.size());
599
115k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.55k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.55k
    }
602
420k
    for (size_t i = 0; i < _projections.size(); i++) {
603
306k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
306k
    }
605
113k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
113k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
138
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.07k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
938
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
938
                    state, _intermediate_projections[i][j]));
611
938
        }
612
138
    }
613
113k
    return Status::OK();
614
113k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
13
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
13
    _conjuncts.resize(_parent->_conjuncts.size());
598
13
    _projections.resize(_parent->_projections.size());
599
13
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
13
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
13
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
13
    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
13
    return Status::OK();
614
13
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
1.39M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
1.39M
    _conjuncts.resize(_parent->_conjuncts.size());
598
1.39M
    _projections.resize(_parent->_projections.size());
599
1.71M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
324k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
324k
    }
602
2.92M
    for (size_t i = 0; i < _projections.size(); i++) {
603
1.53M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
1.53M
    }
605
1.39M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
1.39M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
5.63k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
34.2k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
28.6k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
28.6k
                    state, _intermediate_projections[i][j]));
611
28.6k
        }
612
5.63k
    }
613
1.39M
    return Status::OK();
614
1.39M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
39.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
39.6k
    _conjuncts.resize(_parent->_conjuncts.size());
598
39.6k
    _projections.resize(_parent->_projections.size());
599
39.6k
    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
92.8k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
92.8k
    }
605
39.6k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
39.6k
    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.6k
    return Status::OK();
614
39.6k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
369
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
369
    _conjuncts.resize(_parent->_conjuncts.size());
598
369
    _projections.resize(_parent->_projections.size());
599
369
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
369
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
369
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
369
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
369
    return Status::OK();
614
369
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
6.92k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
6.92k
    _conjuncts.resize(_parent->_conjuncts.size());
598
6.92k
    _projections.resize(_parent->_projections.size());
599
7.44k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
520
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
520
    }
602
6.92k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
6.92k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
6.92k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
6.92k
    return Status::OK();
614
6.92k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
385
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
385
    _conjuncts.resize(_parent->_conjuncts.size());
598
385
    _projections.resize(_parent->_projections.size());
599
385
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
385
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
385
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
385
    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
385
    return Status::OK();
614
385
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
4.90k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
4.90k
    _conjuncts.resize(_parent->_conjuncts.size());
598
4.90k
    _projections.resize(_parent->_projections.size());
599
4.90k
    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.90k
    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.90k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
4.90k
    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.90k
    return Status::OK();
614
4.90k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
693k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
693k
    _conjuncts.resize(_parent->_conjuncts.size());
598
693k
    _projections.resize(_parent->_projections.size());
599
693k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
693k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
693k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
693k
    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
693k
    return Status::OK();
614
693k
}
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
7.61k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
7.61k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
7.61k
    _terminated = true;
622
7.61k
    return Status::OK();
623
7.61k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
1.47k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
1.47k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
1.47k
    _terminated = true;
622
1.47k
    return Status::OK();
623
1.47k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
96
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
96
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
96
    _terminated = true;
622
96
    return Status::OK();
623
96
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
221
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
221
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
221
    _terminated = true;
622
221
    return Status::OK();
623
221
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
743
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
743
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
743
    _terminated = true;
622
743
    return Status::OK();
623
743
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
4.37k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
4.37k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
4.37k
    _terminated = true;
622
4.37k
    return Status::OK();
623
4.37k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
6
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
6
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
6
    _terminated = true;
622
6
    return Status::OK();
623
6
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
1
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
1
    _terminated = true;
622
1
    return Status::OK();
623
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
166
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
166
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
166
    _terminated = true;
622
166
    return Status::OK();
623
166
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
514
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
514
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
514
    _terminated = true;
622
514
    return Status::OK();
623
514
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
17
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
17
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
17
    _terminated = true;
622
17
    return Status::OK();
623
17
}
624
625
template <typename SharedStateArg>
626
2.83M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
2.83M
    if (_closed) {
628
226k
        return Status::OK();
629
226k
    }
630
2.60M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
1.21M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
1.21M
    }
633
2.60M
    _closed = true;
634
2.60M
    return Status::OK();
635
2.83M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
139k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
139k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
139k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
139k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
139k
    }
633
139k
    _closed = true;
634
139k
    return Status::OK();
635
139k
}
_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
394k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
394k
    if (_closed) {
628
197k
        return Status::OK();
629
197k
    }
630
197k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
197k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
197k
    }
633
197k
    _closed = true;
634
197k
    return Status::OK();
635
394k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
15
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
15
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
15
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
15
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
15
    }
633
15
    _closed = true;
634
15
    return Status::OK();
635
15
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
5.57k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
5.57k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
5.57k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
5.57k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
5.57k
    }
633
5.57k
    _closed = true;
634
5.57k
    return Status::OK();
635
5.57k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
17.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
17.5k
    if (_closed) {
628
8.83k
        return Status::OK();
629
8.83k
    }
630
8.73k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
8.73k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
8.73k
    }
633
8.73k
    _closed = true;
634
8.73k
    return Status::OK();
635
17.5k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
113k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
113k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
113k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
113k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
113k
    }
633
113k
    _closed = true;
634
113k
    return Status::OK();
635
113k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
8
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
8
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
8
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
8
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
8
    }
633
8
    _closed = true;
634
8
    return Status::OK();
635
8
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
1.40M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
1.40M
    if (_closed) {
628
14.0k
        return Status::OK();
629
14.0k
    }
630
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
    }
633
1.39M
    _closed = true;
634
1.39M
    return Status::OK();
635
1.40M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
39.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
39.6k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
39.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
39.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
39.6k
    }
633
39.6k
    _closed = true;
634
39.6k
    return Status::OK();
635
39.6k
}
_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
6.90k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
6.90k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
6.90k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
6.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
6.90k
    }
633
6.90k
    _closed = true;
634
6.90k
    return Status::OK();
635
6.90k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
564
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
564
    if (_closed) {
628
282
        return Status::OK();
629
282
    }
630
282
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
282
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
282
    }
633
282
    _closed = true;
634
282
    return Status::OK();
635
564
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
9.84k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
9.84k
    if (_closed) {
628
4.94k
        return Status::OK();
629
4.94k
    }
630
4.90k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
4.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
4.90k
    }
633
4.90k
    _closed = true;
634
4.90k
    return Status::OK();
635
9.84k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
695k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
695k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
695k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
695k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
695k
    }
633
695k
    _closed = true;
634
695k
    return Status::OK();
635
695k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
351
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
351
    if (_closed) {
628
202
        return Status::OK();
629
202
    }
630
149
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
149
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
149
    }
633
149
    _closed = true;
634
149
    return Status::OK();
635
351
}
636
637
template <typename SharedState>
638
1.94M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
1.94M
    _operator_profile =
641
1.94M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
1.94M
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
1.94M
    _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.94M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
1.94M
    _operator_profile->add_child(_common_profile, true);
650
1.94M
    _operator_profile->add_child(_custom_profile, true);
651
652
1.94M
    _operator_profile->set_metadata(_parent->node_id());
653
1.94M
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
1.94M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
1.94M
    if constexpr (!is_fake_shared) {
656
1.31M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
1.31M
            info.shared_state_map.end()) {
658
326k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
310k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
310k
            }
661
326k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
326k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
326k
                                                  ? 0
664
326k
                                                  : info.task_idx]
665
326k
                                  .get();
666
326k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
986k
        } else {
668
986k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
385
                DCHECK(false);
670
385
            }
671
986k
            _shared_state = info.shared_state->template cast<SharedState>();
672
986k
            _dependency = _shared_state->create_sink_dependency(
673
986k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
986k
        }
675
1.31M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
1.31M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
1.31M
    }
678
679
1.94M
    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.94M
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
1.94M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
1.94M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
1.94M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
1.94M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
1.94M
    _memory_used_counter =
689
1.94M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
1.94M
    _common_profile->add_info_string("IsColocate",
691
1.94M
                                     std::to_string(_parent->is_colocated_operator()));
692
1.94M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
1.94M
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
1.94M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
1.94M
    return Status::OK();
696
1.94M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
187k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
187k
    _operator_profile =
641
187k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
187k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
187k
    _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
187k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
187k
    _operator_profile->add_child(_common_profile, true);
650
187k
    _operator_profile->add_child(_custom_profile, true);
651
652
187k
    _operator_profile->set_metadata(_parent->node_id());
653
187k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
187k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
187k
    if constexpr (!is_fake_shared) {
656
187k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
187k
            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
14.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
14.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
14.6k
                                                  ? 0
664
14.6k
                                                  : info.task_idx]
665
14.6k
                                  .get();
666
14.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
173k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
173k
            _shared_state = info.shared_state->template cast<SharedState>();
672
173k
            _dependency = _shared_state->create_sink_dependency(
673
173k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
173k
        }
675
187k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
187k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
187k
    }
678
679
187k
    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
187k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
187k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
187k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
187k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
187k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
187k
    _memory_used_counter =
689
187k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
187k
    _common_profile->add_info_string("IsColocate",
691
187k
                                     std::to_string(_parent->is_colocated_operator()));
692
187k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
187k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
187k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
187k
    return Status::OK();
696
187k
}
_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
198k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
198k
    _operator_profile =
641
198k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
198k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
198k
    _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
198k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
198k
    _operator_profile->add_child(_common_profile, true);
650
198k
    _operator_profile->add_child(_custom_profile, true);
651
652
198k
    _operator_profile->set_metadata(_parent->node_id());
653
198k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
198k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
198k
    if constexpr (!is_fake_shared) {
656
198k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
198k
            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
198k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
198k
            _shared_state = info.shared_state->template cast<SharedState>();
672
198k
            _dependency = _shared_state->create_sink_dependency(
673
198k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
198k
        }
675
198k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
198k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
198k
    }
678
679
198k
    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
198k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
198k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
198k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
198k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
198k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
198k
    _memory_used_counter =
689
198k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
198k
    _common_profile->add_info_string("IsColocate",
691
198k
                                     std::to_string(_parent->is_colocated_operator()));
692
198k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
198k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
198k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
198k
    return Status::OK();
696
198k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
18
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
18
    _operator_profile =
641
18
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
18
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
18
    _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
18
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
18
    _operator_profile->add_child(_common_profile, true);
650
18
    _operator_profile->add_child(_custom_profile, true);
651
652
18
    _operator_profile->set_metadata(_parent->node_id());
653
18
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
18
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
18
    if constexpr (!is_fake_shared) {
656
18
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
18
            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
18
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
18
            _shared_state = info.shared_state->template cast<SharedState>();
672
18
            _dependency = _shared_state->create_sink_dependency(
673
18
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
18
        }
675
18
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
18
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
18
    }
678
679
18
    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
18
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
18
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
18
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
18
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
18
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
18
    _memory_used_counter =
689
18
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
18
    _common_profile->add_info_string("IsColocate",
691
18
                                     std::to_string(_parent->is_colocated_operator()));
692
18
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
18
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
18
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
18
    return Status::OK();
696
18
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
5.57k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
5.57k
    _operator_profile =
641
5.57k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
5.57k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
5.57k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
5.57k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
5.57k
    _operator_profile->add_child(_common_profile, true);
650
5.57k
    _operator_profile->add_child(_custom_profile, true);
651
652
5.57k
    _operator_profile->set_metadata(_parent->node_id());
653
5.57k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
5.57k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
5.57k
    if constexpr (!is_fake_shared) {
656
5.57k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
5.57k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
5.57k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
5.57k
            _shared_state = info.shared_state->template cast<SharedState>();
672
5.57k
            _dependency = _shared_state->create_sink_dependency(
673
5.57k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
5.57k
        }
675
5.57k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
5.57k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
5.57k
    }
678
679
5.57k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
5.57k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
5.57k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
5.57k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
5.57k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
5.57k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
5.57k
    _memory_used_counter =
689
5.57k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
5.57k
    _common_profile->add_info_string("IsColocate",
691
5.57k
                                     std::to_string(_parent->is_colocated_operator()));
692
5.57k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
5.57k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
5.57k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
5.57k
    return Status::OK();
696
5.57k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
8.75k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
8.75k
    _operator_profile =
641
8.75k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
8.75k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
8.75k
    _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
8.75k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
8.75k
    _operator_profile->add_child(_common_profile, true);
650
8.75k
    _operator_profile->add_child(_custom_profile, true);
651
652
8.75k
    _operator_profile->set_metadata(_parent->node_id());
653
8.75k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
8.75k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
8.75k
    if constexpr (!is_fake_shared) {
656
8.75k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
8.75k
            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
8.75k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
8.75k
            _shared_state = info.shared_state->template cast<SharedState>();
672
8.75k
            _dependency = _shared_state->create_sink_dependency(
673
8.75k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
8.75k
        }
675
8.75k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
8.75k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
8.75k
    }
678
679
8.75k
    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
8.75k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
8.75k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
8.75k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
8.75k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
8.75k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
8.75k
    _memory_used_counter =
689
8.75k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
8.75k
    _common_profile->add_info_string("IsColocate",
691
8.75k
                                     std::to_string(_parent->is_colocated_operator()));
692
8.75k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
8.75k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
8.75k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
8.75k
    return Status::OK();
696
8.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
113k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
113k
    _operator_profile =
641
113k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
113k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
113k
    _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
113k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
113k
    _operator_profile->add_child(_common_profile, true);
650
113k
    _operator_profile->add_child(_custom_profile, true);
651
652
113k
    _operator_profile->set_metadata(_parent->node_id());
653
113k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
113k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
113k
    if constexpr (!is_fake_shared) {
656
113k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
113k
            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
113k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
113k
            _shared_state = info.shared_state->template cast<SharedState>();
672
113k
            _dependency = _shared_state->create_sink_dependency(
673
113k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
113k
        }
675
113k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
113k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
113k
    }
678
679
113k
    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
113k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
113k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
113k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
113k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
113k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
113k
    _memory_used_counter =
689
113k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
113k
    _common_profile->add_info_string("IsColocate",
691
113k
                                     std::to_string(_parent->is_colocated_operator()));
692
113k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
113k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
113k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
113k
    return Status::OK();
696
113k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
15
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
15
    _operator_profile =
641
15
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
15
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
15
    _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
15
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
15
    _operator_profile->add_child(_common_profile, true);
650
15
    _operator_profile->add_child(_custom_profile, true);
651
652
15
    _operator_profile->set_metadata(_parent->node_id());
653
15
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
15
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
15
    if constexpr (!is_fake_shared) {
656
15
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
15
            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
15
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
15
            _shared_state = info.shared_state->template cast<SharedState>();
672
15
            _dependency = _shared_state->create_sink_dependency(
673
15
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
15
        }
675
15
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
15
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
15
    }
678
679
15
    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
15
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
15
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
15
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
15
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
15
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
15
    _memory_used_counter =
689
15
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
15
    _common_profile->add_info_string("IsColocate",
691
15
                                     std::to_string(_parent->is_colocated_operator()));
692
15
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
15
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
15
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
15
    return Status::OK();
696
15
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
628k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
628k
    _operator_profile =
641
628k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
628k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
628k
    _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
628k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
628k
    _operator_profile->add_child(_common_profile, true);
650
628k
    _operator_profile->add_child(_custom_profile, true);
651
652
628k
    _operator_profile->set_metadata(_parent->node_id());
653
628k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
628k
    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
628k
    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
628k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
628k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
628k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
628k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
628k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
628k
    _memory_used_counter =
689
628k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
628k
    _common_profile->add_info_string("IsColocate",
691
628k
                                     std::to_string(_parent->is_colocated_operator()));
692
628k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
628k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
628k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
628k
    return Status::OK();
696
628k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
7.29k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
7.29k
    _operator_profile =
641
7.29k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
7.29k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
7.29k
    _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.29k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
7.29k
    _operator_profile->add_child(_common_profile, true);
650
7.29k
    _operator_profile->add_child(_custom_profile, true);
651
652
7.29k
    _operator_profile->set_metadata(_parent->node_id());
653
7.29k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
7.29k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
7.29k
    if constexpr (!is_fake_shared) {
656
7.29k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
7.29k
            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.29k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
7.29k
            _shared_state = info.shared_state->template cast<SharedState>();
672
7.29k
            _dependency = _shared_state->create_sink_dependency(
673
7.29k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
7.29k
        }
675
7.29k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
7.29k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
7.29k
    }
678
679
7.29k
    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.29k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
7.29k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
7.29k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
7.29k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
7.29k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
7.29k
    _memory_used_counter =
689
7.29k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
7.29k
    _common_profile->add_info_string("IsColocate",
691
7.29k
                                     std::to_string(_parent->is_colocated_operator()));
692
7.29k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
7.29k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
7.29k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
7.29k
    return Status::OK();
696
7.29k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
385
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
385
    _operator_profile =
641
385
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
385
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
385
    _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
385
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
385
    _operator_profile->add_child(_common_profile, true);
650
385
    _operator_profile->add_child(_custom_profile, true);
651
652
385
    _operator_profile->set_metadata(_parent->node_id());
653
385
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
385
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
385
    if constexpr (!is_fake_shared) {
656
385
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
385
            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
385
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
385
            _shared_state = info.shared_state->template cast<SharedState>();
672
385
            _dependency = _shared_state->create_sink_dependency(
673
385
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
385
        }
675
385
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
385
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
385
    }
678
679
385
    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
385
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
385
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
385
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
385
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
385
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
385
    _memory_used_counter =
689
385
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
385
    _common_profile->add_info_string("IsColocate",
691
385
                                     std::to_string(_parent->is_colocated_operator()));
692
385
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
385
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
385
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
385
    return Status::OK();
696
385
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
2.68k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
2.68k
    _operator_profile =
641
2.68k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
2.68k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
2.68k
    _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.68k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
2.68k
    _operator_profile->add_child(_common_profile, true);
650
2.68k
    _operator_profile->add_child(_custom_profile, true);
651
652
2.68k
    _operator_profile->set_metadata(_parent->node_id());
653
2.68k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
2.68k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
2.68k
    if constexpr (!is_fake_shared) {
656
2.68k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
2.68k
            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.68k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
2.68k
            _shared_state = info.shared_state->template cast<SharedState>();
672
2.68k
            _dependency = _shared_state->create_sink_dependency(
673
2.68k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
2.68k
        }
675
2.68k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
2.68k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
2.68k
    }
678
679
2.68k
    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.68k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
2.68k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
2.68k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
2.68k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
2.68k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
2.68k
    _memory_used_counter =
689
2.68k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
2.68k
    _common_profile->add_info_string("IsColocate",
691
2.68k
                                     std::to_string(_parent->is_colocated_operator()));
692
2.68k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
2.68k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
2.68k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
2.68k
    return Status::OK();
696
2.68k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
12.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
12.0k
    _operator_profile =
641
12.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
12.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
12.0k
    _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.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
12.0k
    _operator_profile->add_child(_common_profile, true);
650
12.0k
    _operator_profile->add_child(_custom_profile, true);
651
652
12.0k
    _operator_profile->set_metadata(_parent->node_id());
653
12.0k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
12.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
12.0k
    if constexpr (!is_fake_shared) {
656
12.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
12.0k
            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.0k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
12.0k
            _shared_state = info.shared_state->template cast<SharedState>();
672
12.0k
            _dependency = _shared_state->create_sink_dependency(
673
12.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
12.0k
        }
675
12.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
12.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
12.0k
    }
678
679
12.0k
    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.0k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
12.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
12.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
12.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
12.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
12.0k
    _memory_used_counter =
689
12.0k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
12.0k
    _common_profile->add_info_string("IsColocate",
691
12.0k
                                     std::to_string(_parent->is_colocated_operator()));
692
12.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
12.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
12.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
12.0k
    return Status::OK();
696
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
311k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
311k
    _operator_profile =
641
311k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
311k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
311k
    _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
311k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
311k
    _operator_profile->add_child(_common_profile, true);
650
311k
    _operator_profile->add_child(_custom_profile, true);
651
652
311k
    _operator_profile->set_metadata(_parent->node_id());
653
311k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
311k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
311k
    if constexpr (!is_fake_shared) {
656
311k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
311k
            info.shared_state_map.end()) {
658
310k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
310k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
310k
            }
661
310k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
310k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
310k
                                                  ? 0
664
310k
                                                  : info.task_idx]
665
310k
                                  .get();
666
310k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
310k
        } else {
668
385
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
385
                DCHECK(false);
670
385
            }
671
385
            _shared_state = info.shared_state->template cast<SharedState>();
672
385
            _dependency = _shared_state->create_sink_dependency(
673
385
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
385
        }
675
311k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
311k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
311k
    }
678
679
311k
    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
311k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
311k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
311k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
311k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
311k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
311k
    _memory_used_counter =
689
311k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
311k
    _common_profile->add_info_string("IsColocate",
691
311k
                                     std::to_string(_parent->is_colocated_operator()));
692
311k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
311k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
311k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
311k
    return Status::OK();
696
311k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
464k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
464k
    _operator_profile =
641
464k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
464k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
464k
    _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
464k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
464k
    _operator_profile->add_child(_common_profile, true);
650
464k
    _operator_profile->add_child(_custom_profile, true);
651
652
464k
    _operator_profile->set_metadata(_parent->node_id());
653
464k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
464k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
464k
    if constexpr (!is_fake_shared) {
656
464k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
464k
            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
908
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
908
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
908
                                                  ? 0
664
908
                                                  : info.task_idx]
665
908
                                  .get();
666
908
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
463k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
463k
            _shared_state = info.shared_state->template cast<SharedState>();
672
463k
            _dependency = _shared_state->create_sink_dependency(
673
463k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
463k
        }
675
464k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
464k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
464k
    }
678
679
464k
    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
464k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
464k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
464k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
464k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
464k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
464k
    _memory_used_counter =
689
464k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
464k
    _common_profile->add_info_string("IsColocate",
691
464k
                                     std::to_string(_parent->is_colocated_operator()));
692
464k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
464k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
464k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
464k
    return Status::OK();
696
464k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
366
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
366
    _operator_profile =
641
366
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
366
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
366
    _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
366
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
366
    _operator_profile->add_child(_common_profile, true);
650
366
    _operator_profile->add_child(_custom_profile, true);
651
652
366
    _operator_profile->set_metadata(_parent->node_id());
653
366
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
366
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
366
    if constexpr (!is_fake_shared) {
656
366
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
366
            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
366
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
366
            _shared_state = info.shared_state->template cast<SharedState>();
672
366
            _dependency = _shared_state->create_sink_dependency(
673
366
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
366
        }
675
366
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
366
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
366
    }
678
679
366
    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
366
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
366
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
366
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
366
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
366
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
366
    _memory_used_counter =
689
366
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
366
    _common_profile->add_info_string("IsColocate",
691
366
                                     std::to_string(_parent->is_colocated_operator()));
692
366
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
366
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
366
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
366
    return Status::OK();
696
366
}
_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.94M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
1.94M
    if (_closed) {
701
2
        return Status::OK();
702
2
    }
703
1.94M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
1.31M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
1.31M
    }
706
1.94M
    _closed = true;
707
1.94M
    return Status::OK();
708
1.94M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
187k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
187k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
187k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
187k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
187k
    }
706
187k
    _closed = true;
707
187k
    return Status::OK();
708
187k
}
_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
197k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
197k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
197k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
197k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
197k
    }
706
197k
    _closed = true;
707
197k
    return Status::OK();
708
197k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
14
    if (_closed) {
701
2
        return Status::OK();
702
2
    }
703
12
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
12
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
12
    }
706
12
    _closed = true;
707
12
    return Status::OK();
708
14
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
5.55k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
5.55k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
5.55k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
5.55k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
5.55k
    }
706
5.55k
    _closed = true;
707
5.55k
    return Status::OK();
708
5.55k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
8.70k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
8.70k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
8.70k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
8.70k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
8.70k
    }
706
8.70k
    _closed = true;
707
8.70k
    return Status::OK();
708
8.70k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
113k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
113k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
113k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
113k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
113k
    }
706
113k
    _closed = true;
707
113k
    return Status::OK();
708
113k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
10
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
10
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
10
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
10
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
10
    }
706
10
    _closed = true;
707
10
    return Status::OK();
708
10
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
628k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
628k
    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
628k
    _closed = true;
707
628k
    return Status::OK();
708
628k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
7.29k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
7.29k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
7.29k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
7.29k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
7.29k
    }
706
7.29k
    _closed = true;
707
7.29k
    return Status::OK();
708
7.29k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_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_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
2.68k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
2.68k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
2.68k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
2.68k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
2.68k
    }
706
2.68k
    _closed = true;
707
2.68k
    return Status::OK();
708
2.68k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
12.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
12.0k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
12.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
12.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
12.0k
    }
706
12.0k
    _closed = true;
707
12.0k
    return Status::OK();
708
12.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
311k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
311k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
311k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
311k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
311k
    }
706
311k
    _closed = true;
707
311k
    return Status::OK();
708
311k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
467k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
467k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
467k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
467k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
467k
    }
706
467k
    _closed = true;
707
467k
    return Status::OK();
708
467k
}
_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
2.54k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
2.54k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
2.54k
    return pull(state, block, eos);
714
2.54k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
711
31
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
31
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
31
    return pull(state, block, eos);
714
31
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
711
2.51k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
2.51k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
2.51k
    return pull(state, block, eos);
714
2.51k
}
715
716
template <typename LocalStateType>
717
862k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
862k
    auto& local_state = get_local_state(state);
719
862k
    if (need_more_input_data(state)) {
720
785k
        local_state._child_block->clear_column_data(
721
785k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
785k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
785k
                state, local_state._child_block.get(), &local_state._child_eos));
724
785k
        *eos = local_state._child_eos;
725
785k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
54.4k
            return Status::OK();
727
54.4k
        }
728
730k
        {
729
730k
            SCOPED_TIMER(local_state.exec_time_counter());
730
730k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
730k
        }
732
730k
    }
733
734
808k
    if (!need_more_input_data(state)) {
735
771k
        SCOPED_TIMER(local_state.exec_time_counter());
736
771k
        bool new_eos = false;
737
771k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
771k
        if (new_eos) {
739
700k
            *eos = true;
740
700k
        } else if (!need_more_input_data(state)) {
741
26.4k
            *eos = false;
742
26.4k
        }
743
771k
    }
744
808k
    return Status::OK();
745
808k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
189k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
189k
    auto& local_state = get_local_state(state);
719
189k
    if (need_more_input_data(state)) {
720
125k
        local_state._child_block->clear_column_data(
721
125k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
125k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
125k
                state, local_state._child_block.get(), &local_state._child_eos));
724
125k
        *eos = local_state._child_eos;
725
125k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
26.9k
            return Status::OK();
727
26.9k
        }
728
98.0k
        {
729
98.0k
            SCOPED_TIMER(local_state.exec_time_counter());
730
98.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
98.0k
        }
732
98.0k
    }
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
12.1k
            *eos = false;
742
12.1k
        }
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.10k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
3.10k
    auto& local_state = get_local_state(state);
719
3.10k
    if (need_more_input_data(state)) {
720
1.82k
        local_state._child_block->clear_column_data(
721
1.82k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
1.82k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
1.82k
                state, local_state._child_block.get(), &local_state._child_eos));
724
1.82k
        *eos = local_state._child_eos;
725
1.82k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
199
            return Status::OK();
727
199
        }
728
1.62k
        {
729
1.62k
            SCOPED_TIMER(local_state.exec_time_counter());
730
1.62k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
1.62k
        }
732
1.62k
    }
733
734
2.91k
    if (!need_more_input_data(state)) {
735
2.91k
        SCOPED_TIMER(local_state.exec_time_counter());
736
2.91k
        bool new_eos = false;
737
2.91k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
2.91k
        if (new_eos) {
739
1.42k
            *eos = true;
740
1.48k
        } else if (!need_more_input_data(state)) {
741
1.27k
            *eos = false;
742
1.27k
        }
743
2.91k
    }
744
2.90k
    return Status::OK();
745
2.90k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
1.60k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
1.60k
    auto& local_state = get_local_state(state);
719
1.60k
    if (need_more_input_data(state)) {
720
1.60k
        local_state._child_block->clear_column_data(
721
1.60k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
1.60k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
1.60k
                state, local_state._child_block.get(), &local_state._child_eos));
724
1.60k
        *eos = local_state._child_eos;
725
1.60k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
629
            return Status::OK();
727
629
        }
728
973
        {
729
973
            SCOPED_TIMER(local_state.exec_time_counter());
730
973
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
973
        }
732
973
    }
733
734
973
    if (!need_more_input_data(state)) {
735
973
        SCOPED_TIMER(local_state.exec_time_counter());
736
973
        bool new_eos = false;
737
973
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
973
        if (new_eos) {
739
663
            *eos = true;
740
663
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
973
    }
744
973
    return Status::OK();
745
973
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
19.0k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
19.0k
    auto& local_state = get_local_state(state);
719
19.0k
    if (need_more_input_data(state)) {
720
18.9k
        local_state._child_block->clear_column_data(
721
18.9k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
18.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
18.9k
                state, local_state._child_block.get(), &local_state._child_eos));
724
18.9k
        *eos = local_state._child_eos;
725
18.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
5.85k
            return Status::OK();
727
5.85k
        }
728
13.1k
        {
729
13.1k
            SCOPED_TIMER(local_state.exec_time_counter());
730
13.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
13.1k
        }
732
13.1k
    }
733
734
13.1k
    if (!need_more_input_data(state)) {
735
8.08k
        SCOPED_TIMER(local_state.exec_time_counter());
736
8.08k
        bool new_eos = false;
737
8.08k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
8.08k
        if (new_eos) {
739
7.97k
            *eos = true;
740
7.97k
        } else if (!need_more_input_data(state)) {
741
7
            *eos = false;
742
7
        }
743
8.08k
    }
744
13.1k
    return Status::OK();
745
13.1k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
617k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
617k
    auto& local_state = get_local_state(state);
719
618k
    if (need_more_input_data(state)) {
720
618k
        local_state._child_block->clear_column_data(
721
618k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
618k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
618k
                state, local_state._child_block.get(), &local_state._child_eos));
724
618k
        *eos = local_state._child_eos;
725
618k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
19.1k
            return Status::OK();
727
19.1k
        }
728
599k
        {
729
599k
            SCOPED_TIMER(local_state.exec_time_counter());
730
599k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
599k
        }
732
599k
    }
733
734
598k
    if (!need_more_input_data(state)) {
735
567k
        SCOPED_TIMER(local_state.exec_time_counter());
736
567k
        bool new_eos = false;
737
567k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
567k
        if (new_eos) {
739
566k
            *eos = true;
740
566k
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
567k
    }
744
598k
    return Status::OK();
745
598k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
25.9k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
25.9k
    auto& local_state = get_local_state(state);
719
25.9k
    if (need_more_input_data(state)) {
720
13.3k
        local_state._child_block->clear_column_data(
721
13.3k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
13.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
13.3k
                state, local_state._child_block.get(), &local_state._child_eos));
724
13.3k
        *eos = local_state._child_eos;
725
13.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
1.13k
            return Status::OK();
727
1.13k
        }
728
12.2k
        {
729
12.2k
            SCOPED_TIMER(local_state.exec_time_counter());
730
12.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
12.2k
        }
732
12.2k
    }
733
734
24.8k
    if (!need_more_input_data(state)) {
735
23.9k
        SCOPED_TIMER(local_state.exec_time_counter());
736
23.9k
        bool new_eos = false;
737
23.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
23.9k
        if (new_eos) {
739
5.56k
            *eos = true;
740
18.3k
        } else if (!need_more_input_data(state)) {
741
12.5k
            *eos = false;
742
12.5k
        }
743
23.9k
    }
744
24.8k
    return Status::OK();
745
24.8k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
6.12k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
6.12k
    auto& local_state = get_local_state(state);
719
6.12k
    if (need_more_input_data(state)) {
720
5.75k
        local_state._child_block->clear_column_data(
721
5.75k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
5.75k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
5.75k
                state, local_state._child_block.get(), &local_state._child_eos));
724
5.75k
        *eos = local_state._child_eos;
725
5.75k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
450
            return Status::OK();
727
450
        }
728
5.30k
        {
729
5.30k
            SCOPED_TIMER(local_state.exec_time_counter());
730
5.30k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
5.30k
        }
732
5.30k
    }
733
734
5.67k
    if (!need_more_input_data(state)) {
735
5.67k
        SCOPED_TIMER(local_state.exec_time_counter());
736
5.67k
        bool new_eos = false;
737
5.67k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
5.67k
        if (new_eos) {
739
3.82k
            *eos = true;
740
3.82k
        } else if (!need_more_input_data(state)) {
741
374
            *eos = false;
742
374
        }
743
5.67k
    }
744
5.67k
    return Status::OK();
745
5.67k
}
746
747
template <typename Writer, typename Parent>
748
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
749
66.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
66.3k
    RETURN_IF_ERROR(Base::init(state, info));
751
66.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
66.3k
                                                         "AsyncWriterDependency", true);
753
66.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
66.3k
                             _finish_dependency));
755
756
66.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
66.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
66.3k
    return Status::OK();
759
66.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
343
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
343
    RETURN_IF_ERROR(Base::init(state, info));
751
343
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
343
                                                         "AsyncWriterDependency", true);
753
343
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
343
                             _finish_dependency));
755
756
343
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
343
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
343
    return Status::OK();
759
343
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
66.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
66.0k
    RETURN_IF_ERROR(Base::init(state, info));
751
66.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
66.0k
                                                         "AsyncWriterDependency", true);
753
66.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
66.0k
                             _finish_dependency));
755
756
66.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
66.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
66.0k
    return Status::OK();
759
66.0k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
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.8k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
66.8k
    RETURN_IF_ERROR(Base::open(state));
765
66.8k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
473k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
406k
        RETURN_IF_ERROR(
768
406k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
406k
    }
770
66.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
66.8k
    return Status::OK();
772
66.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
342
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
342
    RETURN_IF_ERROR(Base::open(state));
765
342
    _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
342
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
342
    return Status::OK();
772
342
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
66.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
66.5k
    RETURN_IF_ERROR(Base::open(state));
765
66.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
471k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
404k
        RETURN_IF_ERROR(
768
404k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
404k
    }
770
66.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
66.5k
    return Status::OK();
772
66.5k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
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.22k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
1.22k
    return _writer->sink(block, eos);
778
1.22k
}
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
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
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.9k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
66.9k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
66.9k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
66.9k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
67.0k
    if (_writer) {
790
67.0k
        Status st = _writer->get_writer_status();
791
67.0k
        if (exec_status.ok()) {
792
66.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
66.9k
                                                       : Status::Cancelled("force close"));
794
66.9k
        } else {
795
101
            _writer->force_close(exec_status);
796
101
        }
797
        // If there is an error in process_block thread, then we should get the writer
798
        // status before call force_close. For example, the thread may failed in commit
799
        // transaction.
800
67.0k
        RETURN_IF_ERROR(st);
801
67.0k
    }
802
66.9k
    return Base::close(state, exec_status);
803
66.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
331
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
331
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
331
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
331
    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
331
    if (_writer) {
790
331
        Status st = _writer->get_writer_status();
791
331
        if (exec_status.ok()) {
792
331
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
331
                                                       : Status::Cancelled("force close"));
794
331
        } 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
331
        RETURN_IF_ERROR(st);
801
331
    }
802
331
    return Base::close(state, exec_status);
803
331
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
66.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
66.6k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
66.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
66.6k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
66.6k
    if (_writer) {
790
66.6k
        Status st = _writer->get_writer_status();
791
66.6k
        if (exec_status.ok()) {
792
66.5k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
66.5k
                                                       : Status::Cancelled("force close"));
794
66.5k
        } else {
795
101
            _writer->force_close(exec_status);
796
101
        }
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.6k
        RETURN_IF_ERROR(st);
801
66.6k
    }
802
66.6k
    return Base::close(state, exec_status);
803
66.6k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
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