Coverage Report

Created: 2026-03-12 16:03

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.06M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
2.06M
    if (_parent->nereids_id() == -1) {
117
1.07M
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
1.07M
    } else {
119
990k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
990k
                           std::to_string(_parent->nereids_id()),
121
990k
                           std::to_string(_parent->node_id()));
122
990k
    }
123
2.06M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
133k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
133k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
133k
    } else {
119
133k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
133k
                           std::to_string(_parent->nereids_id()),
121
133k
                           std::to_string(_parent->node_id()));
122
133k
    }
123
133k
}
_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
199k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
199k
    if (_parent->nereids_id() == -1) {
117
12
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
199k
    } else {
119
199k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
199k
                           std::to_string(_parent->nereids_id()),
121
199k
                           std::to_string(_parent->node_id()));
122
199k
    }
123
199k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
18
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
18
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
18
    } else {
119
18
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
18
                           std::to_string(_parent->nereids_id()),
121
18
                           std::to_string(_parent->node_id()));
122
18
    }
123
18
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
6.06k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
6.06k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
6.06k
    } else {
119
6.06k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
6.06k
                           std::to_string(_parent->nereids_id()),
121
6.06k
                           std::to_string(_parent->node_id()));
122
6.06k
    }
123
6.06k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
7.19k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
7.19k
    if (_parent->nereids_id() == -1) {
117
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
7.18k
    } else {
119
7.18k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
7.18k
                           std::to_string(_parent->nereids_id()),
121
7.18k
                           std::to_string(_parent->node_id()));
122
7.18k
    }
123
7.19k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
120k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
120k
    if (_parent->nereids_id() == -1) {
117
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
119k
    } else {
119
119k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
119k
                           std::to_string(_parent->nereids_id()),
121
119k
                           std::to_string(_parent->node_id()));
122
119k
    }
123
120k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
319
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
319
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
319
    } else {
119
319
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
319
                           std::to_string(_parent->nereids_id()),
121
319
                           std::to_string(_parent->node_id()));
122
319
    }
123
319
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
884k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
884k
    if (_parent->nereids_id() == -1) {
117
403k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
480k
    } else {
119
480k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
480k
                           std::to_string(_parent->nereids_id()),
121
480k
                           std::to_string(_parent->node_id()));
122
480k
    }
123
884k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
39.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
39.6k
    if (_parent->nereids_id() == -1) {
117
2
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
39.6k
    } else {
119
39.6k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
39.6k
                           std::to_string(_parent->nereids_id()),
121
39.6k
                           std::to_string(_parent->node_id()));
122
39.6k
    }
123
39.6k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
368
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
368
    if (_parent->nereids_id() == -1) {
117
368
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
368
    } 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
368
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
6.61k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
6.61k
    if (_parent->nereids_id() == -1) {
117
6.61k
        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.61k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
423
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
423
    if (_parent->nereids_id() == -1) {
117
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
321
    } else {
119
321
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
321
                           std::to_string(_parent->nereids_id()),
121
321
                           std::to_string(_parent->node_id()));
122
321
    }
123
423
}
_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
664k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
664k
    if (_parent->nereids_id() == -1) {
117
664k
        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
664k
}
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.27M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
1.27M
    if (_parent->nereids_id() == -1) {
128
741k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
741k
    } else {
130
529k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
529k
                           std::to_string(_parent->nereids_id()),
132
529k
                           std::to_string(_parent->node_id()));
133
529k
    }
134
1.27M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
181k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
181k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
181k
    } else {
130
181k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
181k
                           std::to_string(_parent->nereids_id()),
132
181k
                           std::to_string(_parent->node_id()));
133
181k
    }
134
181k
}
_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
204k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
204k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
204k
    } else {
130
204k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
204k
                           std::to_string(_parent->nereids_id()),
132
204k
                           std::to_string(_parent->node_id()));
133
204k
    }
134
204k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
21
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
21
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
21
    } else {
130
21
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
21
                           std::to_string(_parent->nereids_id()),
132
21
                           std::to_string(_parent->node_id()));
133
21
    }
134
21
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
6.12k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
6.12k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
6.12k
    } else {
130
6.12k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
6.12k
                           std::to_string(_parent->nereids_id()),
132
6.12k
                           std::to_string(_parent->node_id()));
133
6.12k
    }
134
6.12k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
7.27k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
7.27k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
7.26k
    } else {
130
7.26k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
7.26k
                           std::to_string(_parent->nereids_id()),
132
7.26k
                           std::to_string(_parent->node_id()));
133
7.26k
    }
134
7.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
120k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
120k
    if (_parent->nereids_id() == -1) {
128
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
120k
    } else {
130
120k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
120k
                           std::to_string(_parent->nereids_id()),
132
120k
                           std::to_string(_parent->node_id()));
133
120k
    }
134
120k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
325
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
325
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
325
    } else {
130
325
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
325
                           std::to_string(_parent->nereids_id()),
132
325
                           std::to_string(_parent->node_id()));
133
325
    }
134
325
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
15
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
15
    if (_parent->nereids_id() == -1) {
128
15
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
15
    } else {
130
0
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
0
                           std::to_string(_parent->nereids_id()),
132
0
                           std::to_string(_parent->node_id()));
133
0
    }
134
15
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
7.76k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
7.76k
    if (_parent->nereids_id() == -1) {
128
3
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
7.75k
    } else {
130
7.75k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
7.75k
                           std::to_string(_parent->nereids_id()),
132
7.75k
                           std::to_string(_parent->node_id()));
133
7.75k
    }
134
7.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
425
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
425
    if (_parent->nereids_id() == -1) {
128
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
323
    } else {
130
323
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
323
                           std::to_string(_parent->nereids_id()),
132
323
                           std::to_string(_parent->node_id()));
133
323
    }
134
425
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
12.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
12.1k
    if (_parent->nereids_id() == -1) {
128
12.1k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
18.4E
    } else {
130
18.4E
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
18.4E
                           std::to_string(_parent->nereids_id()),
132
18.4E
                           std::to_string(_parent->node_id()));
133
18.4E
    }
134
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
315k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
315k
    if (_parent->nereids_id() == -1) {
128
315k
        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
315k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
412k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
412k
    if (_parent->nereids_id() == -1) {
128
412k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
412k
    } else {
130
108
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
108
                           std::to_string(_parent->nereids_id()),
132
108
                           std::to_string(_parent->node_id()));
133
108
    }
134
412k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
368
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
369
    if (_parent->nereids_id() == -1) {
128
369
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
18.4E
    } else {
130
18.4E
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
18.4E
                           std::to_string(_parent->nereids_id()),
132
18.4E
                           std::to_string(_parent->node_id()));
133
18.4E
    }
134
368
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
300
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
300
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
300
    } else {
130
300
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
300
                           std::to_string(_parent->nereids_id()),
132
300
                           std::to_string(_parent->node_id()));
133
300
    }
134
300
}
135
136
template <typename SharedStateArg>
137
30.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
30.1k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
30.1k
    _terminated = true;
142
30.1k
    return Status::OK();
143
30.1k
}
_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
575
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
575
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
575
    _terminated = true;
142
575
    return Status::OK();
143
575
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
2
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
2
    _terminated = true;
142
2
    return Status::OK();
143
2
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
6
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
6
    _terminated = true;
142
6
    return Status::OK();
143
6
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
1
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
1
    _terminated = true;
142
1
    return Status::OK();
143
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
2.27k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
2.27k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
2.27k
    _terminated = true;
142
2.27k
    return Status::OK();
143
2.27k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
2.82k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
2.82k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
2.82k
    _terminated = true;
142
2.82k
    return Status::OK();
143
2.82k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
9
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
9
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
9
    _terminated = true;
142
9
    return Status::OK();
143
9
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
4
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
4
    _terminated = true;
142
4
    return Status::OK();
143
4
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
48
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
48
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
48
    _terminated = true;
142
48
    return Status::OK();
143
48
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
253
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
253
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
253
    _terminated = true;
142
253
    return Status::OK();
143
253
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
138
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
138
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
138
    _terminated = true;
142
138
    return Status::OK();
143
138
}
144
145
601k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
146
601k
    return _child && _child->is_serial_operator() && !is_source()
147
601k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
148
601k
                   : DataDistribution(ExchangeType::NOOP);
149
601k
}
150
151
79.0k
const RowDescriptor& OperatorBase::row_desc() const {
152
79.0k
    return _child->row_desc();
153
79.0k
}
154
155
template <typename SharedStateArg>
156
49.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
49.7k
    fmt::memory_buffer debug_string_buffer;
158
49.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
49.7k
    return fmt::to_string(debug_string_buffer);
160
49.7k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
28
    fmt::memory_buffer debug_string_buffer;
158
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
28
    return fmt::to_string(debug_string_buffer);
160
28
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
3
    fmt::memory_buffer debug_string_buffer;
158
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
3
    return fmt::to_string(debug_string_buffer);
160
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
7
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
7
    fmt::memory_buffer debug_string_buffer;
158
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
7
    return fmt::to_string(debug_string_buffer);
160
7
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
14
    fmt::memory_buffer debug_string_buffer;
158
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
14
    return fmt::to_string(debug_string_buffer);
160
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
44
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
44
    fmt::memory_buffer debug_string_buffer;
158
44
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
44
    return fmt::to_string(debug_string_buffer);
160
44
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
49.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
49.0k
    fmt::memory_buffer debug_string_buffer;
158
49.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
49.0k
    return fmt::to_string(debug_string_buffer);
160
49.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
602
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
602
    fmt::memory_buffer debug_string_buffer;
158
602
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
602
    return fmt::to_string(debug_string_buffer);
160
602
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
161
162
template <typename SharedStateArg>
163
49.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
49.7k
    fmt::memory_buffer debug_string_buffer;
165
49.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
49.7k
    return fmt::to_string(debug_string_buffer);
167
49.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
7
    fmt::memory_buffer debug_string_buffer;
165
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
7
    return fmt::to_string(debug_string_buffer);
167
7
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
43
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
43
    fmt::memory_buffer debug_string_buffer;
165
43
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
43
    return fmt::to_string(debug_string_buffer);
167
43
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
595
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
595
    fmt::memory_buffer debug_string_buffer;
165
595
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
595
    return fmt::to_string(debug_string_buffer);
167
595
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
23
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
23
    fmt::memory_buffer debug_string_buffer;
165
23
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
23
    return fmt::to_string(debug_string_buffer);
167
23
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
49.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
49.0k
    fmt::memory_buffer debug_string_buffer;
165
49.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
49.0k
    return fmt::to_string(debug_string_buffer);
167
49.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
168
169
49.8k
std::string OperatorXBase::debug_string(int indentation_level) const {
170
49.8k
    fmt::memory_buffer debug_string_buffer;
171
49.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
172
49.8k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
173
49.8k
                   _is_serial_operator);
174
49.8k
    return fmt::to_string(debug_string_buffer);
175
49.8k
}
176
177
49.7k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
178
49.7k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
179
49.7k
}
180
181
557k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
182
557k
    std::string node_name = print_plan_node_type(tnode.node_type);
183
557k
    _nereids_id = tnode.nereids_id;
184
557k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
185
2.90k
        if (!tnode.__isset.output_tuple_id) {
186
0
            return Status::InternalError("no final output tuple id");
187
0
        }
188
2.90k
        if (tnode.intermediate_output_tuple_id_list.size() !=
189
2.90k
            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.90k
    }
197
557k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
198
557k
    _op_name = substr + "_OPERATOR";
199
200
557k
    if (tnode.__isset.vconjunct) {
201
0
        return Status::InternalError("vconjunct is not supported yet");
202
557k
    } 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
557k
    if (tnode.__isset.projections) {
212
239k
        DCHECK(tnode.__isset.output_tuple_id);
213
239k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
214
239k
    }
215
557k
    if (!tnode.intermediate_projections_list.empty()) {
216
2.90k
        DCHECK(tnode.__isset.projections) << "no final projections";
217
2.90k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
218
3.80k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
219
3.80k
            VExprContextSPtrs projections;
220
3.80k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
221
3.80k
            _intermediate_projections.push_back(projections);
222
3.80k
        }
223
2.90k
    }
224
557k
    return Status::OK();
225
557k
}
226
227
584k
Status OperatorXBase::prepare(RuntimeState* state) {
228
584k
    for (auto& conjunct : _conjuncts) {
229
257k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
230
257k
    }
231
584k
    if (state->enable_adjust_conjunct_order_by_cost()) {
232
535k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
233
339k
            return a->execute_cost() < b->execute_cost();
234
339k
        });
235
535k
    };
236
237
588k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
238
3.80k
        RETURN_IF_ERROR(
239
3.80k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
240
3.80k
    }
241
584k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
242
243
584k
    if (has_output_row_desc()) {
244
239k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
245
239k
    }
246
247
584k
    for (auto& conjunct : _conjuncts) {
248
257k
        RETURN_IF_ERROR(conjunct->open(state));
249
257k
    }
250
584k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
251
584k
    for (auto& projections : _intermediate_projections) {
252
3.80k
        RETURN_IF_ERROR(VExpr::open(projections, state));
253
3.80k
    }
254
584k
    if (_child && !is_source()) {
255
135k
        RETURN_IF_ERROR(_child->prepare(state));
256
135k
    }
257
258
584k
    if (VExpr::contains_blockable_function(_conjuncts) ||
259
584k
        VExpr::contains_blockable_function(_projections)) {
260
0
        _blockable = true;
261
0
    }
262
263
584k
    return Status::OK();
264
584k
}
265
266
7.31k
Status OperatorXBase::terminate(RuntimeState* state) {
267
7.31k
    if (_child && !is_source()) {
268
1.12k
        RETURN_IF_ERROR(_child->terminate(state));
269
1.12k
    }
270
7.31k
    auto result = state->get_local_state_result(operator_id());
271
7.31k
    if (!result) {
272
0
        return result.error();
273
0
    }
274
7.31k
    return result.value()->terminate(state);
275
7.31k
}
276
277
6.03M
Status OperatorXBase::close(RuntimeState* state) {
278
6.03M
    if (_child && !is_source()) {
279
1.28M
        RETURN_IF_ERROR(_child->close(state));
280
1.28M
    }
281
6.03M
    auto result = state->get_local_state_result(operator_id());
282
6.03M
    if (!result) {
283
0
        return result.error();
284
0
    }
285
6.03M
    return result.value()->close(state);
286
6.03M
}
287
288
30.3M
void PipelineXLocalStateBase::clear_origin_block() {
289
30.3M
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
290
30.3M
}
291
292
30.5M
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
293
30.5M
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
294
295
30.5M
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
296
30.5M
    return Status::OK();
297
30.5M
}
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
30.3M
                                     Block* output_block) const {
306
30.3M
    auto* local_state = state->get_local_state(operator_id());
307
30.3M
    SCOPED_TIMER(local_state->exec_time_counter());
308
30.3M
    SCOPED_TIMER(local_state->_projection_timer);
309
30.3M
    const size_t rows = origin_block->rows();
310
30.3M
    if (rows == 0) {
311
30.2M
        return Status::OK();
312
30.2M
    }
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
894
        if (projections.empty()) {
319
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
320
0
                                         node_id());
321
0
        }
322
894
        new_columns.resize(projections.size());
323
6.26k
        for (int i = 0; i < projections.size(); i++) {
324
5.37k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
325
5.37k
            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.37k
        }
333
894
        Block tmp_block {new_columns};
334
894
        bytes_usage += tmp_block.allocated_bytes();
335
894
        input_block.swap(tmp_block);
336
894
    }
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
590k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
345
590k
        if (to->is_nullable() && !from->is_nullable()) {
346
0
            if (_keep_origin || !from->is_exclusive()) {
347
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
348
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
349
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
350
0
                bytes_usage += null_column.allocated_bytes();
351
0
            } else {
352
0
                to = make_nullable(from, false)->assume_mutable();
353
0
            }
354
590k
        } else {
355
590k
            if (_keep_origin || !from->is_exclusive()) {
356
584k
                to->insert_range_from(*from, 0, rows);
357
584k
                bytes_usage += from->allocated_bytes();
358
584k
            } else {
359
5.82k
                to = from->assume_mutable();
360
5.82k
            }
361
590k
        }
362
590k
    };
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
707k
        for (int i = 0; i < mutable_columns.size(); ++i) {
371
590k
            auto result_column_id = -1;
372
590k
            ColumnPtr column_ptr;
373
590k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
374
590k
            if (column_ptr->size() != rows) {
375
0
                return Status::InternalError(
376
0
                        "projection result column size {} not equal input rows {}, expr: {}",
377
0
                        column_ptr->size(), rows,
378
0
                        local_state->_projections[i]->root()->debug_string());
379
0
            }
380
590k
            column_ptr = column_ptr->convert_to_full_column_if_const();
381
590k
            if (result_column_id >= origin_columns_count) {
382
590k
                bytes_usage += column_ptr->allocated_bytes();
383
590k
            }
384
590k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
385
590k
        }
386
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
33.8M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
396
33.8M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
397
33.8M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
398
33.8M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
399
33.8M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
400
33.8M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
401
33.8M
            if (_debug_point_count++ % 2 == 0) {
402
33.8M
                return Status::OK();
403
33.8M
            }
404
33.8M
        }
405
33.8M
    });
406
407
33.8M
    Status status;
408
33.8M
    auto* local_state = state->get_local_state(operator_id());
409
33.8M
    Defer defer([&]() {
410
33.8M
        if (status.ok()) {
411
33.8M
            if (auto rows = block->rows()) {
412
716k
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
413
716k
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
414
716k
            }
415
33.8M
        }
416
33.8M
    });
417
33.8M
    if (_output_row_descriptor) {
418
30.3M
        local_state->clear_origin_block();
419
30.3M
        status = get_block(state, &local_state->_origin_block, eos);
420
30.3M
        if (UNLIKELY(!status.ok())) {
421
13
            return status;
422
13
        }
423
30.3M
        status = do_projections(state, &local_state->_origin_block, block);
424
30.3M
        return status;
425
30.3M
    }
426
3.46M
    status = get_block(state, block, eos);
427
3.46M
    RETURN_IF_ERROR(block->check_type_and_column());
428
3.46M
    return status;
429
3.46M
}
430
431
32.4M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
432
32.4M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
433
1.50k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
434
1.50k
        *eos = true;
435
1.50k
    }
436
437
32.4M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
438
32.4M
        auto op_name = to_lower(_parent->_op_name);
439
32.4M
        auto arg_op_name = dp->param<std::string>("op_name");
440
32.4M
        arg_op_name = to_lower(arg_op_name);
441
442
32.4M
        if (op_name == arg_op_name) {
443
32.4M
            *eos = true;
444
32.4M
        }
445
32.4M
    });
446
447
32.4M
    if (auto rows = block->rows()) {
448
646k
        _num_rows_returned += rows;
449
646k
    }
450
32.4M
}
451
452
30.1k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
453
30.1k
    auto result = state->get_sink_local_state_result();
454
30.1k
    if (!result) {
455
0
        return result.error();
456
0
    }
457
30.1k
    return result.value()->terminate(state);
458
30.1k
}
459
460
49.8k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
461
49.8k
    fmt::memory_buffer debug_string_buffer;
462
463
49.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
464
49.8k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
465
49.8k
    return fmt::to_string(debug_string_buffer);
466
49.8k
}
467
468
49.7k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
469
49.7k
    return state->get_sink_local_state()->debug_string(indentation_level);
470
49.7k
}
471
472
330k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
473
330k
    std::string op_name = "UNKNOWN_SINK";
474
330k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
475
476
330k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
477
330k
        op_name = it->second;
478
330k
    }
479
330k
    _name = op_name + "_OPERATOR";
480
330k
    return Status::OK();
481
330k
}
482
483
164k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
484
164k
    std::string op_name = print_plan_node_type(tnode.node_type);
485
164k
    _nereids_id = tnode.nereids_id;
486
164k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
487
164k
    _name = substr + "_SINK_OPERATOR";
488
164k
    return Status::OK();
489
164k
}
490
491
template <typename LocalStateType>
492
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
493
1.85M
                                                            LocalSinkStateInfo& info) {
494
1.85M
    auto local_state = LocalStateType::create_unique(this, state);
495
1.85M
    RETURN_IF_ERROR(local_state->init(state, info));
496
1.85M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
1.85M
    return Status::OK();
498
1.85M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
181k
                                                            LocalSinkStateInfo& info) {
494
181k
    auto local_state = LocalStateType::create_unique(this, state);
495
181k
    RETURN_IF_ERROR(local_state->init(state, info));
496
181k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
181k
    return Status::OK();
498
181k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
346k
                                                            LocalSinkStateInfo& info) {
494
346k
    auto local_state = LocalStateType::create_unique(this, state);
495
346k
    RETURN_IF_ERROR(local_state->init(state, info));
496
346k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
346k
    return Status::OK();
498
346k
}
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.4k
                                                            LocalSinkStateInfo& info) {
494
66.4k
    auto local_state = LocalStateType::create_unique(this, state);
495
66.4k
    RETURN_IF_ERROR(local_state->init(state, info));
496
66.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
66.4k
    return Status::OK();
498
66.4k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_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
}
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
7.29k
                                                            LocalSinkStateInfo& info) {
494
7.29k
    auto local_state = LocalStateType::create_unique(this, state);
495
7.29k
    RETURN_IF_ERROR(local_state->init(state, info));
496
7.29k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
7.29k
    return Status::OK();
498
7.29k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
12
                                                            LocalSinkStateInfo& info) {
494
12
    auto local_state = LocalStateType::create_unique(this, state);
495
12
    RETURN_IF_ERROR(local_state->init(state, info));
496
12
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
12
    return Status::OK();
498
12
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
205k
                                                            LocalSinkStateInfo& info) {
494
205k
    auto local_state = LocalStateType::create_unique(this, state);
495
205k
    RETURN_IF_ERROR(local_state->init(state, info));
496
205k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
205k
    return Status::OK();
498
205k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
21
                                                            LocalSinkStateInfo& info) {
494
21
    auto local_state = LocalStateType::create_unique(this, state);
495
21
    RETURN_IF_ERROR(local_state->init(state, info));
496
21
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
21
    return Status::OK();
498
21
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
315k
                                                            LocalSinkStateInfo& info) {
494
315k
    auto local_state = LocalStateType::create_unique(this, state);
495
315k
    RETURN_IF_ERROR(local_state->init(state, info));
496
315k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
315k
    return Status::OK();
498
315k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
120k
                                                            LocalSinkStateInfo& info) {
494
120k
    auto local_state = LocalStateType::create_unique(this, state);
495
120k
    RETURN_IF_ERROR(local_state->init(state, info));
496
120k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
120k
    return Status::OK();
498
120k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
325
                                                            LocalSinkStateInfo& info) {
494
325
    auto local_state = LocalStateType::create_unique(this, state);
495
325
    RETURN_IF_ERROR(local_state->init(state, info));
496
325
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
325
    return Status::OK();
498
325
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
578k
                                                            LocalSinkStateInfo& info) {
494
578k
    auto local_state = LocalStateType::create_unique(this, state);
495
578k
    RETURN_IF_ERROR(local_state->init(state, info));
496
578k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
578k
    return Status::OK();
498
578k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
6.12k
                                                            LocalSinkStateInfo& info) {
494
6.12k
    auto local_state = LocalStateType::create_unique(this, state);
495
6.12k
    RETURN_IF_ERROR(local_state->init(state, info));
496
6.12k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
6.12k
    return Status::OK();
498
6.12k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
7.75k
                                                            LocalSinkStateInfo& info) {
494
7.75k
    auto local_state = LocalStateType::create_unique(this, state);
495
7.75k
    RETURN_IF_ERROR(local_state->init(state, info));
496
7.75k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
7.75k
    return Status::OK();
498
7.75k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.34k
                                                            LocalSinkStateInfo& info) {
494
2.34k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.34k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.34k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.34k
    return Status::OK();
498
2.34k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
323
                                                            LocalSinkStateInfo& info) {
494
323
    auto local_state = LocalStateType::create_unique(this, state);
495
323
    RETURN_IF_ERROR(local_state->init(state, info));
496
323
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
323
    return Status::OK();
498
323
}
_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.54k
                                                            LocalSinkStateInfo& info) {
494
2.54k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.54k
    return Status::OK();
498
2.54k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.42k
                                                            LocalSinkStateInfo& info) {
494
2.42k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.42k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.42k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.42k
    return Status::OK();
498
2.42k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.46k
                                                            LocalSinkStateInfo& info) {
494
2.46k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.46k
    return Status::OK();
498
2.46k
}
_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
366
                                                            LocalSinkStateInfo& info) {
494
366
    auto local_state = LocalStateType::create_unique(this, state);
495
366
    RETURN_IF_ERROR(local_state->init(state, info));
496
366
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
366
    return Status::OK();
498
366
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
106
                                                            LocalSinkStateInfo& info) {
494
106
    auto local_state = LocalStateType::create_unique(this, state);
495
106
    RETURN_IF_ERROR(local_state->init(state, info));
496
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
106
    return Status::OK();
498
106
}
_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.50M
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.50M
    } else {
509
1.50M
        auto ss = LocalStateType::SharedStateType::create_shared();
510
1.50M
        ss->id = operator_id();
511
1.50M
        for (auto& dest : dests_id()) {
512
1.50M
            ss->related_op_ids.insert(dest);
513
1.50M
        }
514
1.50M
        return ss;
515
1.50M
    }
516
1.50M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
169k
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
169k
    } else {
509
169k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
169k
        ss->id = operator_id();
511
169k
        for (auto& dest : dests_id()) {
512
169k
            ss->related_op_ids.insert(dest);
513
169k
        }
514
169k
        return ss;
515
169k
    }
516
169k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
347k
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
347k
    } else {
509
347k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
347k
        ss->id = operator_id();
511
347k
        for (auto& dest : dests_id()) {
512
346k
            ss->related_op_ids.insert(dest);
513
346k
        }
514
347k
        return ss;
515
347k
    }
516
347k
}
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.7k
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.7k
    } else {
509
65.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
65.7k
        ss->id = operator_id();
511
65.7k
        for (auto& dest : dests_id()) {
512
65.5k
            ss->related_op_ids.insert(dest);
513
65.5k
        }
514
65.7k
        return ss;
515
65.7k
    }
516
65.7k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
501
15
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
15
    } else {
509
15
        auto ss = LocalStateType::SharedStateType::create_shared();
510
15
        ss->id = operator_id();
511
15
        for (auto& dest : dests_id()) {
512
15
            ss->related_op_ids.insert(dest);
513
15
        }
514
15
        return ss;
515
15
    }
516
15
}
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
7.29k
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
7.29k
    } else {
509
7.29k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
7.29k
        ss->id = operator_id();
511
7.29k
        for (auto& dest : dests_id()) {
512
7.29k
            ss->related_op_ids.insert(dest);
513
7.29k
        }
514
7.29k
        return ss;
515
7.29k
    }
516
7.29k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
12
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
12
    } else {
509
12
        auto ss = LocalStateType::SharedStateType::create_shared();
510
12
        ss->id = operator_id();
511
12
        for (auto& dest : dests_id()) {
512
12
            ss->related_op_ids.insert(dest);
513
12
        }
514
12
        return ss;
515
12
    }
516
12
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
205k
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
205k
    } else {
509
205k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
205k
        ss->id = operator_id();
511
205k
        for (auto& dest : dests_id()) {
512
204k
            ss->related_op_ids.insert(dest);
513
204k
        }
514
205k
        return ss;
515
205k
    }
516
205k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
23
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
23
    } else {
509
23
        auto ss = LocalStateType::SharedStateType::create_shared();
510
23
        ss->id = operator_id();
511
23
        for (auto& dest : dests_id()) {
512
23
            ss->related_op_ids.insert(dest);
513
23
        }
514
23
        return ss;
515
23
    }
516
23
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
120k
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
120k
    } else {
509
120k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
120k
        ss->id = operator_id();
511
120k
        for (auto& dest : dests_id()) {
512
120k
            ss->related_op_ids.insert(dest);
513
120k
        }
514
120k
        return ss;
515
120k
    }
516
120k
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
324
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
324
    } else {
509
324
        auto ss = LocalStateType::SharedStateType::create_shared();
510
324
        ss->id = operator_id();
511
324
        for (auto& dest : dests_id()) {
512
324
            ss->related_op_ids.insert(dest);
513
324
        }
514
324
        return ss;
515
324
    }
516
324
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
580k
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
580k
    } else {
509
580k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
580k
        ss->id = operator_id();
511
580k
        for (auto& dest : dests_id()) {
512
577k
            ss->related_op_ids.insert(dest);
513
577k
        }
514
580k
        return ss;
515
580k
    }
516
580k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
6.13k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
6.13k
    } else {
509
6.13k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
6.13k
        ss->id = operator_id();
511
6.13k
        for (auto& dest : dests_id()) {
512
6.12k
            ss->related_op_ids.insert(dest);
513
6.12k
        }
514
6.13k
        return ss;
515
6.13k
    }
516
6.13k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
425
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
425
    } else {
509
425
        auto ss = LocalStateType::SharedStateType::create_shared();
510
425
        ss->id = operator_id();
511
425
        for (auto& dest : dests_id()) {
512
424
            ss->related_op_ids.insert(dest);
513
424
        }
514
425
        return ss;
515
425
    }
516
425
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
501
2.43k
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.43k
    } else {
509
2.43k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.43k
        ss->id = operator_id();
511
2.43k
        for (auto& dest : dests_id()) {
512
2.42k
            ss->related_op_ids.insert(dest);
513
2.42k
        }
514
2.43k
        return ss;
515
2.43k
    }
516
2.43k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
501
2.49k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
2.49k
    } else {
509
2.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.49k
        ss->id = operator_id();
511
2.49k
        for (auto& dest : dests_id()) {
512
2.47k
            ss->related_op_ids.insert(dest);
513
2.47k
        }
514
2.49k
        return ss;
515
2.49k
    }
516
2.49k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
163
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
163
    } else {
509
163
        auto ss = LocalStateType::SharedStateType::create_shared();
510
163
        ss->id = operator_id();
511
163
        for (auto& dest : dests_id()) {
512
163
            ss->related_op_ids.insert(dest);
513
163
        }
514
163
        return ss;
515
163
    }
516
163
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
106
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
106
    } else {
509
106
        auto ss = LocalStateType::SharedStateType::create_shared();
510
106
        ss->id = operator_id();
511
106
        for (auto& dest : dests_id()) {
512
106
            ss->related_op_ids.insert(dest);
513
106
        }
514
106
        return ss;
515
106
    }
516
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
517
518
template <typename LocalStateType>
519
2.38M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.38M
    auto local_state = LocalStateType::create_unique(state, this);
521
2.38M
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.38M
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.38M
    return Status::OK();
524
2.38M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
133k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
133k
    auto local_state = LocalStateType::create_unique(state, this);
521
133k
    RETURN_IF_ERROR(local_state->init(state, info));
522
133k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
133k
    return Status::OK();
524
133k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
308k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
308k
    auto local_state = LocalStateType::create_unique(state, this);
521
308k
    RETURN_IF_ERROR(local_state->init(state, info));
522
308k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
308k
    return Status::OK();
524
308k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
76
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
76
    auto local_state = LocalStateType::create_unique(state, this);
521
76
    RETURN_IF_ERROR(local_state->init(state, info));
522
76
    state->emplace_local_state(operator_id(), std::move(local_state));
523
76
    return Status::OK();
524
76
}
_ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
4
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
4
    auto local_state = LocalStateType::create_unique(state, this);
521
4
    RETURN_IF_ERROR(local_state->init(state, info));
522
4
    state->emplace_local_state(operator_id(), std::move(local_state));
523
4
    return Status::OK();
524
4
}
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.66k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.66k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.66k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.66k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.66k
    return Status::OK();
524
2.66k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
7.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
7.22k
    auto local_state = LocalStateType::create_unique(state, this);
521
7.22k
    RETURN_IF_ERROR(local_state->init(state, info));
522
7.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
7.22k
    return Status::OK();
524
7.22k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
9.51k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
9.51k
    auto local_state = LocalStateType::create_unique(state, this);
521
9.51k
    RETURN_IF_ERROR(local_state->init(state, info));
522
9.51k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
9.51k
    return Status::OK();
524
9.51k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
18
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
18
    auto local_state = LocalStateType::create_unique(state, this);
521
18
    RETURN_IF_ERROR(local_state->init(state, info));
522
18
    state->emplace_local_state(operator_id(), std::move(local_state));
523
18
    return Status::OK();
524
18
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
193k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
193k
    auto local_state = LocalStateType::create_unique(state, this);
521
193k
    RETURN_IF_ERROR(local_state->init(state, info));
522
193k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
193k
    return Status::OK();
524
193k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
120k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
120k
    auto local_state = LocalStateType::create_unique(state, this);
521
120k
    RETURN_IF_ERROR(local_state->init(state, info));
522
120k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
120k
    return Status::OK();
524
120k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
319
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
319
    auto local_state = LocalStateType::create_unique(state, this);
521
319
    RETURN_IF_ERROR(local_state->init(state, info));
522
319
    state->emplace_local_state(operator_id(), std::move(local_state));
523
319
    return Status::OK();
524
319
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
3.46k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
3.46k
    auto local_state = LocalStateType::create_unique(state, this);
521
3.46k
    RETURN_IF_ERROR(local_state->init(state, info));
522
3.46k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
3.46k
    return Status::OK();
524
3.46k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
404k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
404k
    auto local_state = LocalStateType::create_unique(state, this);
521
404k
    RETURN_IF_ERROR(local_state->init(state, info));
522
404k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
404k
    return Status::OK();
524
404k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.10k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.10k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.10k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.10k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.10k
    return Status::OK();
524
1.10k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
6.09k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
6.09k
    auto local_state = LocalStateType::create_unique(state, this);
521
6.09k
    RETURN_IF_ERROR(local_state->init(state, info));
522
6.09k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
6.09k
    return Status::OK();
524
6.09k
}
_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.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.48k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.48k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.48k
    return Status::OK();
524
1.48k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
39.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
39.8k
    auto local_state = LocalStateType::create_unique(state, this);
521
39.8k
    RETURN_IF_ERROR(local_state->init(state, info));
522
39.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
39.8k
    return Status::OK();
524
39.8k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
6.62k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
6.62k
    auto local_state = LocalStateType::create_unique(state, this);
521
6.62k
    RETURN_IF_ERROR(local_state->init(state, info));
522
6.62k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
6.62k
    return Status::OK();
524
6.62k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
323
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
323
    auto local_state = LocalStateType::create_unique(state, this);
521
323
    RETURN_IF_ERROR(local_state->init(state, info));
522
323
    state->emplace_local_state(operator_id(), std::move(local_state));
523
323
    return Status::OK();
524
323
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.36k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.36k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.36k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.36k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.36k
    return Status::OK();
524
2.36k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.35k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.35k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.35k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.35k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.35k
    return Status::OK();
524
2.35k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
267
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
267
    auto local_state = LocalStateType::create_unique(state, this);
521
267
    RETURN_IF_ERROR(local_state->init(state, info));
522
267
    state->emplace_local_state(operator_id(), std::move(local_state));
523
267
    return Status::OK();
524
267
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.54k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.54k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.54k
    return Status::OK();
524
1.54k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
5.29k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
5.29k
    auto local_state = LocalStateType::create_unique(state, this);
521
5.29k
    RETURN_IF_ERROR(local_state->init(state, info));
522
5.29k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
5.29k
    return Status::OK();
524
5.29k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
667k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
667k
    auto local_state = LocalStateType::create_unique(state, this);
521
667k
    RETURN_IF_ERROR(local_state->init(state, info));
522
667k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
667k
    return Status::OK();
524
667k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
365
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
365
    auto local_state = LocalStateType::create_unique(state, this);
521
365
    RETURN_IF_ERROR(local_state->init(state, info));
522
365
    state->emplace_local_state(operator_id(), std::move(local_state));
523
365
    return Status::OK();
524
365
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
150
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
150
    auto local_state = LocalStateType::create_unique(state, this);
521
150
    RETURN_IF_ERROR(local_state->init(state, info));
522
150
    state->emplace_local_state(operator_id(), std::move(local_state));
523
150
    return Status::OK();
524
150
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.85k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.85k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.85k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.85k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.85k
    return Status::OK();
524
1.85k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
671
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
671
    auto local_state = LocalStateType::create_unique(state, this);
521
671
    RETURN_IF_ERROR(local_state->init(state, info));
522
671
    state->emplace_local_state(operator_id(), std::move(local_state));
523
671
    return Status::OK();
524
671
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
909
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
909
    auto local_state = LocalStateType::create_unique(state, this);
521
909
    RETURN_IF_ERROR(local_state->init(state, info));
522
909
    state->emplace_local_state(operator_id(), std::move(local_state));
523
909
    return Status::OK();
524
909
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
7.86k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
7.86k
    auto local_state = LocalStateType::create_unique(state, this);
521
7.86k
    RETURN_IF_ERROR(local_state->init(state, info));
522
7.86k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
7.86k
    return Status::OK();
524
7.86k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
458k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
458k
    auto local_state = LocalStateType::create_unique(state, this);
521
458k
    RETURN_IF_ERROR(local_state->init(state, info));
522
458k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
458k
    return Status::OK();
524
458k
}
525
526
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
527
                                                         RuntimeState* state)
528
1.85M
        : _parent(parent), _state(state) {}
529
530
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
531
2.38M
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
532
533
template <typename SharedStateArg>
534
2.38M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
2.38M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
2.38M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
2.38M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
2.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
2.38M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
2.38M
    _operator_profile->add_child(_common_profile.get(), true);
543
2.38M
    _operator_profile->add_child(_custom_profile.get(), true);
544
2.38M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
2.38M
    if constexpr (!is_fake_shared) {
546
1.19M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
676k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
676k
                                    .first.get()
549
676k
                                    ->template cast<SharedStateArg>();
550
551
676k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
676k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
676k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
676k
        } else if (info.shared_state) {
555
461k
            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
461k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
461k
            _dependency = _shared_state->create_source_dependency(
562
461k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
461k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
461k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
461k
        } else {
566
52.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
3.56k
                DCHECK(false);
568
3.56k
            }
569
52.7k
        }
570
1.19M
    }
571
572
2.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
2.38M
    _rows_returned_counter =
577
2.38M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
2.38M
    _blocks_returned_counter =
579
2.38M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
2.38M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
2.38M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
2.38M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
2.38M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
2.38M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
2.38M
    _memory_used_counter =
586
2.38M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
2.38M
    _common_profile->add_info_string("IsColocate",
588
2.38M
                                     std::to_string(_parent->is_colocated_operator()));
589
2.38M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
2.38M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
2.38M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
2.38M
    return Status::OK();
593
2.38M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
133k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
133k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
133k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
133k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
133k
    _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
133k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
133k
    _operator_profile->add_child(_common_profile.get(), true);
543
133k
    _operator_profile->add_child(_custom_profile.get(), true);
544
133k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
133k
    if constexpr (!is_fake_shared) {
546
133k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
11.7k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
11.7k
                                    .first.get()
549
11.7k
                                    ->template cast<SharedStateArg>();
550
551
11.7k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
11.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
11.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
122k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
120k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
120k
            _dependency = _shared_state->create_source_dependency(
562
120k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
120k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
120k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
120k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
1.33k
        }
570
133k
    }
571
572
133k
    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
133k
    _rows_returned_counter =
577
133k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
133k
    _blocks_returned_counter =
579
133k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
133k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
133k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
133k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
133k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
133k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
133k
    _memory_used_counter =
586
133k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
133k
    _common_profile->add_info_string("IsColocate",
588
133k
                                     std::to_string(_parent->is_colocated_operator()));
589
133k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
133k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
133k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
133k
    return Status::OK();
593
133k
}
_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
202k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
202k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
202k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
202k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
202k
    _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
202k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
202k
    _operator_profile->add_child(_common_profile.get(), true);
543
202k
    _operator_profile->add_child(_custom_profile.get(), true);
544
202k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
202k
    if constexpr (!is_fake_shared) {
546
202k
        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
202k
        } 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
9.50k
        }
570
202k
    }
571
572
202k
    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
202k
    _rows_returned_counter =
577
202k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
202k
    _blocks_returned_counter =
579
202k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
202k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
202k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
202k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
202k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
202k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
202k
    _memory_used_counter =
586
202k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
202k
    _common_profile->add_info_string("IsColocate",
588
202k
                                     std::to_string(_parent->is_colocated_operator()));
589
202k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
202k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
202k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
202k
    return Status::OK();
593
202k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
18
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
18
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
18
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
18
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
18
    _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
18
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
18
    _operator_profile->add_child(_common_profile.get(), true);
543
18
    _operator_profile->add_child(_custom_profile.get(), true);
544
18
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
18
    if constexpr (!is_fake_shared) {
546
18
        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
18
        } 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
18
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
18
            _dependency = _shared_state->create_source_dependency(
562
18
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
18
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
18
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
18
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
18
    }
571
572
18
    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
18
    _rows_returned_counter =
577
18
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
18
    _blocks_returned_counter =
579
18
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
18
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
18
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
18
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
18
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
18
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
18
    _memory_used_counter =
586
18
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
18
    _common_profile->add_info_string("IsColocate",
588
18
                                     std::to_string(_parent->is_colocated_operator()));
589
18
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
18
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
18
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
18
    return Status::OK();
593
18
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
6.07k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
6.07k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
6.07k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
6.07k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
6.07k
    _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.07k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
6.07k
    _operator_profile->add_child(_common_profile.get(), true);
543
6.07k
    _operator_profile->add_child(_custom_profile.get(), true);
544
6.07k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
6.07k
    if constexpr (!is_fake_shared) {
546
6.07k
        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.07k
        } 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.04k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
6.04k
            _dependency = _shared_state->create_source_dependency(
562
6.04k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
6.04k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
6.04k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
6.04k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
25
        }
570
6.07k
    }
571
572
6.07k
    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.07k
    _rows_returned_counter =
577
6.07k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
6.07k
    _blocks_returned_counter =
579
6.07k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
6.07k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
6.07k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
6.07k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
6.07k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
6.07k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
6.07k
    _memory_used_counter =
586
6.07k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
6.07k
    _common_profile->add_info_string("IsColocate",
588
6.07k
                                     std::to_string(_parent->is_colocated_operator()));
589
6.07k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
6.07k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
6.07k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
6.07k
    return Status::OK();
593
6.07k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
7.24k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
7.24k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
7.24k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
7.24k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
7.24k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
7.24k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
7.24k
    _operator_profile->add_child(_common_profile.get(), true);
543
7.24k
    _operator_profile->add_child(_custom_profile.get(), true);
544
7.24k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
7.24k
    if constexpr (!is_fake_shared) {
546
7.24k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
7.24k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
7.16k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
7.16k
            _dependency = _shared_state->create_source_dependency(
562
7.16k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
7.16k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
7.16k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
7.16k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
81
        }
570
7.24k
    }
571
572
7.24k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
7.24k
    _rows_returned_counter =
577
7.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
7.24k
    _blocks_returned_counter =
579
7.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
7.24k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
7.24k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
7.24k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
7.24k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
7.24k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
7.24k
    _memory_used_counter =
586
7.24k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
7.24k
    _common_profile->add_info_string("IsColocate",
588
7.24k
                                     std::to_string(_parent->is_colocated_operator()));
589
7.24k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
7.24k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
7.24k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
7.24k
    return Status::OK();
593
7.24k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
120k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
120k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
120k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
120k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
120k
    _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
120k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
120k
    _operator_profile->add_child(_common_profile.get(), true);
543
120k
    _operator_profile->add_child(_custom_profile.get(), true);
544
120k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
120k
    if constexpr (!is_fake_shared) {
546
120k
        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
120k
        } 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
118k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
118k
            _dependency = _shared_state->create_source_dependency(
562
118k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
118k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
118k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
118k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
1.76k
        }
570
120k
    }
571
572
120k
    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
120k
    _rows_returned_counter =
577
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
120k
    _blocks_returned_counter =
579
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
120k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
120k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
120k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
120k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
120k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
120k
    _memory_used_counter =
586
120k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
120k
    _common_profile->add_info_string("IsColocate",
588
120k
                                     std::to_string(_parent->is_colocated_operator()));
589
120k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
120k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
120k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
120k
    return Status::OK();
593
120k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
319
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
319
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
319
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
319
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
319
    _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
319
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
319
    _operator_profile->add_child(_common_profile.get(), true);
543
319
    _operator_profile->add_child(_custom_profile.get(), true);
544
319
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
319
    if constexpr (!is_fake_shared) {
546
319
        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
319
        } 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
319
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
319
            _dependency = _shared_state->create_source_dependency(
562
319
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
319
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
319
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
319
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
319
    }
571
572
319
    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
319
    _rows_returned_counter =
577
319
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
319
    _blocks_returned_counter =
579
319
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
319
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
319
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
319
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
319
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
319
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
319
    _memory_used_counter =
586
319
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
319
    _common_profile->add_info_string("IsColocate",
588
319
                                     std::to_string(_parent->is_colocated_operator()));
589
319
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
319
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
319
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
319
    return Status::OK();
593
319
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
1.19M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
1.19M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
1.19M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
1.19M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
1.19M
    _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.19M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
1.19M
    _operator_profile->add_child(_common_profile.get(), true);
543
1.19M
    _operator_profile->add_child(_custom_profile.get(), true);
544
1.19M
    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.19M
    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.19M
    _rows_returned_counter =
577
1.19M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
1.19M
    _blocks_returned_counter =
579
1.19M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
1.19M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
1.19M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
1.19M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
1.19M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
1.19M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
1.19M
    _memory_used_counter =
586
1.19M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
1.19M
    _common_profile->add_info_string("IsColocate",
588
1.19M
                                     std::to_string(_parent->is_colocated_operator()));
589
1.19M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
1.19M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
1.19M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
1.19M
    return Status::OK();
593
1.19M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
39.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
39.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
39.7k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
39.7k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
39.7k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
39.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
39.7k
    _operator_profile->add_child(_common_profile.get(), true);
543
39.7k
    _operator_profile->add_child(_custom_profile.get(), true);
544
39.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
39.7k
    if constexpr (!is_fake_shared) {
546
39.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
39.7k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
3.67k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
3.67k
            _dependency = _shared_state->create_source_dependency(
562
3.67k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
3.67k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
3.67k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
36.0k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
36.0k
        }
570
39.7k
    }
571
572
39.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
39.7k
    _rows_returned_counter =
577
39.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
39.7k
    _blocks_returned_counter =
579
39.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
39.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
39.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
39.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
39.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
39.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
39.7k
    _memory_used_counter =
586
39.7k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
39.7k
    _common_profile->add_info_string("IsColocate",
588
39.7k
                                     std::to_string(_parent->is_colocated_operator()));
589
39.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
39.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
39.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
39.7k
    return Status::OK();
593
39.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
367
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
367
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
367
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
367
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
367
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
367
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
367
    _operator_profile->add_child(_common_profile.get(), true);
543
367
    _operator_profile->add_child(_custom_profile.get(), true);
544
367
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
367
    if constexpr (!is_fake_shared) {
546
367
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
368
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
368
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
368
            _dependency = _shared_state->create_source_dependency(
562
368
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
368
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
368
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
18.4E
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
18.4E
        }
570
367
    }
571
572
368
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
367
    _rows_returned_counter =
577
367
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
367
    _blocks_returned_counter =
579
367
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
367
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
367
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
367
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
367
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
367
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
367
    _memory_used_counter =
586
367
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
367
    _common_profile->add_info_string("IsColocate",
588
367
                                     std::to_string(_parent->is_colocated_operator()));
589
367
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
367
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
367
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
367
    return Status::OK();
593
367
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
6.62k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
6.62k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
6.62k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
6.62k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
6.62k
    _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.62k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
6.62k
    _operator_profile->add_child(_common_profile.get(), true);
543
6.62k
    _operator_profile->add_child(_custom_profile.get(), true);
544
6.62k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
6.62k
    if constexpr (!is_fake_shared) {
546
6.62k
        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.62k
        } 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.61k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
6.61k
            _dependency = _shared_state->create_source_dependency(
562
6.61k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
6.61k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
6.61k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
6.61k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
4
        }
570
6.62k
    }
571
572
6.62k
    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.62k
    _rows_returned_counter =
577
6.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
6.62k
    _blocks_returned_counter =
579
6.62k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
6.62k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
6.62k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
6.62k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
6.62k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
6.62k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
6.62k
    _memory_used_counter =
586
6.62k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
6.62k
    _common_profile->add_info_string("IsColocate",
588
6.62k
                                     std::to_string(_parent->is_colocated_operator()));
589
6.62k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
6.62k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
6.62k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
6.62k
    return Status::OK();
593
6.62k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
424
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
424
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
424
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
424
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
424
    _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
424
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
424
    _operator_profile->add_child(_common_profile.get(), true);
543
424
    _operator_profile->add_child(_custom_profile.get(), true);
544
424
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
424
    if constexpr (!is_fake_shared) {
546
424
        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
424
        } 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
420
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
420
            _dependency = _shared_state->create_source_dependency(
562
420
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
420
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
420
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
420
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
4
        }
570
424
    }
571
572
424
    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
424
    _rows_returned_counter =
577
424
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
424
    _blocks_returned_counter =
579
424
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
424
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
424
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
424
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
424
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
424
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
424
    _memory_used_counter =
586
424
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
424
    _common_profile->add_info_string("IsColocate",
588
424
                                     std::to_string(_parent->is_colocated_operator()));
589
424
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
424
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
424
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
424
    return Status::OK();
593
424
}
_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.43k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
4.43k
            _dependency = _shared_state->create_source_dependency(
562
4.43k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
4.43k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
4.43k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
4.43k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
403
        }
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
668k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
668k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
668k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
668k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
668k
    _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
668k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
668k
    _operator_profile->add_child(_common_profile.get(), true);
543
668k
    _operator_profile->add_child(_custom_profile.get(), true);
544
668k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
668k
    if constexpr (!is_fake_shared) {
546
668k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
664k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
664k
                                    .first.get()
549
664k
                                    ->template cast<SharedStateArg>();
550
551
664k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
664k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
664k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
664k
        } 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
3.56k
        } else {
566
3.56k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
3.56k
                DCHECK(false);
568
3.56k
            }
569
3.56k
        }
570
668k
    }
571
572
668k
    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
668k
    _rows_returned_counter =
577
668k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
668k
    _blocks_returned_counter =
579
668k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
668k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
668k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
668k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
668k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
668k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
668k
    _memory_used_counter =
586
668k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
668k
    _common_profile->add_info_string("IsColocate",
588
668k
                                     std::to_string(_parent->is_colocated_operator()));
589
668k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
668k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
668k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
668k
    return Status::OK();
593
668k
}
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.40M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
2.40M
    _conjuncts.resize(_parent->_conjuncts.size());
598
2.40M
    _projections.resize(_parent->_projections.size());
599
2.73M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
326k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
326k
    }
602
4.94M
    for (size_t i = 0; i < _projections.size(); i++) {
603
2.53M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
2.53M
    }
605
2.40M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
2.41M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
6.07k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
40.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
34.6k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
34.6k
                    state, _intermediate_projections[i][j]));
611
34.6k
        }
612
6.07k
    }
613
2.40M
    return Status::OK();
614
2.40M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
133k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
133k
    _conjuncts.resize(_parent->_conjuncts.size());
598
133k
    _projections.resize(_parent->_projections.size());
599
135k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.47k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.47k
    }
602
708k
    for (size_t i = 0; i < _projections.size(); i++) {
603
574k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
574k
    }
605
133k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
134k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
825
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
8.14k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
7.31k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
7.31k
                    state, _intermediate_projections[i][j]));
611
7.31k
        }
612
825
    }
613
133k
    return Status::OK();
614
133k
}
_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
206k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
206k
    _conjuncts.resize(_parent->_conjuncts.size());
598
206k
    _projections.resize(_parent->_projections.size());
599
206k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
227k
    for (size_t i = 0; i < _projections.size(); i++) {
603
21.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
21.4k
    }
605
206k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
206k
    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
206k
    return Status::OK();
614
206k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
18
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
18
    _conjuncts.resize(_parent->_conjuncts.size());
598
18
    _projections.resize(_parent->_projections.size());
599
18
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
18
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
18
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
18
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
18
    return Status::OK();
614
18
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
6.14k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
6.14k
    _conjuncts.resize(_parent->_conjuncts.size());
598
6.14k
    _projections.resize(_parent->_projections.size());
599
6.22k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
85
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
85
    }
602
30.0k
    for (size_t i = 0; i < _projections.size(); i++) {
603
23.9k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
23.9k
    }
605
6.14k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
6.14k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
8
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
57
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
49
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
49
                    state, _intermediate_projections[i][j]));
611
49
        }
612
8
    }
613
6.14k
    return Status::OK();
614
6.14k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
7.30k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
7.30k
    _conjuncts.resize(_parent->_conjuncts.size());
598
7.30k
    _projections.resize(_parent->_projections.size());
599
7.93k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
630
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
630
    }
602
18.6k
    for (size_t i = 0; i < _projections.size(); i++) {
603
11.3k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
11.3k
    }
605
7.30k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
7.47k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
167
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.25k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
1.08k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
1.08k
                    state, _intermediate_projections[i][j]));
611
1.08k
        }
612
167
    }
613
7.30k
    return Status::OK();
614
7.30k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
120k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
120k
    _conjuncts.resize(_parent->_conjuncts.size());
598
120k
    _projections.resize(_parent->_projections.size());
599
122k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.59k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.59k
    }
602
430k
    for (size_t i = 0; i < _projections.size(); i++) {
603
309k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
309k
    }
605
120k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
120k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
168
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.30k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
1.13k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
1.13k
                    state, _intermediate_projections[i][j]));
611
1.13k
        }
612
168
    }
613
120k
    return Status::OK();
614
120k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
323
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
323
    _conjuncts.resize(_parent->_conjuncts.size());
598
323
    _projections.resize(_parent->_projections.size());
599
323
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
775
    for (size_t i = 0; i < _projections.size(); i++) {
603
452
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
452
    }
605
323
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
323
    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
323
    return Status::OK();
614
323
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
1.20M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
1.20M
    _conjuncts.resize(_parent->_conjuncts.size());
598
1.20M
    _projections.resize(_parent->_projections.size());
599
1.52M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
322k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
322k
    }
602
2.70M
    for (size_t i = 0; i < _projections.size(); i++) {
603
1.49M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
1.49M
    }
605
1.20M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
1.21M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
4.90k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
29.9k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
25.0k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
25.0k
                    state, _intermediate_projections[i][j]));
611
25.0k
        }
612
4.90k
    }
613
1.20M
    return Status::OK();
614
1.20M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
39.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
39.8k
    _conjuncts.resize(_parent->_conjuncts.size());
598
39.8k
    _projections.resize(_parent->_projections.size());
599
39.8k
    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.4k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
92.4k
    }
605
39.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
39.8k
    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.8k
    return Status::OK();
614
39.8k
}
_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.63k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
6.63k
    _conjuncts.resize(_parent->_conjuncts.size());
598
6.63k
    _projections.resize(_parent->_projections.size());
599
7.36k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
729
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
729
    }
602
6.63k
    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.63k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
6.63k
    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.63k
    return Status::OK();
614
6.63k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
424
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
424
    _conjuncts.resize(_parent->_conjuncts.size());
598
424
    _projections.resize(_parent->_projections.size());
599
424
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
424
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
424
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
424
    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
424
    return Status::OK();
614
424
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
4.95k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
4.95k
    _conjuncts.resize(_parent->_conjuncts.size());
598
4.95k
    _projections.resize(_parent->_projections.size());
599
4.95k
    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.95k
    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.95k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
4.95k
    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.95k
    return Status::OK();
614
4.95k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
675k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
675k
    _conjuncts.resize(_parent->_conjuncts.size());
598
675k
    _projections.resize(_parent->_projections.size());
599
675k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
675k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
675k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
675k
    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
675k
    return Status::OK();
614
675k
}
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.31k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
7.31k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
7.31k
    _terminated = true;
622
7.31k
    return Status::OK();
623
7.31k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
451
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
451
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
451
    _terminated = true;
622
451
    return Status::OK();
623
451
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
157
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
157
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
157
    _terminated = true;
622
157
    return Status::OK();
623
157
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
34
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
34
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
34
    _terminated = true;
622
34
    return Status::OK();
623
34
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
1.37k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
1.37k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
1.37k
    _terminated = true;
622
1.37k
    return Status::OK();
623
1.37k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
3.97k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
3.97k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
3.97k
    _terminated = true;
622
3.97k
    return Status::OK();
623
3.97k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_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_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
47
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
47
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
47
    _terminated = true;
622
47
    return Status::OK();
623
47
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
363
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
363
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
363
    _terminated = true;
622
363
    return Status::OK();
623
363
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
891
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
891
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
891
    _terminated = true;
622
891
    return Status::OK();
623
891
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
16
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
16
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
16
    _terminated = true;
622
16
    return Status::OK();
623
16
}
624
625
template <typename SharedStateArg>
626
2.64M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
2.64M
    if (_closed) {
628
231k
        return Status::OK();
629
231k
    }
630
2.41M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
1.20M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
1.20M
    }
633
2.41M
    _closed = true;
634
2.41M
    return Status::OK();
635
2.64M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
134k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
134k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
134k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
134k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
134k
    }
633
134k
    _closed = true;
634
134k
    return Status::OK();
635
134k
}
_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
410k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
410k
    if (_closed) {
628
205k
        return Status::OK();
629
205k
    }
630
205k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
205k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
205k
    }
633
205k
    _closed = true;
634
205k
    return Status::OK();
635
410k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
18
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
18
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
18
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
18
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
18
    }
633
18
    _closed = true;
634
18
    return Status::OK();
635
18
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
6.14k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
6.14k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
6.14k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
6.14k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
6.14k
    }
633
6.14k
    _closed = true;
634
6.14k
    return Status::OK();
635
6.14k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
14.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
14.7k
    if (_closed) {
628
7.41k
        return Status::OK();
629
7.41k
    }
630
7.29k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
7.29k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
7.29k
    }
633
7.29k
    _closed = true;
634
7.29k
    return Status::OK();
635
14.7k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
120k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
120k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
120k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
120k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
120k
    }
633
120k
    _closed = true;
634
120k
    return Status::OK();
635
120k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
318
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
318
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
318
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
318
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
318
    }
633
318
    _closed = true;
634
318
    return Status::OK();
635
318
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
1.22M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
1.22M
    if (_closed) {
628
13.2k
        return Status::OK();
629
13.2k
    }
630
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
    }
633
1.20M
    _closed = true;
634
1.20M
    return Status::OK();
635
1.22M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
39.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
39.8k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
39.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
39.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
39.8k
    }
633
39.8k
    _closed = true;
634
39.8k
    return Status::OK();
635
39.8k
}
_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.59k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
6.59k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
6.59k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
6.59k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
6.59k
    }
633
6.59k
    _closed = true;
634
6.59k
    return Status::OK();
635
6.59k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
645
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
645
    if (_closed) {
628
323
        return Status::OK();
629
323
    }
630
322
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
322
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
322
    }
633
322
    _closed = true;
634
322
    return Status::OK();
635
645
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
10.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
10.1k
    if (_closed) {
628
5.23k
        return Status::OK();
629
5.23k
    }
630
4.95k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
4.95k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
4.95k
    }
633
4.95k
    _closed = true;
634
4.95k
    return Status::OK();
635
10.1k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
677k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
677k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
677k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
677k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
677k
    }
633
677k
    _closed = true;
634
677k
    return Status::OK();
635
677k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
308
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
308
    if (_closed) {
628
158
        return Status::OK();
629
158
    }
630
150
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
150
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
150
    }
633
150
    _closed = true;
634
150
    return Status::OK();
635
308
}
636
637
template <typename SharedState>
638
1.85M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
1.85M
    _operator_profile =
641
1.85M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
1.85M
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
1.85M
    _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.85M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
1.85M
    _operator_profile->add_child(_common_profile, true);
650
1.85M
    _operator_profile->add_child(_custom_profile, true);
651
652
1.85M
    _operator_profile->set_metadata(_parent->node_id());
653
1.85M
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
1.85M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
1.85M
    if constexpr (!is_fake_shared) {
656
1.27M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
1.27M
            info.shared_state_map.end()) {
658
328k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
315k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
315k
            }
661
328k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
328k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
328k
                                                  ? 0
664
328k
                                                  : info.task_idx]
665
328k
                                  .get();
666
328k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
946k
        } else {
668
946k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
77
                DCHECK(false);
670
77
            }
671
946k
            _shared_state = info.shared_state->template cast<SharedState>();
672
946k
            _dependency = _shared_state->create_sink_dependency(
673
946k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
946k
        }
675
1.27M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
1.27M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
1.27M
    }
678
679
1.85M
    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.85M
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
1.85M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
1.85M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
1.85M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
1.85M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
1.85M
    _memory_used_counter =
689
1.85M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
1.85M
    _common_profile->add_info_string("IsColocate",
691
1.85M
                                     std::to_string(_parent->is_colocated_operator()));
692
1.85M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
1.85M
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
1.85M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
1.85M
    return Status::OK();
696
1.85M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
181k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
181k
    _operator_profile =
641
181k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
181k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
181k
    _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
181k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
181k
    _operator_profile->add_child(_common_profile, true);
650
181k
    _operator_profile->add_child(_custom_profile, true);
651
652
181k
    _operator_profile->set_metadata(_parent->node_id());
653
181k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
181k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
181k
    if constexpr (!is_fake_shared) {
656
181k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
181k
            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
11.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
11.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
11.7k
                                                  ? 0
664
11.7k
                                                  : info.task_idx]
665
11.7k
                                  .get();
666
11.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
170k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
170k
            _shared_state = info.shared_state->template cast<SharedState>();
672
170k
            _dependency = _shared_state->create_sink_dependency(
673
170k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
170k
        }
675
181k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
181k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
181k
    }
678
679
181k
    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
181k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
181k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
181k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
181k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
181k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
181k
    _memory_used_counter =
689
181k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
181k
    _common_profile->add_info_string("IsColocate",
691
181k
                                     std::to_string(_parent->is_colocated_operator()));
692
181k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
181k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
181k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
181k
    return Status::OK();
696
181k
}
_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
205k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
205k
    _operator_profile =
641
205k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
205k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
205k
    _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
205k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
205k
    _operator_profile->add_child(_common_profile, true);
650
205k
    _operator_profile->add_child(_custom_profile, true);
651
652
205k
    _operator_profile->set_metadata(_parent->node_id());
653
205k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
205k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
205k
    if constexpr (!is_fake_shared) {
656
205k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
205k
            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
205k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
205k
            _shared_state = info.shared_state->template cast<SharedState>();
672
205k
            _dependency = _shared_state->create_sink_dependency(
673
205k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
205k
        }
675
205k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
205k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
205k
    }
678
679
205k
    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
205k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
205k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
205k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
205k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
205k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
205k
    _memory_used_counter =
689
205k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
205k
    _common_profile->add_info_string("IsColocate",
691
205k
                                     std::to_string(_parent->is_colocated_operator()));
692
205k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
205k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
205k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
205k
    return Status::OK();
696
205k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
21
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
21
    _operator_profile =
641
21
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
21
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
21
    _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
21
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
21
    _operator_profile->add_child(_common_profile, true);
650
21
    _operator_profile->add_child(_custom_profile, true);
651
652
21
    _operator_profile->set_metadata(_parent->node_id());
653
21
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
21
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
21
    if constexpr (!is_fake_shared) {
656
21
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
21
            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
21
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
21
            _shared_state = info.shared_state->template cast<SharedState>();
672
21
            _dependency = _shared_state->create_sink_dependency(
673
21
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
21
        }
675
21
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
21
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
21
    }
678
679
21
    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
21
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
21
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
21
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
21
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
21
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
21
    _memory_used_counter =
689
21
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
21
    _common_profile->add_info_string("IsColocate",
691
21
                                     std::to_string(_parent->is_colocated_operator()));
692
21
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
21
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
21
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
21
    return Status::OK();
696
21
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
6.13k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
6.13k
    _operator_profile =
641
6.13k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
6.13k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
6.13k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
6.13k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
6.13k
    _operator_profile->add_child(_common_profile, true);
650
6.13k
    _operator_profile->add_child(_custom_profile, true);
651
652
6.13k
    _operator_profile->set_metadata(_parent->node_id());
653
6.13k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
6.13k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
6.13k
    if constexpr (!is_fake_shared) {
656
6.13k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
6.13k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
6.13k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
6.13k
            _shared_state = info.shared_state->template cast<SharedState>();
672
6.13k
            _dependency = _shared_state->create_sink_dependency(
673
6.13k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
6.13k
        }
675
6.13k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
6.13k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
6.13k
    }
678
679
6.13k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
6.13k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
6.13k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
6.13k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
6.13k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
6.13k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
6.13k
    _memory_used_counter =
689
6.13k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
6.13k
    _common_profile->add_info_string("IsColocate",
691
6.13k
                                     std::to_string(_parent->is_colocated_operator()));
692
6.13k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
6.13k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
6.13k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
6.13k
    return Status::OK();
696
6.13k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
7.28k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
7.28k
    _operator_profile =
641
7.28k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
7.28k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
7.28k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
7.28k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
7.28k
    _operator_profile->add_child(_common_profile, true);
650
7.28k
    _operator_profile->add_child(_custom_profile, true);
651
652
7.28k
    _operator_profile->set_metadata(_parent->node_id());
653
7.28k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
7.28k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
7.28k
    if constexpr (!is_fake_shared) {
656
7.28k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
7.28k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
7.28k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
7.28k
            _shared_state = info.shared_state->template cast<SharedState>();
672
7.28k
            _dependency = _shared_state->create_sink_dependency(
673
7.28k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
7.28k
        }
675
7.28k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
7.28k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
7.28k
    }
678
679
7.28k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
7.28k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
7.28k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
7.28k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
7.28k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
7.28k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
7.28k
    _memory_used_counter =
689
7.28k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
7.28k
    _common_profile->add_info_string("IsColocate",
691
7.28k
                                     std::to_string(_parent->is_colocated_operator()));
692
7.28k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
7.28k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
7.28k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
7.28k
    return Status::OK();
696
7.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
120k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
120k
    _operator_profile =
641
120k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
120k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
120k
    _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
120k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
120k
    _operator_profile->add_child(_common_profile, true);
650
120k
    _operator_profile->add_child(_custom_profile, true);
651
652
120k
    _operator_profile->set_metadata(_parent->node_id());
653
120k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
120k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
120k
    if constexpr (!is_fake_shared) {
656
120k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
120k
            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
120k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
120k
            _shared_state = info.shared_state->template cast<SharedState>();
672
120k
            _dependency = _shared_state->create_sink_dependency(
673
120k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
120k
        }
675
120k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
120k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
120k
    }
678
679
120k
    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
120k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
120k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
120k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
120k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
120k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
120k
    _memory_used_counter =
689
120k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
120k
    _common_profile->add_info_string("IsColocate",
691
120k
                                     std::to_string(_parent->is_colocated_operator()));
692
120k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
120k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
120k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
120k
    return Status::OK();
696
120k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
325
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
325
    _operator_profile =
641
325
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
325
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
325
    _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
325
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
325
    _operator_profile->add_child(_common_profile, true);
650
325
    _operator_profile->add_child(_custom_profile, true);
651
652
325
    _operator_profile->set_metadata(_parent->node_id());
653
325
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
325
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
325
    if constexpr (!is_fake_shared) {
656
325
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
325
            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
325
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
325
            _shared_state = info.shared_state->template cast<SharedState>();
672
325
            _dependency = _shared_state->create_sink_dependency(
673
325
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
325
        }
675
325
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
325
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
325
    }
678
679
325
    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
325
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
325
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
325
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
325
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
325
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
325
    _memory_used_counter =
689
325
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
325
    _common_profile->add_info_string("IsColocate",
691
325
                                     std::to_string(_parent->is_colocated_operator()));
692
325
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
325
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
325
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
325
    return Status::OK();
696
325
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
581k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
581k
    _operator_profile =
641
581k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
581k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
581k
    _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
581k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
581k
    _operator_profile->add_child(_common_profile, true);
650
581k
    _operator_profile->add_child(_custom_profile, true);
651
652
581k
    _operator_profile->set_metadata(_parent->node_id());
653
581k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
581k
    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
581k
    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
581k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
581k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
581k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
581k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
581k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
581k
    _memory_used_counter =
689
581k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
581k
    _common_profile->add_info_string("IsColocate",
691
581k
                                     std::to_string(_parent->is_colocated_operator()));
692
581k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
581k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
581k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
581k
    return Status::OK();
696
581k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
7.76k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
7.76k
    _operator_profile =
641
7.76k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
7.76k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
7.76k
    _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.76k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
7.76k
    _operator_profile->add_child(_common_profile, true);
650
7.76k
    _operator_profile->add_child(_custom_profile, true);
651
652
7.76k
    _operator_profile->set_metadata(_parent->node_id());
653
7.76k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
7.76k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
7.76k
    if constexpr (!is_fake_shared) {
656
7.76k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
7.76k
            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.76k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
7.76k
            _shared_state = info.shared_state->template cast<SharedState>();
672
7.76k
            _dependency = _shared_state->create_sink_dependency(
673
7.76k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
7.76k
        }
675
7.76k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
7.76k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
7.76k
    }
678
679
7.76k
    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.76k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
7.76k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
7.76k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
7.76k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
7.76k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
7.76k
    _memory_used_counter =
689
7.76k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
7.76k
    _common_profile->add_info_string("IsColocate",
691
7.76k
                                     std::to_string(_parent->is_colocated_operator()));
692
7.76k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
7.76k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
7.76k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
7.76k
    return Status::OK();
696
7.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
425
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
425
    _operator_profile =
641
425
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
425
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
425
    _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
425
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
425
    _operator_profile->add_child(_common_profile, true);
650
425
    _operator_profile->add_child(_custom_profile, true);
651
652
425
    _operator_profile->set_metadata(_parent->node_id());
653
425
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
425
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
425
    if constexpr (!is_fake_shared) {
656
425
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
425
            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
425
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
425
            _shared_state = info.shared_state->template cast<SharedState>();
672
425
            _dependency = _shared_state->create_sink_dependency(
673
425
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
425
        }
675
425
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
425
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
425
    }
678
679
425
    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
425
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
425
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
425
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
425
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
425
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
425
    _memory_used_counter =
689
425
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
425
    _common_profile->add_info_string("IsColocate",
691
425
                                     std::to_string(_parent->is_colocated_operator()));
692
425
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
425
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
425
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
425
    return Status::OK();
696
425
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
2.35k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
2.35k
    _operator_profile =
641
2.35k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
2.35k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
2.35k
    _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.35k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
2.35k
    _operator_profile->add_child(_common_profile, true);
650
2.35k
    _operator_profile->add_child(_custom_profile, true);
651
652
2.35k
    _operator_profile->set_metadata(_parent->node_id());
653
2.35k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
2.35k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
2.35k
    if constexpr (!is_fake_shared) {
656
2.35k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
2.35k
            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.35k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
2.35k
            _shared_state = info.shared_state->template cast<SharedState>();
672
2.35k
            _dependency = _shared_state->create_sink_dependency(
673
2.35k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
2.35k
        }
675
2.35k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
2.35k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
2.35k
    }
678
679
2.35k
    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.35k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
2.35k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
2.35k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
2.35k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
2.35k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
2.35k
    _memory_used_counter =
689
2.35k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
2.35k
    _common_profile->add_info_string("IsColocate",
691
2.35k
                                     std::to_string(_parent->is_colocated_operator()));
692
2.35k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
2.35k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
2.35k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
2.35k
    return Status::OK();
696
2.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
12.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
12.1k
    _operator_profile =
641
12.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
12.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
12.1k
    _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.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
12.1k
    _operator_profile->add_child(_common_profile, true);
650
12.1k
    _operator_profile->add_child(_custom_profile, true);
651
652
12.1k
    _operator_profile->set_metadata(_parent->node_id());
653
12.1k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
12.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
12.1k
    if constexpr (!is_fake_shared) {
656
12.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
12.1k
            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.1k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
12.1k
            _shared_state = info.shared_state->template cast<SharedState>();
672
12.1k
            _dependency = _shared_state->create_sink_dependency(
673
12.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
12.1k
        }
675
12.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
12.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
12.1k
    }
678
679
12.1k
    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.1k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
12.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
12.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
12.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
12.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
12.1k
    _memory_used_counter =
689
12.1k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
12.1k
    _common_profile->add_info_string("IsColocate",
691
12.1k
                                     std::to_string(_parent->is_colocated_operator()));
692
12.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
12.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
12.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
12.1k
    return Status::OK();
696
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
315k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
315k
    _operator_profile =
641
315k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
315k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
315k
    _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
315k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
315k
    _operator_profile->add_child(_common_profile, true);
650
315k
    _operator_profile->add_child(_custom_profile, true);
651
652
315k
    _operator_profile->set_metadata(_parent->node_id());
653
315k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
315k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
315k
    if constexpr (!is_fake_shared) {
656
315k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
315k
            info.shared_state_map.end()) {
658
315k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
315k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
315k
            }
661
315k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
315k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
315k
                                                  ? 0
664
315k
                                                  : info.task_idx]
665
315k
                                  .get();
666
315k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
315k
        } else {
668
77
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
77
                DCHECK(false);
670
77
            }
671
77
            _shared_state = info.shared_state->template cast<SharedState>();
672
77
            _dependency = _shared_state->create_sink_dependency(
673
77
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
77
        }
675
315k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
315k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
315k
    }
678
679
315k
    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
315k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
315k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
315k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
315k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
315k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
315k
    _memory_used_counter =
689
315k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
315k
    _common_profile->add_info_string("IsColocate",
691
315k
                                     std::to_string(_parent->is_colocated_operator()));
692
315k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
315k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
315k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
315k
    return Status::OK();
696
315k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
413k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
413k
    _operator_profile =
641
413k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
413k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
413k
    _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
413k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
413k
    _operator_profile->add_child(_common_profile, true);
650
413k
    _operator_profile->add_child(_custom_profile, true);
651
652
413k
    _operator_profile->set_metadata(_parent->node_id());
653
413k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
413k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
413k
    if constexpr (!is_fake_shared) {
656
413k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
413k
            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
867
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
867
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
867
                                                  ? 0
664
867
                                                  : info.task_idx]
665
867
                                  .get();
666
867
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
412k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
412k
            _shared_state = info.shared_state->template cast<SharedState>();
672
412k
            _dependency = _shared_state->create_sink_dependency(
673
412k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
412k
        }
675
413k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
413k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
413k
    }
678
679
413k
    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
413k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
413k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
413k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
413k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
413k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
413k
    _memory_used_counter =
689
413k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
413k
    _common_profile->add_info_string("IsColocate",
691
413k
                                     std::to_string(_parent->is_colocated_operator()));
692
413k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
413k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
413k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
413k
    return Status::OK();
696
413k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
369
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
369
    _operator_profile =
641
369
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
369
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
369
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
369
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
369
    _operator_profile->add_child(_common_profile, true);
650
369
    _operator_profile->add_child(_custom_profile, true);
651
652
369
    _operator_profile->set_metadata(_parent->node_id());
653
369
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
369
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
369
    if constexpr (!is_fake_shared) {
656
369
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
369
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
369
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
369
            _shared_state = info.shared_state->template cast<SharedState>();
672
369
            _dependency = _shared_state->create_sink_dependency(
673
369
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
369
        }
675
369
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
369
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
369
    }
678
679
369
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
369
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
369
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
369
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
369
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
369
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
369
    _memory_used_counter =
689
369
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
369
    _common_profile->add_info_string("IsColocate",
691
369
                                     std::to_string(_parent->is_colocated_operator()));
692
369
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
369
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
369
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
369
    return Status::OK();
696
369
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
300
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
300
    _operator_profile =
641
300
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
300
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
300
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
300
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
300
    _operator_profile->add_child(_common_profile, true);
650
300
    _operator_profile->add_child(_custom_profile, true);
651
652
300
    _operator_profile->set_metadata(_parent->node_id());
653
300
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
300
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
300
    if constexpr (!is_fake_shared) {
656
300
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
300
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
300
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
300
            _shared_state = info.shared_state->template cast<SharedState>();
672
300
            _dependency = _shared_state->create_sink_dependency(
673
300
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
300
        }
675
300
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
300
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
300
    }
678
679
300
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
300
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
300
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
300
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
300
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
300
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
300
    _memory_used_counter =
689
300
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
300
    _common_profile->add_info_string("IsColocate",
691
300
                                     std::to_string(_parent->is_colocated_operator()));
692
300
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
300
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
300
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
300
    return Status::OK();
696
300
}
697
698
template <typename SharedState>
699
1.86M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
1.86M
    if (_closed) {
701
2
        return Status::OK();
702
2
    }
703
1.86M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
1.27M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
1.27M
    }
706
1.86M
    _closed = true;
707
1.86M
    return Status::OK();
708
1.86M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
181k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
181k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
181k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
181k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
181k
    }
706
181k
    _closed = true;
707
181k
    return Status::OK();
708
181k
}
_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
205k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
205k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
205k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
205k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
205k
    }
706
205k
    _closed = true;
707
205k
    return Status::OK();
708
205k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
17
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
17
    if (_closed) {
701
2
        return Status::OK();
702
2
    }
703
15
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
15
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
15
    }
706
15
    _closed = true;
707
15
    return Status::OK();
708
17
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
6.11k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
6.11k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
6.11k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
6.11k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
6.11k
    }
706
6.11k
    _closed = true;
707
6.11k
    return Status::OK();
708
6.11k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
7.27k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
7.27k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
7.27k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
7.27k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
7.27k
    }
706
7.27k
    _closed = true;
707
7.27k
    return Status::OK();
708
7.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
120k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
120k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
120k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
120k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
120k
    }
706
120k
    _closed = true;
707
120k
    return Status::OK();
708
120k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
320
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
320
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
320
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
320
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
320
    }
706
320
    _closed = true;
707
320
    return Status::OK();
708
320
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
583k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
583k
    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
583k
    _closed = true;
707
583k
    return Status::OK();
708
583k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
7.75k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
7.75k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
7.75k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
7.75k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
7.75k
    }
706
7.75k
    _closed = true;
707
7.75k
    return Status::OK();
708
7.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
323
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
323
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
323
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
323
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
323
    }
706
323
    _closed = true;
707
323
    return Status::OK();
708
323
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
2.35k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
2.35k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
2.35k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
2.35k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
2.35k
    }
706
2.35k
    _closed = true;
707
2.35k
    return Status::OK();
708
2.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
12.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
12.1k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
12.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
12.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
12.1k
    }
706
12.1k
    _closed = true;
707
12.1k
    return Status::OK();
708
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
316k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
316k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
316k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
316k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
316k
    }
706
316k
    _closed = true;
707
316k
    return Status::OK();
708
316k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
416k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
416k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
416k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
416k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
416k
    }
706
416k
    _closed = true;
707
416k
    return Status::OK();
708
416k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
366
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
366
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
366
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
366
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
366
    }
706
366
    _closed = true;
707
366
    return Status::OK();
708
366
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
300
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
300
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
300
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
300
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
300
    }
706
300
    _closed = true;
707
300
    return Status::OK();
708
300
}
709
710
template <typename LocalStateType>
711
5.02k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
5.02k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
5.02k
    return pull(state, block, eos);
714
5.02k
}
_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
4.99k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
4.99k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
4.99k
    return pull(state, block, eos);
714
4.99k
}
715
716
template <typename LocalStateType>
717
30.7M
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
30.7M
    auto& local_state = get_local_state(state);
719
30.7M
    if (need_more_input_data(state)) {
720
692k
        local_state._child_block->clear_column_data(
721
692k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
692k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
692k
                state, local_state._child_block.get(), &local_state._child_eos));
724
692k
        *eos = local_state._child_eos;
725
692k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
73.0k
            return Status::OK();
727
73.0k
        }
728
618k
        {
729
618k
            SCOPED_TIMER(local_state.exec_time_counter());
730
618k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
618k
        }
732
618k
    }
733
734
30.7M
    if (!need_more_input_data(state)) {
735
30.6M
        SCOPED_TIMER(local_state.exec_time_counter());
736
30.6M
        bool new_eos = false;
737
30.6M
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
30.6M
        if (new_eos) {
739
587k
            *eos = true;
740
30.0M
        } else if (!need_more_input_data(state)) {
741
30.0M
            *eos = false;
742
30.0M
        }
743
30.6M
    }
744
30.7M
    return Status::OK();
745
30.7M
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
177k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
177k
    auto& local_state = get_local_state(state);
719
177k
    if (need_more_input_data(state)) {
720
117k
        local_state._child_block->clear_column_data(
721
117k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
117k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
117k
                state, local_state._child_block.get(), &local_state._child_eos));
724
117k
        *eos = local_state._child_eos;
725
117k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
24.4k
            return Status::OK();
727
24.4k
        }
728
92.5k
        {
729
92.5k
            SCOPED_TIMER(local_state.exec_time_counter());
730
92.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
92.5k
        }
732
92.5k
    }
733
734
152k
    if (!need_more_input_data(state)) {
735
152k
        SCOPED_TIMER(local_state.exec_time_counter());
736
152k
        bool new_eos = false;
737
152k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
152k
        if (new_eos) {
739
108k
            *eos = true;
740
108k
        } else if (!need_more_input_data(state)) {
741
10.8k
            *eos = false;
742
10.8k
        }
743
152k
    }
744
152k
    return Status::OK();
745
152k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
3.28k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
3.28k
    auto& local_state = get_local_state(state);
719
3.28k
    if (need_more_input_data(state)) {
720
1.95k
        local_state._child_block->clear_column_data(
721
1.95k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
1.95k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
1.95k
                state, local_state._child_block.get(), &local_state._child_eos));
724
1.95k
        *eos = local_state._child_eos;
725
1.95k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
429
            return Status::OK();
727
429
        }
728
1.52k
        {
729
1.52k
            SCOPED_TIMER(local_state.exec_time_counter());
730
1.52k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
1.52k
        }
732
1.52k
    }
733
734
2.85k
    if (!need_more_input_data(state)) {
735
2.85k
        SCOPED_TIMER(local_state.exec_time_counter());
736
2.85k
        bool new_eos = false;
737
2.85k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
2.85k
        if (new_eos) {
739
1.11k
            *eos = true;
740
1.74k
        } else if (!need_more_input_data(state)) {
741
1.33k
            *eos = false;
742
1.33k
        }
743
2.85k
    }
744
2.85k
    return Status::OK();
745
2.85k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
1.52k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
1.52k
    auto& local_state = get_local_state(state);
719
1.52k
    if (need_more_input_data(state)) {
720
1.52k
        local_state._child_block->clear_column_data(
721
1.52k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
1.52k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
1.52k
                state, local_state._child_block.get(), &local_state._child_eos));
724
1.52k
        *eos = local_state._child_eos;
725
1.52k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
635
            return Status::OK();
727
635
        }
728
890
        {
729
890
            SCOPED_TIMER(local_state.exec_time_counter());
730
890
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
890
        }
732
890
    }
733
734
890
    if (!need_more_input_data(state)) {
735
890
        SCOPED_TIMER(local_state.exec_time_counter());
736
890
        bool new_eos = false;
737
890
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
890
        if (new_eos) {
739
666
            *eos = true;
740
666
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
890
    }
744
890
    return Status::OK();
745
890
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
18.8k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
18.8k
    auto& local_state = get_local_state(state);
719
18.8k
    if (need_more_input_data(state)) {
720
18.7k
        local_state._child_block->clear_column_data(
721
18.7k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
18.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
18.7k
                state, local_state._child_block.get(), &local_state._child_eos));
724
18.7k
        *eos = local_state._child_eos;
725
18.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
5.14k
            return Status::OK();
727
5.14k
        }
728
13.6k
        {
729
13.6k
            SCOPED_TIMER(local_state.exec_time_counter());
730
13.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
13.6k
        }
732
13.6k
    }
733
734
13.7k
    if (!need_more_input_data(state)) {
735
8.03k
        SCOPED_TIMER(local_state.exec_time_counter());
736
8.03k
        bool new_eos = false;
737
8.03k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
8.03k
        if (new_eos) {
739
7.82k
            *eos = true;
740
7.82k
        } else if (!need_more_input_data(state)) {
741
122
            *eos = false;
742
122
        }
743
8.03k
    }
744
13.7k
    return Status::OK();
745
13.7k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
533k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
533k
    auto& local_state = get_local_state(state);
719
534k
    if (need_more_input_data(state)) {
720
534k
        local_state._child_block->clear_column_data(
721
534k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
534k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
534k
                state, local_state._child_block.get(), &local_state._child_eos));
724
534k
        *eos = local_state._child_eos;
725
534k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
40.8k
            return Status::OK();
727
40.8k
        }
728
493k
        {
729
493k
            SCOPED_TIMER(local_state.exec_time_counter());
730
493k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
493k
        }
732
493k
    }
733
734
492k
    if (!need_more_input_data(state)) {
735
460k
        SCOPED_TIMER(local_state.exec_time_counter());
736
460k
        bool new_eos = false;
737
460k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
460k
        if (new_eos) {
739
459k
            *eos = true;
740
459k
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
460k
    }
744
492k
    return Status::OK();
745
492k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
30.0M
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
30.0M
    auto& local_state = get_local_state(state);
719
30.0M
    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.07k
            return Status::OK();
727
1.07k
        }
728
12.3k
        {
729
12.3k
            SCOPED_TIMER(local_state.exec_time_counter());
730
12.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
12.3k
        }
732
12.3k
    }
733
734
30.0M
    if (!need_more_input_data(state)) {
735
30.0M
        SCOPED_TIMER(local_state.exec_time_counter());
736
30.0M
        bool new_eos = false;
737
30.0M
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
30.0M
        if (new_eos) {
739
6.12k
            *eos = true;
740
30.0M
        } else if (!need_more_input_data(state)) {
741
30.0M
            *eos = false;
742
30.0M
        }
743
30.0M
    }
744
30.0M
    return Status::OK();
745
30.0M
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
5.71k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
5.71k
    auto& local_state = get_local_state(state);
719
5.71k
    if (need_more_input_data(state)) {
720
5.33k
        local_state._child_block->clear_column_data(
721
5.33k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
5.33k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
5.33k
                state, local_state._child_block.get(), &local_state._child_eos));
724
5.33k
        *eos = local_state._child_eos;
725
5.33k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
405
            return Status::OK();
727
405
        }
728
4.93k
        {
729
4.93k
            SCOPED_TIMER(local_state.exec_time_counter());
730
4.93k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
4.93k
        }
732
4.93k
    }
733
734
5.30k
    if (!need_more_input_data(state)) {
735
5.30k
        SCOPED_TIMER(local_state.exec_time_counter());
736
5.30k
        bool new_eos = false;
737
5.30k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
5.30k
        if (new_eos) {
739
3.43k
            *eos = true;
740
3.43k
        } else if (!need_more_input_data(state)) {
741
374
            *eos = false;
742
374
        }
743
5.30k
    }
744
5.30k
    return Status::OK();
745
5.30k
}
746
747
template <typename Writer, typename Parent>
748
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
749
66.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
66.5k
    RETURN_IF_ERROR(Base::init(state, info));
751
66.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
66.5k
                                                         "AsyncWriterDependency", true);
753
66.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
66.5k
                             _finish_dependency));
755
756
66.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
66.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
66.5k
    return Status::OK();
759
66.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
342
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
342
    RETURN_IF_ERROR(Base::init(state, info));
751
342
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
342
                                                         "AsyncWriterDependency", true);
753
342
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
342
                             _finish_dependency));
755
756
342
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
342
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
342
    return Status::OK();
759
342
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
66.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
66.1k
    RETURN_IF_ERROR(Base::init(state, info));
751
66.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
66.1k
                                                         "AsyncWriterDependency", true);
753
66.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
66.1k
                             _finish_dependency));
755
756
66.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
66.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
66.1k
    return Status::OK();
759
66.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
15
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
15
    RETURN_IF_ERROR(Base::init(state, info));
751
15
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
15
                                                         "AsyncWriterDependency", true);
753
15
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
15
                             _finish_dependency));
755
756
15
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
15
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
15
    return Status::OK();
759
15
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
760
761
template <typename Writer, typename Parent>
762
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
763
67.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
67.2k
    RETURN_IF_ERROR(Base::open(state));
765
67.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
482k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
415k
        RETURN_IF_ERROR(
768
415k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
415k
    }
770
67.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
67.2k
    return Status::OK();
772
67.2k
}
_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.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
480k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
413k
        RETURN_IF_ERROR(
768
413k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
413k
    }
770
66.8k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
66.8k
    return Status::OK();
772
66.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
15
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
15
    RETURN_IF_ERROR(Base::open(state));
765
15
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
270
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
255
        RETURN_IF_ERROR(
768
255
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
255
    }
770
15
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
15
    return Status::OK();
772
15
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
773
774
template <typename Writer, typename Parent>
775
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
776
79.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
79.6k
    return _writer->sink(block, eos);
778
79.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
1.38k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
1.38k
    return _writer->sink(block, eos);
778
1.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
78.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
78.2k
    return _writer->sink(block, eos);
778
78.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
15
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
15
    return _writer->sink(block, eos);
778
15
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
779
780
template <typename Writer, typename Parent>
781
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
782
67.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
67.3k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
67.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
67.3k
    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.3k
    if (_writer) {
790
67.3k
        Status st = _writer->get_writer_status();
791
67.3k
        if (exec_status.ok()) {
792
67.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
67.3k
                                                       : Status::Cancelled("force close"));
794
67.3k
        } else {
795
88
            _writer->force_close(exec_status);
796
88
        }
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.3k
        RETURN_IF_ERROR(st);
801
67.3k
    }
802
67.3k
    return Base::close(state, exec_status);
803
67.3k
}
_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
67.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
67.0k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
67.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
67.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
67.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
88
            _writer->force_close(exec_status);
796
88
        }
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
67.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
15
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
15
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
15
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
15
    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
15
    if (_writer) {
790
15
        Status st = _writer->get_writer_status();
791
15
        if (exec_status.ok()) {
792
15
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
15
                                                       : Status::Cancelled("force close"));
794
15
        } 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
15
        RETURN_IF_ERROR(st);
801
15
    }
802
15
    return Base::close(state, exec_status);
803
15
}
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