Coverage Report

Created: 2026-03-18 18:05

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.31M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
2.31M
    if (_parent->nereids_id() == -1) {
117
1.20M
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
1.20M
    } else {
119
1.11M
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
1.11M
                           std::to_string(_parent->nereids_id()),
121
1.11M
                           std::to_string(_parent->node_id()));
122
1.11M
    }
123
2.31M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
129k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
129k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
129k
    } else {
119
129k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
129k
                           std::to_string(_parent->nereids_id()),
121
129k
                           std::to_string(_parent->node_id()));
122
129k
    }
123
129k
}
_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
27
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
27
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
27
    } else {
119
27
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
27
                           std::to_string(_parent->nereids_id()),
121
27
                           std::to_string(_parent->node_id()));
122
27
    }
123
27
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
6.95k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
6.95k
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
6.95k
    } else {
119
6.95k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
6.95k
                           std::to_string(_parent->nereids_id()),
121
6.95k
                           std::to_string(_parent->node_id()));
122
6.95k
    }
123
6.95k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
7.11k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
7.11k
    if (_parent->nereids_id() == -1) {
117
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
7.10k
    } else {
119
7.10k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
7.10k
                           std::to_string(_parent->nereids_id()),
121
7.10k
                           std::to_string(_parent->node_id()));
122
7.10k
    }
123
7.11k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
121k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
121k
    if (_parent->nereids_id() == -1) {
117
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
121k
    } else {
119
121k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
121k
                           std::to_string(_parent->nereids_id()),
121
121k
                           std::to_string(_parent->node_id()));
122
121k
    }
123
121k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
639
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
639
    if (_parent->nereids_id() == -1) {
117
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
639
    } else {
119
639
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
639
                           std::to_string(_parent->nereids_id()),
121
639
                           std::to_string(_parent->node_id()));
122
639
    }
123
639
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
1.04M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
1.04M
    if (_parent->nereids_id() == -1) {
117
459k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
590k
    } else {
119
590k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
590k
                           std::to_string(_parent->nereids_id()),
121
590k
                           std::to_string(_parent->node_id()));
122
590k
    }
123
1.04M
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
51.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
51.6k
    if (_parent->nereids_id() == -1) {
117
2
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
51.6k
    } else {
119
51.6k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
51.6k
                           std::to_string(_parent->nereids_id()),
121
51.6k
                           std::to_string(_parent->node_id()));
122
51.6k
    }
123
51.6k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
111
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
111
    if (_parent->nereids_id() == -1) {
117
111
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
111
    } 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
111
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
6.88k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
6.88k
    if (_parent->nereids_id() == -1) {
117
6.88k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
6.88k
    } else {
119
3
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
3
                           std::to_string(_parent->nereids_id()),
121
3
                           std::to_string(_parent->node_id()));
122
3
    }
123
6.88k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
435
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
435
    if (_parent->nereids_id() == -1) {
117
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
333
    } else {
119
333
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
333
                           std::to_string(_parent->nereids_id()),
121
333
                           std::to_string(_parent->node_id()));
122
333
    }
123
435
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
5.09k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
5.09k
    if (_parent->nereids_id() == -1) {
117
10
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
5.08k
    } else {
119
5.08k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
5.08k
                           std::to_string(_parent->nereids_id()),
121
5.08k
                           std::to_string(_parent->node_id()));
122
5.08k
    }
123
5.09k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
115
737k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
116
737k
    if (_parent->nereids_id() == -1) {
117
736k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
118
736k
    } else {
119
1.27k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
120
1.27k
                           std::to_string(_parent->nereids_id()),
121
1.27k
                           std::to_string(_parent->node_id()));
122
1.27k
    }
123
737k
}
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.36M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
1.36M
    if (_parent->nereids_id() == -1) {
128
840k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
840k
    } else {
130
525k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
525k
                           std::to_string(_parent->nereids_id()),
132
525k
                           std::to_string(_parent->node_id()));
133
525k
    }
134
1.36M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
178k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
178k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
178k
    } else {
130
178k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
178k
                           std::to_string(_parent->nereids_id()),
132
178k
                           std::to_string(_parent->node_id()));
133
178k
    }
134
178k
}
_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
201k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
201k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
201k
    } else {
130
201k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
201k
                           std::to_string(_parent->nereids_id()),
132
201k
                           std::to_string(_parent->node_id()));
133
201k
    }
134
201k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
33
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
33
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
33
    } else {
130
33
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
33
                           std::to_string(_parent->nereids_id()),
132
33
                           std::to_string(_parent->node_id()));
133
33
    }
134
33
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
7.01k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
7.01k
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
7.01k
    } else {
130
7.01k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
7.01k
                           std::to_string(_parent->nereids_id()),
132
7.01k
                           std::to_string(_parent->node_id()));
133
7.01k
    }
134
7.01k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
7.14k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
7.14k
    if (_parent->nereids_id() == -1) {
128
9
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
7.13k
    } else {
130
7.13k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
7.13k
                           std::to_string(_parent->nereids_id()),
132
7.13k
                           std::to_string(_parent->node_id()));
133
7.13k
    }
134
7.14k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
121k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
121k
    if (_parent->nereids_id() == -1) {
128
27
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
121k
    } else {
130
121k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
121k
                           std::to_string(_parent->nereids_id()),
132
121k
                           std::to_string(_parent->node_id()));
133
121k
    }
134
121k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
649
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
649
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
649
    } else {
130
649
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
649
                           std::to_string(_parent->nereids_id()),
132
649
                           std::to_string(_parent->node_id()));
133
649
    }
134
649
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
21
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
21
    if (_parent->nereids_id() == -1) {
128
21
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
21
    } 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
21
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
8.93k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
8.93k
    if (_parent->nereids_id() == -1) {
128
3
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
8.92k
    } else {
130
8.92k
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
8.92k
                           std::to_string(_parent->nereids_id()),
132
8.92k
                           std::to_string(_parent->node_id()));
133
8.92k
    }
134
8.93k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
436
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
436
    if (_parent->nereids_id() == -1) {
128
102
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
334
    } else {
130
334
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
334
                           std::to_string(_parent->nereids_id()),
132
334
                           std::to_string(_parent->node_id()));
133
334
    }
134
436
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
12.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
12.5k
    if (_parent->nereids_id() == -1) {
128
12.5k
        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.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
352k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
352k
    if (_parent->nereids_id() == -1) {
128
352k
        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
352k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
475k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
475k
    if (_parent->nereids_id() == -1) {
128
475k
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
475k
    } else {
130
29
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
29
                           std::to_string(_parent->nereids_id()),
132
29
                           std::to_string(_parent->node_id()));
133
29
    }
134
475k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
109
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
109
    if (_parent->nereids_id() == -1) {
128
109
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
109
    } 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
109
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
126
299
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
127
299
    if (_parent->nereids_id() == -1) {
128
0
        return fmt::format(operator_name_suffix, std::to_string(_parent->node_id()));
129
299
    } else {
130
299
        return fmt::format("(nereids_id={})" + operator_name_suffix,
131
299
                           std::to_string(_parent->nereids_id()),
132
299
                           std::to_string(_parent->node_id()));
133
299
    }
134
299
}
135
136
template <typename SharedStateArg>
137
31.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
31.1k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
31.1k
    _terminated = true;
142
31.1k
    return Status::OK();
143
31.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
1.21k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
1.21k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
1.21k
    _terminated = true;
142
1.21k
    return Status::OK();
143
1.21k
}
_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
8
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
8
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
8
    _terminated = true;
142
8
    return Status::OK();
143
8
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
3.17k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
3.17k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
3.17k
    _terminated = true;
142
3.17k
    return Status::OK();
143
3.17k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
2.35k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
2.35k
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
2.35k
    _terminated = true;
142
2.35k
    return Status::OK();
143
2.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_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_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
1
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
1
    _terminated = true;
142
1
    return Status::OK();
143
1
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
43
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
43
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
43
    _terminated = true;
142
43
    return Status::OK();
143
43
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
183
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
183
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
183
    _terminated = true;
142
183
    return Status::OK();
143
183
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
137
139
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
138
139
    if (_terminated) {
139
0
        return Status::OK();
140
0
    }
141
139
    _terminated = true;
142
139
    return Status::OK();
143
139
}
144
145
638k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
146
638k
    return _child && _child->is_serial_operator() && !is_source()
147
638k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
148
638k
                   : DataDistribution(ExchangeType::NOOP);
149
638k
}
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
53.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
53.8k
    fmt::memory_buffer debug_string_buffer;
158
53.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
53.8k
    return fmt::to_string(debug_string_buffer);
160
53.8k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
3
    fmt::memory_buffer debug_string_buffer;
158
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
3
    return fmt::to_string(debug_string_buffer);
160
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
15
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
15
    fmt::memory_buffer debug_string_buffer;
158
15
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
15
    return fmt::to_string(debug_string_buffer);
160
15
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
31
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
31
    fmt::memory_buffer debug_string_buffer;
158
31
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
31
    return fmt::to_string(debug_string_buffer);
160
31
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
156
53.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
53.6k
    fmt::memory_buffer debug_string_buffer;
158
53.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
53.6k
    return fmt::to_string(debug_string_buffer);
160
53.6k
}
_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
204
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
157
204
    fmt::memory_buffer debug_string_buffer;
158
204
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
159
204
    return fmt::to_string(debug_string_buffer);
160
204
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
161
162
template <typename SharedStateArg>
163
53.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
53.8k
    fmt::memory_buffer debug_string_buffer;
165
53.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
53.8k
    return fmt::to_string(debug_string_buffer);
167
53.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
30
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
30
    fmt::memory_buffer debug_string_buffer;
165
30
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
30
    return fmt::to_string(debug_string_buffer);
167
30
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
219
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
219
    fmt::memory_buffer debug_string_buffer;
165
219
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
219
    return fmt::to_string(debug_string_buffer);
167
219
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
163
53.5k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
164
53.5k
    fmt::memory_buffer debug_string_buffer;
165
53.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
166
53.5k
    return fmt::to_string(debug_string_buffer);
167
53.5k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
168
169
53.9k
std::string OperatorXBase::debug_string(int indentation_level) const {
170
53.9k
    fmt::memory_buffer debug_string_buffer;
171
53.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
172
53.9k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
173
53.9k
                   _is_serial_operator);
174
53.9k
    return fmt::to_string(debug_string_buffer);
175
53.9k
}
176
177
53.8k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
178
53.8k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
179
53.8k
}
180
181
579k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
182
579k
    std::string node_name = print_plan_node_type(tnode.node_type);
183
579k
    _nereids_id = tnode.nereids_id;
184
579k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
185
2.89k
        if (!tnode.__isset.output_tuple_id) {
186
0
            return Status::InternalError("no final output tuple id");
187
0
        }
188
2.89k
        if (tnode.intermediate_output_tuple_id_list.size() !=
189
2.89k
            tnode.intermediate_projections_list.size()) {
190
0
            return Status::InternalError(
191
0
                    "intermediate_output_tuple_id_list size:{} not match "
192
0
                    "intermediate_projections_list size:{}",
193
0
                    tnode.intermediate_output_tuple_id_list.size(),
194
0
                    tnode.intermediate_projections_list.size());
195
0
        }
196
2.89k
    }
197
579k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
198
579k
    _op_name = substr + "_OPERATOR";
199
200
579k
    if (tnode.__isset.vconjunct) {
201
0
        return Status::InternalError("vconjunct is not supported yet");
202
579k
    } else if (tnode.__isset.conjuncts) {
203
260k
        for (const auto& conjunct : tnode.conjuncts) {
204
260k
            VExprContextSPtr context;
205
260k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
206
260k
            _conjuncts.emplace_back(context);
207
260k
        }
208
88.3k
    }
209
210
    // create the projections expr
211
579k
    if (tnode.__isset.projections) {
212
242k
        DCHECK(tnode.__isset.output_tuple_id);
213
242k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
214
242k
    }
215
579k
    if (!tnode.intermediate_projections_list.empty()) {
216
2.89k
        DCHECK(tnode.__isset.projections) << "no final projections";
217
2.89k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
218
3.79k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
219
3.79k
            VExprContextSPtrs projections;
220
3.79k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
221
3.79k
            _intermediate_projections.push_back(projections);
222
3.79k
        }
223
2.89k
    }
224
579k
    return Status::OK();
225
579k
}
226
227
607k
Status OperatorXBase::prepare(RuntimeState* state) {
228
607k
    for (auto& conjunct : _conjuncts) {
229
259k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
230
259k
    }
231
607k
    if (state->enable_adjust_conjunct_order_by_cost()) {
232
558k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
233
342k
            return a->execute_cost() < b->execute_cost();
234
342k
        });
235
558k
    };
236
237
611k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
238
3.79k
        RETURN_IF_ERROR(
239
3.79k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
240
3.79k
    }
241
607k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
242
243
607k
    if (has_output_row_desc()) {
244
242k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
245
242k
    }
246
247
607k
    for (auto& conjunct : _conjuncts) {
248
259k
        RETURN_IF_ERROR(conjunct->open(state));
249
259k
    }
250
607k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
251
607k
    for (auto& projections : _intermediate_projections) {
252
3.79k
        RETURN_IF_ERROR(VExpr::open(projections, state));
253
3.79k
    }
254
607k
    if (_child && !is_source()) {
255
136k
        RETURN_IF_ERROR(_child->prepare(state));
256
136k
    }
257
258
607k
    if (VExpr::contains_blockable_function(_conjuncts) ||
259
607k
        VExpr::contains_blockable_function(_projections)) {
260
0
        _blockable = true;
261
0
    }
262
263
607k
    return Status::OK();
264
607k
}
265
266
8.24k
Status OperatorXBase::terminate(RuntimeState* state) {
267
8.24k
    if (_child && !is_source()) {
268
1.09k
        RETURN_IF_ERROR(_child->terminate(state));
269
1.09k
    }
270
8.24k
    auto result = state->get_local_state_result(operator_id());
271
8.24k
    if (!result) {
272
0
        return result.error();
273
0
    }
274
8.24k
    return result.value()->terminate(state);
275
8.24k
}
276
277
6.73M
Status OperatorXBase::close(RuntimeState* state) {
278
6.73M
    if (_child && !is_source()) {
279
1.49M
        RETURN_IF_ERROR(_child->close(state));
280
1.49M
    }
281
6.73M
    auto result = state->get_local_state_result(operator_id());
282
6.73M
    if (!result) {
283
0
        return result.error();
284
0
    }
285
6.73M
    return result.value()->close(state);
286
6.73M
}
287
288
27.6M
void PipelineXLocalStateBase::clear_origin_block() {
289
27.6M
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
290
27.6M
}
291
292
27.9M
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
293
27.9M
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
294
295
27.9M
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
296
27.9M
    return Status::OK();
297
27.9M
}
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
27.6M
                                     Block* output_block) const {
306
27.6M
    auto* local_state = state->get_local_state(operator_id());
307
27.6M
    SCOPED_TIMER(local_state->exec_time_counter());
308
27.6M
    SCOPED_TIMER(local_state->_projection_timer);
309
27.6M
    const size_t rows = origin_block->rows();
310
27.6M
    if (rows == 0) {
311
27.5M
        return Status::OK();
312
27.5M
    }
313
112k
    Block input_block = *origin_block;
314
315
112k
    size_t bytes_usage = 0;
316
112k
    ColumnsWithTypeAndName new_columns;
317
112k
    for (const auto& projections : local_state->_intermediate_projections) {
318
1.08k
        if (projections.empty()) {
319
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
320
0
                                         node_id());
321
0
        }
322
1.08k
        new_columns.resize(projections.size());
323
7.29k
        for (int i = 0; i < projections.size(); i++) {
324
6.20k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
325
6.20k
            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
6.20k
        }
333
1.08k
        Block tmp_block {new_columns};
334
1.08k
        bytes_usage += tmp_block.allocated_bytes();
335
1.08k
        input_block.swap(tmp_block);
336
1.08k
    }
337
338
112k
    if (input_block.rows() != rows) {
339
0
        return Status::InternalError(
340
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
341
0
                "input_block: {}",
342
0
                input_block.rows(), rows, input_block.dump_structure());
343
0
    }
344
582k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
345
582k
        if (to->is_nullable() && !from->is_nullable()) {
346
0
            if (_keep_origin || !from->is_exclusive()) {
347
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
348
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
349
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
350
0
                bytes_usage += null_column.allocated_bytes();
351
0
            } else {
352
0
                to = make_nullable(from, false)->assume_mutable();
353
0
            }
354
582k
        } else {
355
582k
            if (_keep_origin || !from->is_exclusive()) {
356
576k
                to->insert_range_from(*from, 0, rows);
357
576k
                bytes_usage += from->allocated_bytes();
358
576k
            } else {
359
6.12k
                to = from->assume_mutable();
360
6.12k
            }
361
582k
        }
362
582k
    };
363
364
112k
    MutableBlock mutable_block =
365
112k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
366
112k
    if (rows != 0) {
367
112k
        auto& mutable_columns = mutable_block.mutable_columns();
368
112k
        const size_t origin_columns_count = input_block.columns();
369
112k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
695k
        for (int i = 0; i < mutable_columns.size(); ++i) {
371
582k
            auto result_column_id = -1;
372
582k
            ColumnPtr column_ptr;
373
582k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
374
582k
            if (column_ptr->size() != rows) {
375
0
                return Status::InternalError(
376
0
                        "projection result column size {} not equal input rows {}, expr: {}",
377
0
                        column_ptr->size(), rows,
378
0
                        local_state->_projections[i]->root()->debug_string());
379
0
            }
380
582k
            column_ptr = column_ptr->convert_to_full_column_if_const();
381
582k
            if (result_column_id >= origin_columns_count) {
382
582k
                bytes_usage += column_ptr->allocated_bytes();
383
582k
            }
384
582k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
385
582k
        }
386
112k
        DCHECK(mutable_block.rows() == rows);
387
112k
        output_block->set_columns(std::move(mutable_columns));
388
112k
    }
389
390
112k
    local_state->_estimate_memory_usage += bytes_usage;
391
392
112k
    return Status::OK();
393
112k
}
394
395
31.2M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
396
31.2M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
397
31.2M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
398
31.2M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
399
31.2M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
400
31.2M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
401
31.2M
            if (_debug_point_count++ % 2 == 0) {
402
31.2M
                return Status::OK();
403
31.2M
            }
404
31.2M
        }
405
31.2M
    });
406
407
31.2M
    Status status;
408
31.2M
    auto* local_state = state->get_local_state(operator_id());
409
31.2M
    Defer defer([&]() {
410
31.2M
        if (status.ok()) {
411
31.2M
            if (auto rows = block->rows()) {
412
709k
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
413
709k
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
414
709k
            }
415
31.2M
        }
416
31.2M
    });
417
31.2M
    if (_output_row_descriptor) {
418
27.6M
        local_state->clear_origin_block();
419
27.6M
        status = get_block(state, &local_state->_origin_block, eos);
420
27.6M
        if (UNLIKELY(!status.ok())) {
421
14
            return status;
422
14
        }
423
27.6M
        status = do_projections(state, &local_state->_origin_block, block);
424
27.6M
        return status;
425
27.6M
    }
426
3.63M
    status = get_block(state, block, eos);
427
3.63M
    RETURN_IF_ERROR(block->check_type_and_column());
428
3.63M
    return status;
429
3.63M
}
430
431
29.8M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
432
29.8M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
433
1.43k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
434
1.43k
        *eos = true;
435
1.43k
    }
436
437
29.8M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
438
29.8M
        auto op_name = to_lower(_parent->_op_name);
439
29.8M
        auto arg_op_name = dp->param<std::string>("op_name");
440
29.8M
        arg_op_name = to_lower(arg_op_name);
441
442
29.8M
        if (op_name == arg_op_name) {
443
29.8M
            *eos = true;
444
29.8M
        }
445
29.8M
    });
446
447
29.8M
    if (auto rows = block->rows()) {
448
635k
        _num_rows_returned += rows;
449
635k
    }
450
29.8M
}
451
452
31.1k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
453
31.1k
    auto result = state->get_sink_local_state_result();
454
31.1k
    if (!result) {
455
0
        return result.error();
456
0
    }
457
31.1k
    return result.value()->terminate(state);
458
31.1k
}
459
460
53.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
461
53.9k
    fmt::memory_buffer debug_string_buffer;
462
463
53.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
464
53.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
465
53.9k
    return fmt::to_string(debug_string_buffer);
466
53.9k
}
467
468
53.8k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
469
53.8k
    return state->get_sink_local_state()->debug_string(indentation_level);
470
53.8k
}
471
472
346k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
473
346k
    std::string op_name = "UNKNOWN_SINK";
474
346k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
475
476
346k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
477
346k
        op_name = it->second;
478
346k
    }
479
346k
    _name = op_name + "_OPERATOR";
480
346k
    return Status::OK();
481
346k
}
482
483
169k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
484
169k
    std::string op_name = print_plan_node_type(tnode.node_type);
485
169k
    _nereids_id = tnode.nereids_id;
486
169k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
487
169k
    _name = substr + "_SINK_OPERATOR";
488
169k
    return Status::OK();
489
169k
}
490
491
template <typename LocalStateType>
492
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
493
1.99M
                                                            LocalSinkStateInfo& info) {
494
1.99M
    auto local_state = LocalStateType::create_unique(this, state);
495
1.99M
    RETURN_IF_ERROR(local_state->init(state, info));
496
1.99M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
1.99M
    return Status::OK();
498
1.99M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
177k
                                                            LocalSinkStateInfo& info) {
494
177k
    auto local_state = LocalStateType::create_unique(this, state);
495
177k
    RETURN_IF_ERROR(local_state->init(state, info));
496
177k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
177k
    return Status::OK();
498
177k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
410k
                                                            LocalSinkStateInfo& info) {
494
410k
    auto local_state = LocalStateType::create_unique(this, state);
495
410k
    RETURN_IF_ERROR(local_state->init(state, info));
496
410k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
410k
    return Status::OK();
498
410k
}
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
338
                                                            LocalSinkStateInfo& info) {
494
338
    auto local_state = LocalStateType::create_unique(this, state);
495
338
    RETURN_IF_ERROR(local_state->init(state, info));
496
338
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
338
    return Status::OK();
498
338
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
65.3k
                                                            LocalSinkStateInfo& info) {
494
65.3k
    auto local_state = LocalStateType::create_unique(this, state);
495
65.3k
    RETURN_IF_ERROR(local_state->init(state, info));
496
65.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
65.3k
    return Status::OK();
498
65.3k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
139
                                                            LocalSinkStateInfo& info) {
494
139
    auto local_state = LocalStateType::create_unique(this, state);
495
139
    RETURN_IF_ERROR(local_state->init(state, info));
496
139
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
139
    return Status::OK();
498
139
}
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.14k
                                                            LocalSinkStateInfo& info) {
494
7.14k
    auto local_state = LocalStateType::create_unique(this, state);
495
7.14k
    RETURN_IF_ERROR(local_state->init(state, info));
496
7.14k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
7.14k
    return Status::OK();
498
7.14k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
18
                                                            LocalSinkStateInfo& info) {
494
18
    auto local_state = LocalStateType::create_unique(this, state);
495
18
    RETURN_IF_ERROR(local_state->init(state, info));
496
18
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
18
    return Status::OK();
498
18
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
201k
                                                            LocalSinkStateInfo& info) {
494
201k
    auto local_state = LocalStateType::create_unique(this, state);
495
201k
    RETURN_IF_ERROR(local_state->init(state, info));
496
201k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
201k
    return Status::OK();
498
201k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
33
                                                            LocalSinkStateInfo& info) {
494
33
    auto local_state = LocalStateType::create_unique(this, state);
495
33
    RETURN_IF_ERROR(local_state->init(state, info));
496
33
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
33
    return Status::OK();
498
33
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
352k
                                                            LocalSinkStateInfo& info) {
494
352k
    auto local_state = LocalStateType::create_unique(this, state);
495
352k
    RETURN_IF_ERROR(local_state->init(state, info));
496
352k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
352k
    return Status::OK();
498
352k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
122k
                                                            LocalSinkStateInfo& info) {
494
122k
    auto local_state = LocalStateType::create_unique(this, state);
495
122k
    RETURN_IF_ERROR(local_state->init(state, info));
496
122k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
122k
    return Status::OK();
498
122k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
649
                                                            LocalSinkStateInfo& info) {
494
649
    auto local_state = LocalStateType::create_unique(this, state);
495
649
    RETURN_IF_ERROR(local_state->init(state, info));
496
649
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
649
    return Status::OK();
498
649
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
623k
                                                            LocalSinkStateInfo& info) {
494
623k
    auto local_state = LocalStateType::create_unique(this, state);
495
623k
    RETURN_IF_ERROR(local_state->init(state, info));
496
623k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
623k
    return Status::OK();
498
623k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
7.01k
                                                            LocalSinkStateInfo& info) {
494
7.01k
    auto local_state = LocalStateType::create_unique(this, state);
495
7.01k
    RETURN_IF_ERROR(local_state->init(state, info));
496
7.01k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
7.01k
    return Status::OK();
498
7.01k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
8.91k
                                                            LocalSinkStateInfo& info) {
494
8.91k
    auto local_state = LocalStateType::create_unique(this, state);
495
8.91k
    RETURN_IF_ERROR(local_state->init(state, info));
496
8.91k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
8.91k
    return Status::OK();
498
8.91k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.67k
                                                            LocalSinkStateInfo& info) {
494
2.67k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.67k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.67k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.67k
    return Status::OK();
498
2.67k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
334
                                                            LocalSinkStateInfo& info) {
494
334
    auto local_state = LocalStateType::create_unique(this, state);
495
334
    RETURN_IF_ERROR(local_state->init(state, info));
496
334
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
334
    return Status::OK();
498
334
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
4.77k
                                                            LocalSinkStateInfo& info) {
494
4.77k
    auto local_state = LocalStateType::create_unique(this, state);
495
4.77k
    RETURN_IF_ERROR(local_state->init(state, info));
496
4.77k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
4.77k
    return Status::OK();
498
4.77k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.63k
                                                            LocalSinkStateInfo& info) {
494
2.63k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.63k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.63k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.63k
    return Status::OK();
498
2.63k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
2.53k
                                                            LocalSinkStateInfo& info) {
494
2.53k
    auto local_state = LocalStateType::create_unique(this, state);
495
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
496
2.53k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
2.53k
    return Status::OK();
498
2.53k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_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_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
165
                                                            LocalSinkStateInfo& info) {
494
165
    auto local_state = LocalStateType::create_unique(this, state);
495
165
    RETURN_IF_ERROR(local_state->init(state, info));
496
165
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
165
    return Status::OK();
498
165
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
107
                                                            LocalSinkStateInfo& info) {
494
107
    auto local_state = LocalStateType::create_unique(this, state);
495
107
    RETURN_IF_ERROR(local_state->init(state, info));
496
107
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
107
    return Status::OK();
498
107
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
104
                                                            LocalSinkStateInfo& info) {
494
104
    auto local_state = LocalStateType::create_unique(this, state);
495
104
    RETURN_IF_ERROR(local_state->init(state, info));
496
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
104
    return Status::OK();
498
104
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
150
                                                            LocalSinkStateInfo& info) {
494
150
    auto local_state = LocalStateType::create_unique(this, state);
495
150
    RETURN_IF_ERROR(local_state->init(state, info));
496
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
150
    return Status::OK();
498
150
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
493
150
                                                            LocalSinkStateInfo& info) {
494
150
    auto local_state = LocalStateType::create_unique(this, state);
495
150
    RETURN_IF_ERROR(local_state->init(state, info));
496
150
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
497
150
    return Status::OK();
498
150
}
499
500
template <typename LocalStateType>
501
1.61M
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.61M
    } else {
509
1.61M
        auto ss = LocalStateType::SharedStateType::create_shared();
510
1.61M
        ss->id = operator_id();
511
1.61M
        for (auto& dest : dests_id()) {
512
1.60M
            ss->related_op_ids.insert(dest);
513
1.60M
        }
514
1.61M
        return ss;
515
1.61M
    }
516
1.61M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
168k
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
168k
    } else {
509
168k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
168k
        ss->id = operator_id();
511
168k
        for (auto& dest : dests_id()) {
512
167k
            ss->related_op_ids.insert(dest);
513
167k
        }
514
168k
        return ss;
515
168k
    }
516
168k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
411k
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
411k
    } else {
509
411k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
411k
        ss->id = operator_id();
511
411k
        for (auto& dest : dests_id()) {
512
409k
            ss->related_op_ids.insert(dest);
513
409k
        }
514
411k
        return ss;
515
411k
    }
516
411k
}
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
338
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
338
    } else {
509
338
        auto ss = LocalStateType::SharedStateType::create_shared();
510
338
        ss->id = operator_id();
511
339
        for (auto& dest : dests_id()) {
512
339
            ss->related_op_ids.insert(dest);
513
339
        }
514
338
        return ss;
515
338
    }
516
338
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
64.6k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
64.6k
    } else {
509
64.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
64.6k
        ss->id = operator_id();
511
64.6k
        for (auto& dest : dests_id()) {
512
64.2k
            ss->related_op_ids.insert(dest);
513
64.2k
        }
514
64.6k
        return ss;
515
64.6k
    }
516
64.6k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
501
139
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
139
    } else {
509
139
        auto ss = LocalStateType::SharedStateType::create_shared();
510
139
        ss->id = operator_id();
511
139
        for (auto& dest : dests_id()) {
512
139
            ss->related_op_ids.insert(dest);
513
139
        }
514
139
        return ss;
515
139
    }
516
139
}
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.16k
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.16k
    } else {
509
7.16k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
7.16k
        ss->id = operator_id();
511
7.16k
        for (auto& dest : dests_id()) {
512
7.16k
            ss->related_op_ids.insert(dest);
513
7.16k
        }
514
7.16k
        return ss;
515
7.16k
    }
516
7.16k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
18
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
18
    } else {
509
18
        auto ss = LocalStateType::SharedStateType::create_shared();
510
18
        ss->id = operator_id();
511
18
        for (auto& dest : dests_id()) {
512
18
            ss->related_op_ids.insert(dest);
513
18
        }
514
18
        return ss;
515
18
    }
516
18
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
201k
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
201k
    } else {
509
201k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
201k
        ss->id = operator_id();
511
201k
        for (auto& dest : dests_id()) {
512
201k
            ss->related_op_ids.insert(dest);
513
201k
        }
514
201k
        return ss;
515
201k
    }
516
201k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
35
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
35
    } else {
509
35
        auto ss = LocalStateType::SharedStateType::create_shared();
510
35
        ss->id = operator_id();
511
35
        for (auto& dest : dests_id()) {
512
35
            ss->related_op_ids.insert(dest);
513
35
        }
514
35
        return ss;
515
35
    }
516
35
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
122k
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
122k
    } else {
509
122k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
122k
        ss->id = operator_id();
511
122k
        for (auto& dest : dests_id()) {
512
122k
            ss->related_op_ids.insert(dest);
513
122k
        }
514
122k
        return ss;
515
122k
    }
516
122k
}
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
648
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
648
    } else {
509
648
        auto ss = LocalStateType::SharedStateType::create_shared();
510
648
        ss->id = operator_id();
511
648
        for (auto& dest : dests_id()) {
512
648
            ss->related_op_ids.insert(dest);
513
648
        }
514
648
        return ss;
515
648
    }
516
648
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
624k
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
624k
    } else {
509
624k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
624k
        ss->id = operator_id();
511
624k
        for (auto& dest : dests_id()) {
512
620k
            ss->related_op_ids.insert(dest);
513
620k
        }
514
624k
        return ss;
515
624k
    }
516
624k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
7.03k
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.03k
    } else {
509
7.03k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
7.03k
        ss->id = operator_id();
511
7.03k
        for (auto& dest : dests_id()) {
512
7.01k
            ss->related_op_ids.insert(dest);
513
7.01k
        }
514
7.03k
        return ss;
515
7.03k
    }
516
7.03k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
437
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
437
    } else {
509
437
        auto ss = LocalStateType::SharedStateType::create_shared();
510
437
        ss->id = operator_id();
511
437
        for (auto& dest : dests_id()) {
512
437
            ss->related_op_ids.insert(dest);
513
437
        }
514
437
        return ss;
515
437
    }
516
437
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
501
2.52k
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.52k
    } else {
509
2.52k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.52k
        ss->id = operator_id();
511
2.52k
        for (auto& dest : dests_id()) {
512
2.51k
            ss->related_op_ids.insert(dest);
513
2.51k
        }
514
2.52k
        return ss;
515
2.52k
    }
516
2.52k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
501
2.54k
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.54k
    } else {
509
2.54k
        auto ss = LocalStateType::SharedStateType::create_shared();
510
2.54k
        ss->id = operator_id();
511
2.54k
        for (auto& dest : dests_id()) {
512
2.54k
            ss->related_op_ids.insert(dest);
513
2.54k
        }
514
2.54k
        return ss;
515
2.54k
    }
516
2.54k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
165
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
165
    } else {
509
165
        auto ss = LocalStateType::SharedStateType::create_shared();
510
165
        ss->id = operator_id();
511
165
        for (auto& dest : dests_id()) {
512
165
            ss->related_op_ids.insert(dest);
513
165
        }
514
165
        return ss;
515
165
    }
516
165
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
501
104
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
502
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
503
                                 LocalExchangeSharedState>) {
504
        return nullptr;
505
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
506
                                        MultiCastSharedState>) {
507
        throw Exception(Status::FatalError("should not reach here!"));
508
104
    } else {
509
104
        auto ss = LocalStateType::SharedStateType::create_shared();
510
104
        ss->id = operator_id();
511
104
        for (auto& dest : dests_id()) {
512
104
            ss->related_op_ids.insert(dest);
513
104
        }
514
104
        return ss;
515
104
    }
516
104
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
517
518
template <typename LocalStateType>
519
2.64M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.64M
    auto local_state = LocalStateType::create_unique(state, this);
521
2.64M
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.64M
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.64M
    return Status::OK();
524
2.64M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
129k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
129k
    auto local_state = LocalStateType::create_unique(state, this);
521
129k
    RETURN_IF_ERROR(local_state->init(state, info));
522
129k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
129k
    return Status::OK();
524
129k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
312k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
312k
    auto local_state = LocalStateType::create_unique(state, this);
521
312k
    RETURN_IF_ERROR(local_state->init(state, info));
522
312k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
312k
    return Status::OK();
524
312k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
80
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
80
    auto local_state = LocalStateType::create_unique(state, this);
521
80
    RETURN_IF_ERROR(local_state->init(state, info));
522
80
    state->emplace_local_state(operator_id(), std::move(local_state));
523
80
    return Status::OK();
524
80
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.67k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.67k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.67k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.67k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.67k
    return Status::OK();
524
2.67k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16EsScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
7.10k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
7.10k
    auto local_state = LocalStateType::create_unique(state, this);
521
7.10k
    RETURN_IF_ERROR(local_state->init(state, info));
522
7.10k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
7.10k
    return Status::OK();
524
7.10k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
9.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
9.68k
    auto local_state = LocalStateType::create_unique(state, this);
521
9.68k
    RETURN_IF_ERROR(local_state->init(state, info));
522
9.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
9.68k
    return Status::OK();
524
9.68k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
27
    auto local_state = LocalStateType::create_unique(state, this);
521
27
    RETURN_IF_ERROR(local_state->init(state, info));
522
27
    state->emplace_local_state(operator_id(), std::move(local_state));
523
27
    return Status::OK();
524
27
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
191k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
191k
    auto local_state = LocalStateType::create_unique(state, this);
521
191k
    RETURN_IF_ERROR(local_state->init(state, info));
522
191k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
191k
    return Status::OK();
524
191k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
121k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
121k
    auto local_state = LocalStateType::create_unique(state, this);
521
121k
    RETURN_IF_ERROR(local_state->init(state, info));
522
121k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
121k
    return Status::OK();
524
121k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
639
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
639
    auto local_state = LocalStateType::create_unique(state, this);
521
639
    RETURN_IF_ERROR(local_state->init(state, info));
522
639
    state->emplace_local_state(operator_id(), std::move(local_state));
523
639
    return Status::OK();
524
639
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
5.11k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
5.11k
    auto local_state = LocalStateType::create_unique(state, this);
521
5.11k
    RETURN_IF_ERROR(local_state->init(state, info));
522
5.11k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
5.11k
    return Status::OK();
524
5.11k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
461k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
461k
    auto local_state = LocalStateType::create_unique(state, this);
521
461k
    RETURN_IF_ERROR(local_state->init(state, info));
522
461k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
461k
    return Status::OK();
524
461k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.36k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.36k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.36k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.36k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.36k
    return Status::OK();
524
1.36k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
6.99k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
6.99k
    auto local_state = LocalStateType::create_unique(state, this);
521
6.99k
    RETURN_IF_ERROR(local_state->init(state, info));
522
6.99k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
6.99k
    return Status::OK();
524
6.99k
}
_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.51k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.51k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.51k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.51k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.51k
    return Status::OK();
524
1.51k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
51.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
51.7k
    auto local_state = LocalStateType::create_unique(state, this);
521
51.7k
    RETURN_IF_ERROR(local_state->init(state, info));
522
51.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
51.7k
    return Status::OK();
524
51.7k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
6.87k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
6.87k
    auto local_state = LocalStateType::create_unique(state, this);
521
6.87k
    RETURN_IF_ERROR(local_state->init(state, info));
522
6.87k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
6.87k
    return Status::OK();
524
6.87k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
334
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
334
    auto local_state = LocalStateType::create_unique(state, this);
521
334
    RETURN_IF_ERROR(local_state->init(state, info));
522
334
    state->emplace_local_state(operator_id(), std::move(local_state));
523
334
    return Status::OK();
524
334
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.53k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.53k
    return Status::OK();
524
2.53k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
2.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
2.55k
    auto local_state = LocalStateType::create_unique(state, this);
521
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
522
2.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
2.55k
    return Status::OK();
524
2.55k
}
_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.16k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
5.16k
    auto local_state = LocalStateType::create_unique(state, this);
521
5.16k
    RETURN_IF_ERROR(local_state->init(state, info));
522
5.16k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
5.16k
    return Status::OK();
524
5.16k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
741k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
741k
    auto local_state = LocalStateType::create_unique(state, this);
521
741k
    RETURN_IF_ERROR(local_state->init(state, info));
522
741k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
741k
    return Status::OK();
524
741k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
107
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
107
    auto local_state = LocalStateType::create_unique(state, this);
521
107
    RETURN_IF_ERROR(local_state->init(state, info));
522
107
    state->emplace_local_state(operator_id(), std::move(local_state));
523
107
    return Status::OK();
524
107
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
150
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
150
    auto local_state = LocalStateType::create_unique(state, this);
521
150
    RETURN_IF_ERROR(local_state->init(state, info));
522
150
    state->emplace_local_state(operator_id(), std::move(local_state));
523
150
    return Status::OK();
524
150
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
1.85k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
1.85k
    auto local_state = LocalStateType::create_unique(state, this);
521
1.85k
    RETURN_IF_ERROR(local_state->init(state, info));
522
1.85k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
1.85k
    return Status::OK();
524
1.85k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
668
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
668
    auto local_state = LocalStateType::create_unique(state, this);
521
668
    RETURN_IF_ERROR(local_state->init(state, info));
522
668
    state->emplace_local_state(operator_id(), std::move(local_state));
523
668
    return Status::OK();
524
668
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
941
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
941
    auto local_state = LocalStateType::create_unique(state, this);
521
941
    RETURN_IF_ERROR(local_state->init(state, info));
522
941
    state->emplace_local_state(operator_id(), std::move(local_state));
523
941
    return Status::OK();
524
941
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
7.19k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
7.19k
    auto local_state = LocalStateType::create_unique(state, this);
521
7.19k
    RETURN_IF_ERROR(local_state->init(state, info));
522
7.19k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
7.19k
    return Status::OK();
524
7.19k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
519
568k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
520
568k
    auto local_state = LocalStateType::create_unique(state, this);
521
568k
    RETURN_IF_ERROR(local_state->init(state, info));
522
568k
    state->emplace_local_state(operator_id(), std::move(local_state));
523
568k
    return Status::OK();
524
568k
}
525
526
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
527
                                                         RuntimeState* state)
528
1.99M
        : _parent(parent), _state(state) {}
529
530
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
531
2.63M
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
532
533
template <typename SharedStateArg>
534
2.64M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
2.64M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
2.64M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
2.64M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
2.64M
    _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.64M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
2.64M
    _operator_profile->add_child(_common_profile.get(), true);
543
2.64M
    _operator_profile->add_child(_custom_profile.get(), true);
544
2.64M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
2.64M
    if constexpr (!is_fake_shared) {
546
1.27M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
750k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
750k
                                    .first.get()
549
750k
                                    ->template cast<SharedStateArg>();
550
551
750k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
750k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
750k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
750k
        } else if (info.shared_state) {
555
466k
            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
466k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
466k
            _dependency = _shared_state->create_source_dependency(
562
466k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
466k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
466k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
466k
        } else {
566
57.0k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
768
                DCHECK(false);
568
768
            }
569
57.0k
        }
570
1.27M
    }
571
572
2.64M
    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.64M
    _rows_returned_counter =
577
2.64M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
2.64M
    _blocks_returned_counter =
579
2.64M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
2.64M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
2.64M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
2.64M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
2.64M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
2.64M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
2.64M
    _memory_used_counter =
586
2.64M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
2.64M
    _common_profile->add_info_string("IsColocate",
588
2.64M
                                     std::to_string(_parent->is_colocated_operator()));
589
2.64M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
2.64M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
2.64M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
2.64M
    return Status::OK();
593
2.64M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
130k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
130k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
130k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
130k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
130k
    _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
130k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
130k
    _operator_profile->add_child(_common_profile.get(), true);
543
130k
    _operator_profile->add_child(_custom_profile.get(), true);
544
130k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
130k
    if constexpr (!is_fake_shared) {
546
130k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
10.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
10.1k
                                    .first.get()
549
10.1k
                                    ->template cast<SharedStateArg>();
550
551
10.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
10.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
10.1k
                    _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.80k
        }
570
130k
    }
571
572
130k
    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
130k
    _rows_returned_counter =
577
130k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
130k
    _blocks_returned_counter =
579
130k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
130k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
130k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
130k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
130k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
130k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
130k
    _memory_used_counter =
586
130k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
130k
    _common_profile->add_info_string("IsColocate",
588
130k
                                     std::to_string(_parent->is_colocated_operator()));
589
130k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
130k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
130k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
130k
    return Status::OK();
593
130k
}
_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
200k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
200k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
200k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
200k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
200k
    _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
200k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
200k
    _operator_profile->add_child(_common_profile.get(), true);
543
200k
    _operator_profile->add_child(_custom_profile.get(), true);
544
200k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
200k
    if constexpr (!is_fake_shared) {
546
200k
        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
200k
        } 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
195k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
195k
            _dependency = _shared_state->create_source_dependency(
562
195k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
195k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
195k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
195k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
5.11k
        }
570
200k
    }
571
572
200k
    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
200k
    _rows_returned_counter =
577
200k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
200k
    _blocks_returned_counter =
579
200k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
200k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
200k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
200k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
200k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
200k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
200k
    _memory_used_counter =
586
200k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
200k
    _common_profile->add_info_string("IsColocate",
588
200k
                                     std::to_string(_parent->is_colocated_operator()));
589
200k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
200k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
200k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
200k
    return Status::OK();
593
200k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
27
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
27
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
27
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
27
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
27
    _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
27
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
27
    _operator_profile->add_child(_common_profile.get(), true);
543
27
    _operator_profile->add_child(_custom_profile.get(), true);
544
27
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
27
    if constexpr (!is_fake_shared) {
546
27
        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
27
        } 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
27
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
27
            _dependency = _shared_state->create_source_dependency(
562
27
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
27
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
27
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
27
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
27
    }
571
572
27
    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
27
    _rows_returned_counter =
577
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
27
    _blocks_returned_counter =
579
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
27
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
27
    _memory_used_counter =
586
27
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
27
    _common_profile->add_info_string("IsColocate",
588
27
                                     std::to_string(_parent->is_colocated_operator()));
589
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
27
    return Status::OK();
593
27
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
6.95k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
6.95k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
6.95k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
6.95k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
6.95k
    _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.95k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
6.95k
    _operator_profile->add_child(_common_profile.get(), true);
543
6.95k
    _operator_profile->add_child(_custom_profile.get(), true);
544
6.95k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
6.95k
    if constexpr (!is_fake_shared) {
546
6.95k
        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.98k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
6.98k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
6.98k
            _dependency = _shared_state->create_source_dependency(
562
6.98k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
6.98k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
6.98k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
18.4E
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
18.4E
        }
570
6.95k
    }
571
572
6.95k
    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.95k
    _rows_returned_counter =
577
6.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
6.95k
    _blocks_returned_counter =
579
6.95k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
6.95k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
6.95k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
6.95k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
6.95k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
6.95k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
6.95k
    _memory_used_counter =
586
6.95k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
6.95k
    _common_profile->add_info_string("IsColocate",
588
6.95k
                                     std::to_string(_parent->is_colocated_operator()));
589
6.95k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
6.95k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
6.95k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
6.95k
    return Status::OK();
593
6.95k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
7.11k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
7.11k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
7.11k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
7.11k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
7.11k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
7.11k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
7.11k
    _operator_profile->add_child(_common_profile.get(), true);
543
7.11k
    _operator_profile->add_child(_custom_profile.get(), true);
544
7.11k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
7.11k
    if constexpr (!is_fake_shared) {
546
7.11k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
7.11k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
7.10k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
7.10k
            _dependency = _shared_state->create_source_dependency(
562
7.10k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
7.10k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
7.10k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
7.10k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
7
        }
570
7.11k
    }
571
572
7.11k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
7.11k
    _rows_returned_counter =
577
7.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
7.11k
    _blocks_returned_counter =
579
7.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
7.11k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
7.11k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
7.11k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
7.11k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
7.11k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
7.11k
    _memory_used_counter =
586
7.11k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
7.11k
    _common_profile->add_info_string("IsColocate",
588
7.11k
                                     std::to_string(_parent->is_colocated_operator()));
589
7.11k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
7.11k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
7.11k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
7.11k
    return Status::OK();
593
7.11k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
122k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
122k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
122k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
122k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
122k
    _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
122k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
122k
    _operator_profile->add_child(_common_profile.get(), true);
543
122k
    _operator_profile->add_child(_custom_profile.get(), true);
544
122k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
122k
    if constexpr (!is_fake_shared) {
546
122k
        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
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.71k
        }
570
122k
    }
571
572
122k
    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
122k
    _rows_returned_counter =
577
122k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
122k
    _blocks_returned_counter =
579
122k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
122k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
122k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
122k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
122k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
122k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
122k
    _memory_used_counter =
586
122k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
122k
    _common_profile->add_info_string("IsColocate",
588
122k
                                     std::to_string(_parent->is_colocated_operator()));
589
122k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
122k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
122k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
122k
    return Status::OK();
593
122k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
639
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
639
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
639
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
639
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
639
    _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
639
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
639
    _operator_profile->add_child(_common_profile.get(), true);
543
639
    _operator_profile->add_child(_custom_profile.get(), true);
544
639
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
639
    if constexpr (!is_fake_shared) {
546
639
        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
639
        } 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
639
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
639
            _dependency = _shared_state->create_source_dependency(
562
639
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
639
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
639
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
639
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
0
        }
570
639
    }
571
572
639
    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
639
    _rows_returned_counter =
577
639
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
639
    _blocks_returned_counter =
579
639
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
639
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
639
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
639
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
639
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
639
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
639
    _memory_used_counter =
586
639
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
639
    _common_profile->add_info_string("IsColocate",
588
639
                                     std::to_string(_parent->is_colocated_operator()));
589
639
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
639
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
639
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
639
    return Status::OK();
593
639
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
1.36M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
1.36M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
1.36M
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
1.36M
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
1.36M
    _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.36M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
1.36M
    _operator_profile->add_child(_common_profile.get(), true);
543
1.36M
    _operator_profile->add_child(_custom_profile.get(), true);
544
1.36M
    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.36M
    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.36M
    _rows_returned_counter =
577
1.36M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
1.36M
    _blocks_returned_counter =
579
1.36M
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
1.36M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
1.36M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
1.36M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
1.36M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
1.36M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
1.36M
    _memory_used_counter =
586
1.36M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
1.36M
    _common_profile->add_info_string("IsColocate",
588
1.36M
                                     std::to_string(_parent->is_colocated_operator()));
589
1.36M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
1.36M
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
1.36M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
1.36M
    return Status::OK();
593
1.36M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
51.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
51.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
51.6k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
51.6k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
51.6k
    _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
51.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
51.6k
    _operator_profile->add_child(_common_profile.get(), true);
543
51.6k
    _operator_profile->add_child(_custom_profile.get(), true);
544
51.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
51.6k
    if constexpr (!is_fake_shared) {
546
51.6k
        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
51.6k
        } 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.04k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
4.04k
            _dependency = _shared_state->create_source_dependency(
562
4.04k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
4.04k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
4.04k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
47.6k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
47.6k
        }
570
51.6k
    }
571
572
51.6k
    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
51.6k
    _rows_returned_counter =
577
51.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
51.6k
    _blocks_returned_counter =
579
51.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
51.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
51.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
51.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
51.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
51.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
51.6k
    _memory_used_counter =
586
51.6k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
51.6k
    _common_profile->add_info_string("IsColocate",
588
51.6k
                                     std::to_string(_parent->is_colocated_operator()));
589
51.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
51.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
51.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
51.6k
    return Status::OK();
593
51.6k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
110
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
110
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
110
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
110
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
110
    _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
110
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
110
    _operator_profile->add_child(_common_profile.get(), true);
543
110
    _operator_profile->add_child(_custom_profile.get(), true);
544
110
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
110
    if constexpr (!is_fake_shared) {
546
110
        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
110
        } 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
109
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
109
            _dependency = _shared_state->create_source_dependency(
562
109
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
109
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
109
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
109
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
1
        }
570
110
    }
571
572
110
    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
110
    _rows_returned_counter =
577
110
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
110
    _blocks_returned_counter =
579
110
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
110
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
110
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
110
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
110
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
110
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
110
    _memory_used_counter =
586
110
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
110
    _common_profile->add_info_string("IsColocate",
588
110
                                     std::to_string(_parent->is_colocated_operator()));
589
110
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
110
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
110
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
110
    return Status::OK();
593
110
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
6.88k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
6.88k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
6.88k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
6.88k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
6.88k
    _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.88k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
6.88k
    _operator_profile->add_child(_common_profile.get(), true);
543
6.88k
    _operator_profile->add_child(_custom_profile.get(), true);
544
6.88k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
6.88k
    if constexpr (!is_fake_shared) {
546
6.88k
        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.88k
        } 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.86k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
6.86k
            _dependency = _shared_state->create_source_dependency(
562
6.86k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
6.86k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
6.86k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
6.86k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
17
        }
570
6.88k
    }
571
572
6.88k
    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.88k
    _rows_returned_counter =
577
6.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
6.88k
    _blocks_returned_counter =
579
6.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
6.88k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
6.88k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
6.88k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
6.88k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
6.88k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
6.88k
    _memory_used_counter =
586
6.88k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
6.88k
    _common_profile->add_info_string("IsColocate",
588
6.88k
                                     std::to_string(_parent->is_colocated_operator()));
589
6.88k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
6.88k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
6.88k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
6.88k
    return Status::OK();
593
6.88k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
437
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
437
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
437
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
437
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
437
    _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
437
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
437
    _operator_profile->add_child(_common_profile.get(), true);
543
437
    _operator_profile->add_child(_custom_profile.get(), true);
544
437
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
437
    if constexpr (!is_fake_shared) {
546
437
        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
437
        } 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
436
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
436
            _dependency = _shared_state->create_source_dependency(
562
436
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
436
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
436
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
436
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
1
        }
570
437
    }
571
572
437
    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
437
    _rows_returned_counter =
577
437
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
437
    _blocks_returned_counter =
579
437
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
437
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
437
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
437
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
437
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
437
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
437
    _memory_used_counter =
586
437
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
437
    _common_profile->add_info_string("IsColocate",
588
437
                                     std::to_string(_parent->is_colocated_operator()));
589
437
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
437
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
437
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
437
    return Status::OK();
593
437
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
5.11k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
5.11k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
5.11k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
5.11k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
5.11k
    _operator_profile->set_metadata(_parent->node_id());
539
    // indent is false so that source operator will have same
540
    // indentation_level with its parent operator.
541
5.11k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
5.11k
    _operator_profile->add_child(_common_profile.get(), true);
543
5.11k
    _operator_profile->add_child(_custom_profile.get(), true);
544
5.11k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
5.11k
    if constexpr (!is_fake_shared) {
546
5.11k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
0
                                    .first.get()
549
0
                                    ->template cast<SharedStateArg>();
550
551
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
5.11k
        } else if (info.shared_state) {
555
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
556
                DCHECK(false);
557
            }
558
            // For UnionSourceOperator without children, there is no shared state.
559
5.08k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
560
561
5.08k
            _dependency = _shared_state->create_source_dependency(
562
5.08k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
563
5.08k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
564
5.08k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
565
5.08k
        } else {
566
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
                DCHECK(false);
568
            }
569
27
        }
570
5.11k
    }
571
572
5.11k
    if (must_set_shared_state() && _shared_state == nullptr) {
573
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
574
0
    }
575
576
5.11k
    _rows_returned_counter =
577
5.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
5.11k
    _blocks_returned_counter =
579
5.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
5.11k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
5.11k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
5.11k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
5.11k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
5.11k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
5.11k
    _memory_used_counter =
586
5.11k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
5.11k
    _common_profile->add_info_string("IsColocate",
588
5.11k
                                     std::to_string(_parent->is_colocated_operator()));
589
5.11k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
5.11k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
5.11k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
5.11k
    return Status::OK();
593
5.11k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
534
740k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
535
740k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
536
740k
    _common_profile.reset(new RuntimeProfile("CommonCounters"));
537
740k
    _custom_profile.reset(new RuntimeProfile("CustomCounters"));
538
740k
    _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
740k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
542
740k
    _operator_profile->add_child(_common_profile.get(), true);
543
740k
    _operator_profile->add_child(_custom_profile.get(), true);
544
740k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
545
740k
    if constexpr (!is_fake_shared) {
546
740k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
547
740k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
548
740k
                                    .first.get()
549
740k
                                    ->template cast<SharedStateArg>();
550
551
740k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
552
740k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
553
740k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
554
740k
        } 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
768
        } else {
566
768
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
567
768
                DCHECK(false);
568
768
            }
569
768
        }
570
740k
    }
571
572
740k
    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
740k
    _rows_returned_counter =
577
740k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "RowsProduced", TUnit::UNIT, 1);
578
740k
    _blocks_returned_counter =
579
740k
            ADD_COUNTER_WITH_LEVEL(_common_profile, "BlocksProduced", TUnit::UNIT, 1);
580
740k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ProjectionTime", 2);
581
740k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
582
740k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
583
740k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
584
740k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
585
740k
    _memory_used_counter =
586
740k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
587
740k
    _common_profile->add_info_string("IsColocate",
588
740k
                                     std::to_string(_parent->is_colocated_operator()));
589
740k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
590
740k
    _common_profile->add_info_string("FollowedByShuffledOperator",
591
740k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
592
740k
    return Status::OK();
593
740k
}
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.65M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
2.65M
    _conjuncts.resize(_parent->_conjuncts.size());
598
2.65M
    _projections.resize(_parent->_projections.size());
599
2.98M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
331k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
331k
    }
602
5.17M
    for (size_t i = 0; i < _projections.size(); i++) {
603
2.52M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
2.52M
    }
605
2.65M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
2.66M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
5.70k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
37.2k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
31.5k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
31.5k
                    state, _intermediate_projections[i][j]));
611
31.5k
        }
612
5.70k
    }
613
2.65M
    return Status::OK();
614
2.65M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
130k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
130k
    _conjuncts.resize(_parent->_conjuncts.size());
598
130k
    _projections.resize(_parent->_projections.size());
599
131k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.26k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.26k
    }
602
680k
    for (size_t i = 0; i < _projections.size(); i++) {
603
549k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
549k
    }
605
130k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
131k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
661
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
5.90k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
5.24k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
5.24k
                    state, _intermediate_projections[i][j]));
611
5.24k
        }
612
661
    }
613
130k
    return Status::OK();
614
130k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
3
    _conjuncts.resize(_parent->_conjuncts.size());
598
3
    _projections.resize(_parent->_projections.size());
599
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
3
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
3
    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
3
    return Status::OK();
614
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
202k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
202k
    _conjuncts.resize(_parent->_conjuncts.size());
598
202k
    _projections.resize(_parent->_projections.size());
599
202k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
222k
    for (size_t i = 0; i < _projections.size(); i++) {
603
20.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
20.0k
    }
605
202k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
202k
    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
202k
    return Status::OK();
614
202k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
26
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
26
    _conjuncts.resize(_parent->_conjuncts.size());
598
26
    _projections.resize(_parent->_projections.size());
599
26
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
26
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
26
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
26
    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
26
    return Status::OK();
614
26
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
7.03k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
7.03k
    _conjuncts.resize(_parent->_conjuncts.size());
598
7.03k
    _projections.resize(_parent->_projections.size());
599
7.12k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
97
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
97
    }
602
34.0k
    for (size_t i = 0; i < _projections.size(); i++) {
603
27.0k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
27.0k
    }
605
7.03k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
7.05k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
25
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
204
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
179
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
179
                    state, _intermediate_projections[i][j]));
611
179
        }
612
25
    }
613
7.03k
    return Status::OK();
614
7.03k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
7.17k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
7.17k
    _conjuncts.resize(_parent->_conjuncts.size());
598
7.17k
    _projections.resize(_parent->_projections.size());
599
7.88k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
710
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
710
    }
602
19.1k
    for (size_t i = 0; i < _projections.size(); i++) {
603
11.9k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
11.9k
    }
605
7.17k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
7.34k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
171
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.29k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
1.12k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
1.12k
                    state, _intermediate_projections[i][j]));
611
1.12k
        }
612
171
    }
613
7.17k
    return Status::OK();
614
7.17k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
122k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
122k
    _conjuncts.resize(_parent->_conjuncts.size());
598
122k
    _projections.resize(_parent->_projections.size());
599
124k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.64k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.64k
    }
602
434k
    for (size_t i = 0; i < _projections.size(); i++) {
603
311k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
311k
    }
605
122k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
122k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
127
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
1.00k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
874
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
874
                    state, _intermediate_projections[i][j]));
611
874
        }
612
127
    }
613
122k
    return Status::OK();
614
122k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
643
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
643
    _conjuncts.resize(_parent->_conjuncts.size());
598
643
    _projections.resize(_parent->_projections.size());
599
643
    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.49k
    for (size_t i = 0; i < _projections.size(); i++) {
603
856
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
856
    }
605
643
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
643
    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
643
    return Status::OK();
614
643
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
1.37M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
1.37M
    _conjuncts.resize(_parent->_conjuncts.size());
598
1.37M
    _projections.resize(_parent->_projections.size());
599
1.70M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
326k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
326k
    }
602
2.88M
    for (size_t i = 0; i < _projections.size(); i++) {
603
1.50M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
1.50M
    }
605
1.37M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
1.38M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
4.72k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
28.8k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
24.0k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
24.0k
                    state, _intermediate_projections[i][j]));
611
24.0k
        }
612
4.72k
    }
613
1.37M
    return Status::OK();
614
1.37M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
51.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
51.9k
    _conjuncts.resize(_parent->_conjuncts.size());
598
51.9k
    _projections.resize(_parent->_projections.size());
599
51.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
146k
    for (size_t i = 0; i < _projections.size(); i++) {
603
94.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
94.7k
    }
605
51.9k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
51.9k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
51.9k
    return Status::OK();
614
51.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
111
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
111
    _conjuncts.resize(_parent->_conjuncts.size());
598
111
    _projections.resize(_parent->_projections.size());
599
111
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
111
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
111
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
111
    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
111
    return Status::OK();
614
111
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
6.88k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
6.88k
    _conjuncts.resize(_parent->_conjuncts.size());
598
6.88k
    _projections.resize(_parent->_projections.size());
599
8.18k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
1.30k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
1.30k
    }
602
6.88k
    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.88k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
6.88k
    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.88k
    return Status::OK();
614
6.88k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
436
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
436
    _conjuncts.resize(_parent->_conjuncts.size());
598
436
    _projections.resize(_parent->_projections.size());
599
436
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
436
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
436
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
436
    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
436
    return Status::OK();
614
436
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
5.10k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
5.10k
    _conjuncts.resize(_parent->_conjuncts.size());
598
5.10k
    _projections.resize(_parent->_projections.size());
599
5.10k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
5.10k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
5.10k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
5.10k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
0
                    state, _intermediate_projections[i][j]));
611
0
        }
612
0
    }
613
5.10k
    return Status::OK();
614
5.10k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
747k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
747k
    _conjuncts.resize(_parent->_conjuncts.size());
598
747k
    _projections.resize(_parent->_projections.size());
599
747k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
0
    }
602
747k
    for (size_t i = 0; i < _projections.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
0
    }
605
747k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
747k
    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
747k
    return Status::OK();
614
747k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
596
150
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
597
150
    _conjuncts.resize(_parent->_conjuncts.size());
598
150
    _projections.resize(_parent->_projections.size());
599
157
    for (size_t i = 0; i < _conjuncts.size(); i++) {
600
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
601
7
    }
602
443
    for (size_t i = 0; i < _projections.size(); i++) {
603
293
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
604
293
    }
605
150
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
606
151
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
607
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
608
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
609
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
610
2
                    state, _intermediate_projections[i][j]));
611
2
        }
612
1
    }
613
150
    return Status::OK();
614
150
}
615
616
template <typename SharedStateArg>
617
8.24k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
8.24k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
8.24k
    _terminated = true;
622
8.24k
    return Status::OK();
623
8.24k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
416
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
416
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
416
    _terminated = true;
622
416
    return Status::OK();
623
416
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
154
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
154
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
154
    _terminated = true;
622
154
    return Status::OK();
623
154
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
61
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
61
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
61
    _terminated = true;
622
61
    return Status::OK();
623
61
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
1
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
1
    _terminated = true;
622
1
    return Status::OK();
623
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
1.30k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
1.30k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
1.30k
    _terminated = true;
622
1.30k
    return Status::OK();
623
1.30k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
5.44k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
5.44k
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
5.44k
    _terminated = true;
622
5.44k
    return Status::OK();
623
5.44k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
10
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
10
    _terminated = true;
622
10
    return Status::OK();
623
10
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
22
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
22
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
22
    _terminated = true;
622
22
    return Status::OK();
623
22
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
791
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
791
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
791
    _terminated = true;
622
791
    return Status::OK();
623
791
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
617
19
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
618
19
    if (_terminated) {
619
0
        return Status::OK();
620
0
    }
621
19
    _terminated = true;
622
19
    return Status::OK();
623
19
}
624
625
template <typename SharedStateArg>
626
2.88M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
2.88M
    if (_closed) {
628
230k
        return Status::OK();
629
230k
    }
630
2.65M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
1.28M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
1.28M
    }
633
2.65M
    _closed = true;
634
2.65M
    return Status::OK();
635
2.88M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
130k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
130k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
130k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
130k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
130k
    }
633
130k
    _closed = true;
634
130k
    return Status::OK();
635
130k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
3
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
3
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
3
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
3
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
3
    }
633
3
    _closed = true;
634
3
    return Status::OK();
635
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
402k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
402k
    if (_closed) {
628
201k
        return Status::OK();
629
201k
    }
630
201k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
201k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
201k
    }
633
201k
    _closed = true;
634
201k
    return Status::OK();
635
402k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
26
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
26
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
26
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
26
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
26
    }
633
26
    _closed = true;
634
26
    return Status::OK();
635
26
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
7.01k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
7.01k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
7.01k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
7.01k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
7.01k
    }
633
7.01k
    _closed = true;
634
7.01k
    return Status::OK();
635
7.01k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
14.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
14.4k
    if (_closed) {
628
7.28k
        return Status::OK();
629
7.28k
    }
630
7.15k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
7.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
7.15k
    }
633
7.15k
    _closed = true;
634
7.15k
    return Status::OK();
635
14.4k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
121k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
121k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
121k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
121k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
121k
    }
633
121k
    _closed = true;
634
121k
    return Status::OK();
635
121k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
638
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
638
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
638
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
638
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
638
    }
633
638
    _closed = true;
634
638
    return Status::OK();
635
638
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
1.39M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
1.39M
    if (_closed) {
628
16.2k
        return Status::OK();
629
16.2k
    }
630
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
    }
633
1.37M
    _closed = true;
634
1.37M
    return Status::OK();
635
1.39M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
51.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
51.9k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
51.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
51.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
51.9k
    }
633
51.9k
    _closed = true;
634
51.9k
    return Status::OK();
635
51.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
216
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
216
    if (_closed) {
628
108
        return Status::OK();
629
108
    }
630
108
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
108
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
108
    }
633
108
    _closed = true;
634
108
    return Status::OK();
635
216
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
6.86k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
6.86k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
6.86k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
6.86k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
6.86k
    }
633
6.86k
    _closed = true;
634
6.86k
    return Status::OK();
635
6.86k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
669
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
669
    if (_closed) {
628
335
        return Status::OK();
629
335
    }
630
334
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
334
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
334
    }
633
334
    _closed = true;
634
334
    return Status::OK();
635
669
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
10.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
10.2k
    if (_closed) {
628
5.13k
        return Status::OK();
629
5.13k
    }
630
5.10k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
5.10k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
5.10k
    }
633
5.10k
    _closed = true;
634
5.10k
    return Status::OK();
635
10.2k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
748k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
748k
    if (_closed) {
628
0
        return Status::OK();
629
0
    }
630
748k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
631
748k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
632
748k
    }
633
748k
    _closed = true;
634
748k
    return Status::OK();
635
748k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
626
313
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
627
313
    if (_closed) {
628
163
        return Status::OK();
629
163
    }
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
313
}
636
637
template <typename SharedState>
638
1.99M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
1.99M
    _operator_profile =
641
1.99M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
1.99M
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
1.99M
    _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.99M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
1.99M
    _operator_profile->add_child(_common_profile, true);
650
1.99M
    _operator_profile->add_child(_custom_profile, true);
651
652
1.99M
    _operator_profile->set_metadata(_parent->node_id());
653
1.99M
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
1.99M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
1.99M
    if constexpr (!is_fake_shared) {
656
1.37M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
1.37M
            info.shared_state_map.end()) {
658
363k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
352k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
352k
            }
661
363k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
363k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
363k
                                                  ? 0
664
363k
                                                  : info.task_idx]
665
363k
                                  .get();
666
363k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
1.00M
        } else {
668
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
18.4E
                DCHECK(false);
670
18.4E
            }
671
1.00M
            _shared_state = info.shared_state->template cast<SharedState>();
672
1.00M
            _dependency = _shared_state->create_sink_dependency(
673
1.00M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
1.00M
        }
675
1.37M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
1.37M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
1.37M
    }
678
679
1.99M
    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.99M
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
1.99M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
1.99M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
1.99M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
1.99M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
1.99M
    _memory_used_counter =
689
1.99M
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
1.99M
    _common_profile->add_info_string("IsColocate",
691
1.99M
                                     std::to_string(_parent->is_colocated_operator()));
692
1.99M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
1.99M
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
1.99M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
1.99M
    return Status::OK();
696
1.99M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
178k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
178k
    _operator_profile =
641
178k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
178k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
178k
    _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
178k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
178k
    _operator_profile->add_child(_common_profile, true);
650
178k
    _operator_profile->add_child(_custom_profile, true);
651
652
178k
    _operator_profile->set_metadata(_parent->node_id());
653
178k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
178k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
178k
    if constexpr (!is_fake_shared) {
656
178k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
178k
            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
10.1k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
10.1k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
10.1k
                                                  ? 0
664
10.1k
                                                  : info.task_idx]
665
10.1k
                                  .get();
666
10.1k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
168k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
168k
            _shared_state = info.shared_state->template cast<SharedState>();
672
168k
            _dependency = _shared_state->create_sink_dependency(
673
168k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
168k
        }
675
178k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
178k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
178k
    }
678
679
178k
    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
178k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
178k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
178k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
178k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
178k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
178k
    _memory_used_counter =
689
178k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
178k
    _common_profile->add_info_string("IsColocate",
691
178k
                                     std::to_string(_parent->is_colocated_operator()));
692
178k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
178k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
178k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
178k
    return Status::OK();
696
178k
}
_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
201k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
201k
    _operator_profile =
641
201k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
201k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
201k
    _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
201k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
201k
    _operator_profile->add_child(_common_profile, true);
650
201k
    _operator_profile->add_child(_custom_profile, true);
651
652
201k
    _operator_profile->set_metadata(_parent->node_id());
653
201k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
201k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
201k
    if constexpr (!is_fake_shared) {
656
201k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
201k
            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
201k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
201k
            _shared_state = info.shared_state->template cast<SharedState>();
672
201k
            _dependency = _shared_state->create_sink_dependency(
673
201k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
201k
        }
675
201k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
201k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
201k
    }
678
679
201k
    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
201k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
201k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
201k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
201k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
201k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
201k
    _memory_used_counter =
689
201k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
201k
    _common_profile->add_info_string("IsColocate",
691
201k
                                     std::to_string(_parent->is_colocated_operator()));
692
201k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
201k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
201k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
201k
    return Status::OK();
696
201k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
33
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
33
    _operator_profile =
641
33
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
33
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
33
    _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
33
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
33
    _operator_profile->add_child(_common_profile, true);
650
33
    _operator_profile->add_child(_custom_profile, true);
651
652
33
    _operator_profile->set_metadata(_parent->node_id());
653
33
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
33
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
33
    if constexpr (!is_fake_shared) {
656
33
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
33
            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
33
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
33
            _shared_state = info.shared_state->template cast<SharedState>();
672
33
            _dependency = _shared_state->create_sink_dependency(
673
33
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
33
        }
675
33
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
33
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
33
    }
678
679
33
    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
33
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
33
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
33
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
33
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
33
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
33
    _memory_used_counter =
689
33
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
33
    _common_profile->add_info_string("IsColocate",
691
33
                                     std::to_string(_parent->is_colocated_operator()));
692
33
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
33
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
33
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
33
    return Status::OK();
696
33
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
7.01k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
7.01k
    _operator_profile =
641
7.01k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
7.01k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
7.01k
    _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.01k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
7.01k
    _operator_profile->add_child(_common_profile, true);
650
7.01k
    _operator_profile->add_child(_custom_profile, true);
651
652
7.01k
    _operator_profile->set_metadata(_parent->node_id());
653
7.01k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
7.01k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
7.01k
    if constexpr (!is_fake_shared) {
656
7.01k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
7.01k
            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.01k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
7.01k
            _shared_state = info.shared_state->template cast<SharedState>();
672
7.01k
            _dependency = _shared_state->create_sink_dependency(
673
7.01k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
7.01k
        }
675
7.01k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
7.01k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
7.01k
    }
678
679
7.01k
    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.01k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
7.01k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
7.01k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
7.01k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
7.01k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
7.01k
    _memory_used_counter =
689
7.01k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
7.01k
    _common_profile->add_info_string("IsColocate",
691
7.01k
                                     std::to_string(_parent->is_colocated_operator()));
692
7.01k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
7.01k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
7.01k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
7.01k
    return Status::OK();
696
7.01k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
7.15k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
7.15k
    _operator_profile =
641
7.15k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
7.15k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
7.15k
    _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.15k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
7.15k
    _operator_profile->add_child(_common_profile, true);
650
7.15k
    _operator_profile->add_child(_custom_profile, true);
651
652
7.15k
    _operator_profile->set_metadata(_parent->node_id());
653
7.15k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
7.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
7.15k
    if constexpr (!is_fake_shared) {
656
7.15k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
7.15k
            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.15k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
7.15k
            _shared_state = info.shared_state->template cast<SharedState>();
672
7.15k
            _dependency = _shared_state->create_sink_dependency(
673
7.15k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
7.15k
        }
675
7.15k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
7.15k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
7.15k
    }
678
679
7.15k
    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.15k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
7.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
7.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
7.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
7.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
7.15k
    _memory_used_counter =
689
7.15k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
7.15k
    _common_profile->add_info_string("IsColocate",
691
7.15k
                                     std::to_string(_parent->is_colocated_operator()));
692
7.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
7.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
7.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
7.15k
    return Status::OK();
696
7.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
122k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
122k
    _operator_profile =
641
122k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
122k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
122k
    _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
122k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
122k
    _operator_profile->add_child(_common_profile, true);
650
122k
    _operator_profile->add_child(_custom_profile, true);
651
652
122k
    _operator_profile->set_metadata(_parent->node_id());
653
122k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
122k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
122k
    if constexpr (!is_fake_shared) {
656
122k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
122k
            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
122k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
122k
            _shared_state = info.shared_state->template cast<SharedState>();
672
122k
            _dependency = _shared_state->create_sink_dependency(
673
122k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
122k
        }
675
122k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
122k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
122k
    }
678
679
122k
    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
122k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
122k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
122k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
122k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
122k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
122k
    _memory_used_counter =
689
122k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
122k
    _common_profile->add_info_string("IsColocate",
691
122k
                                     std::to_string(_parent->is_colocated_operator()));
692
122k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
122k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
122k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
122k
    return Status::OK();
696
122k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
649
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
649
    _operator_profile =
641
649
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
649
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
649
    _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
649
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
649
    _operator_profile->add_child(_common_profile, true);
650
649
    _operator_profile->add_child(_custom_profile, true);
651
652
649
    _operator_profile->set_metadata(_parent->node_id());
653
649
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
649
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
649
    if constexpr (!is_fake_shared) {
656
649
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
649
            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
649
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
649
            _shared_state = info.shared_state->template cast<SharedState>();
672
649
            _dependency = _shared_state->create_sink_dependency(
673
649
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
649
        }
675
649
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
649
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
649
    }
678
679
649
    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
649
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
649
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
649
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
649
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
649
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
649
    _memory_used_counter =
689
649
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
649
    _common_profile->add_info_string("IsColocate",
691
649
                                     std::to_string(_parent->is_colocated_operator()));
692
649
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
649
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
649
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
649
    return Status::OK();
696
649
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
626k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
626k
    _operator_profile =
641
626k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
626k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
626k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
626k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
626k
    _operator_profile->add_child(_common_profile, true);
650
626k
    _operator_profile->add_child(_custom_profile, true);
651
652
626k
    _operator_profile->set_metadata(_parent->node_id());
653
626k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
626k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
    if constexpr (!is_fake_shared) {
656
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
                                                  ? 0
664
                                                  : info.task_idx]
665
                                  .get();
666
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
            _shared_state = info.shared_state->template cast<SharedState>();
672
            _dependency = _shared_state->create_sink_dependency(
673
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
        }
675
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
    }
678
679
626k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
626k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
626k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
626k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
626k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
626k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
626k
    _memory_used_counter =
689
626k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
626k
    _common_profile->add_info_string("IsColocate",
691
626k
                                     std::to_string(_parent->is_colocated_operator()));
692
626k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
626k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
626k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
626k
    return Status::OK();
696
626k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
8.92k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
8.92k
    _operator_profile =
641
8.92k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
8.92k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
8.92k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile("CustomCounters"));
644
645
    // indentation is true
646
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
647
    // So we should set the indentation to true.
648
8.92k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
8.92k
    _operator_profile->add_child(_common_profile, true);
650
8.92k
    _operator_profile->add_child(_custom_profile, true);
651
652
8.92k
    _operator_profile->set_metadata(_parent->node_id());
653
8.92k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
8.92k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
8.92k
    if constexpr (!is_fake_shared) {
656
8.92k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
8.92k
            info.shared_state_map.end()) {
658
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
            }
661
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
0
                                                  ? 0
664
0
                                                  : info.task_idx]
665
0
                                  .get();
666
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
8.92k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
8.92k
            _shared_state = info.shared_state->template cast<SharedState>();
672
8.92k
            _dependency = _shared_state->create_sink_dependency(
673
8.92k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
8.92k
        }
675
8.92k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
8.92k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
8.92k
    }
678
679
8.92k
    if (must_set_shared_state() && _shared_state == nullptr) {
680
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
681
0
    }
682
683
8.92k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
8.92k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
8.92k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
8.92k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
8.92k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
8.92k
    _memory_used_counter =
689
8.92k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
8.92k
    _common_profile->add_info_string("IsColocate",
691
8.92k
                                     std::to_string(_parent->is_colocated_operator()));
692
8.92k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
8.92k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
8.92k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
8.92k
    return Status::OK();
696
8.92k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
437
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
437
    _operator_profile =
641
437
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
437
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
437
    _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
437
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
437
    _operator_profile->add_child(_common_profile, true);
650
437
    _operator_profile->add_child(_custom_profile, true);
651
652
437
    _operator_profile->set_metadata(_parent->node_id());
653
437
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
437
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
437
    if constexpr (!is_fake_shared) {
656
437
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
437
            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
437
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
437
            _shared_state = info.shared_state->template cast<SharedState>();
672
437
            _dependency = _shared_state->create_sink_dependency(
673
437
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
437
        }
675
437
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
437
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
437
    }
678
679
437
    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
437
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
437
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
437
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
437
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
437
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
437
    _memory_used_counter =
689
437
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
437
    _common_profile->add_info_string("IsColocate",
691
437
                                     std::to_string(_parent->is_colocated_operator()));
692
437
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
437
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
437
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
437
    return Status::OK();
696
437
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
2.69k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
2.69k
    _operator_profile =
641
2.69k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
2.69k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
2.69k
    _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.69k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
2.69k
    _operator_profile->add_child(_common_profile, true);
650
2.69k
    _operator_profile->add_child(_custom_profile, true);
651
652
2.69k
    _operator_profile->set_metadata(_parent->node_id());
653
2.69k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
2.69k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
2.69k
    if constexpr (!is_fake_shared) {
656
2.69k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
2.69k
            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.69k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
2.69k
            _shared_state = info.shared_state->template cast<SharedState>();
672
2.69k
            _dependency = _shared_state->create_sink_dependency(
673
2.69k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
2.69k
        }
675
2.69k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
2.69k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
2.69k
    }
678
679
2.69k
    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.69k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
2.69k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
2.69k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
2.69k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
2.69k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
2.69k
    _memory_used_counter =
689
2.69k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
2.69k
    _common_profile->add_info_string("IsColocate",
691
2.69k
                                     std::to_string(_parent->is_colocated_operator()));
692
2.69k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
2.69k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
2.69k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
2.69k
    return Status::OK();
696
2.69k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
12.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
12.5k
    _operator_profile =
641
12.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
12.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
12.5k
    _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.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
12.5k
    _operator_profile->add_child(_common_profile, true);
650
12.5k
    _operator_profile->add_child(_custom_profile, true);
651
652
12.5k
    _operator_profile->set_metadata(_parent->node_id());
653
12.5k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
12.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
12.5k
    if constexpr (!is_fake_shared) {
656
12.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
12.5k
            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.5k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
12.5k
            _shared_state = info.shared_state->template cast<SharedState>();
672
12.5k
            _dependency = _shared_state->create_sink_dependency(
673
12.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
12.5k
        }
675
12.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
12.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
12.5k
    }
678
679
12.5k
    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.5k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
12.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
12.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
12.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
12.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
12.5k
    _memory_used_counter =
689
12.5k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
12.5k
    _common_profile->add_info_string("IsColocate",
691
12.5k
                                     std::to_string(_parent->is_colocated_operator()));
692
12.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
12.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
12.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
12.5k
    return Status::OK();
696
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
352k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
352k
    _operator_profile =
641
352k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
352k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
352k
    _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
352k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
352k
    _operator_profile->add_child(_common_profile, true);
650
352k
    _operator_profile->add_child(_custom_profile, true);
651
652
352k
    _operator_profile->set_metadata(_parent->node_id());
653
352k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
352k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
352k
    if constexpr (!is_fake_shared) {
656
352k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
352k
            info.shared_state_map.end()) {
658
352k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
659
352k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
660
352k
            }
661
352k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
352k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
352k
                                                  ? 0
664
352k
                                                  : info.task_idx]
665
352k
                                  .get();
666
352k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
18.4E
        } else {
668
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
18.4E
                DCHECK(false);
670
18.4E
            }
671
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
672
18.4E
            _dependency = _shared_state->create_sink_dependency(
673
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
18.4E
        }
675
352k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
352k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
352k
    }
678
679
352k
    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
352k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
352k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
352k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
352k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
352k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
352k
    _memory_used_counter =
689
352k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
352k
    _common_profile->add_info_string("IsColocate",
691
352k
                                     std::to_string(_parent->is_colocated_operator()));
692
352k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
352k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
352k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
352k
    return Status::OK();
696
352k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
476k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
476k
    _operator_profile =
641
476k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
476k
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
476k
    _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
476k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
476k
    _operator_profile->add_child(_common_profile, true);
650
476k
    _operator_profile->add_child(_custom_profile, true);
651
652
476k
    _operator_profile->set_metadata(_parent->node_id());
653
476k
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
476k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
476k
    if constexpr (!is_fake_shared) {
656
476k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
476k
            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
698
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
662
698
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
663
698
                                                  ? 0
664
698
                                                  : info.task_idx]
665
698
                                  .get();
666
698
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
667
475k
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
475k
            _shared_state = info.shared_state->template cast<SharedState>();
672
475k
            _dependency = _shared_state->create_sink_dependency(
673
475k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
475k
        }
675
476k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
476k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
476k
    }
678
679
476k
    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
476k
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
476k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
476k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
476k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
476k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
476k
    _memory_used_counter =
689
476k
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
476k
    _common_profile->add_info_string("IsColocate",
691
476k
                                     std::to_string(_parent->is_colocated_operator()));
692
476k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
476k
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
476k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
476k
    return Status::OK();
696
476k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
638
110
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
639
    // create profile
640
110
    _operator_profile =
641
110
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
642
110
    _common_profile = state->obj_pool()->add(new RuntimeProfile("CommonCounters"));
643
110
    _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
110
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
649
110
    _operator_profile->add_child(_common_profile, true);
650
110
    _operator_profile->add_child(_custom_profile, true);
651
652
110
    _operator_profile->set_metadata(_parent->node_id());
653
110
    _wait_for_finish_dependency_timer = ADD_TIMER(_common_profile, "PendingFinishDependency");
654
110
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
655
110
    if constexpr (!is_fake_shared) {
656
110
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
657
110
            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
110
        } else {
668
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
669
                DCHECK(false);
670
            }
671
110
            _shared_state = info.shared_state->template cast<SharedState>();
672
110
            _dependency = _shared_state->create_sink_dependency(
673
110
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
674
110
        }
675
110
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
676
110
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
677
110
    }
678
679
111
    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
110
    _rows_input_counter = ADD_COUNTER_WITH_LEVEL(_common_profile, "InputRows", TUnit::UNIT, 1);
684
110
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "InitTime", 2);
685
110
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "OpenTime", 2);
686
110
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "CloseTime", 2);
687
110
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, "ExecTime", 1);
688
110
    _memory_used_counter =
689
110
            _common_profile->AddHighWaterMarkCounter("MemoryUsage", TUnit::BYTES, "", 1);
690
110
    _common_profile->add_info_string("IsColocate",
691
110
                                     std::to_string(_parent->is_colocated_operator()));
692
110
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
693
110
    _common_profile->add_info_string("FollowedByShuffledOperator",
694
110
                                     std::to_string(_parent->followed_by_shuffled_operator()));
695
110
    return Status::OK();
696
110
}
_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
2.00M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
2.00M
    if (_closed) {
701
2
        return Status::OK();
702
2
    }
703
2.00M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
1.37M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
1.37M
    }
706
2.00M
    _closed = true;
707
2.00M
    return Status::OK();
708
2.00M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
178k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
178k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
178k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
178k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
178k
    }
706
178k
    _closed = true;
707
178k
    return Status::OK();
708
178k
}
_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
202k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
202k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
202k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
202k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
202k
    }
706
202k
    _closed = true;
707
202k
    return Status::OK();
708
202k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
25
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
25
    if (_closed) {
701
2
        return Status::OK();
702
2
    }
703
23
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
23
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
23
    }
706
23
    _closed = true;
707
23
    return Status::OK();
708
25
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
7.01k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
7.01k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
7.01k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
7.01k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
7.01k
    }
706
7.01k
    _closed = true;
707
7.01k
    return Status::OK();
708
7.01k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
7.12k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
7.12k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
7.12k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
7.12k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
7.12k
    }
706
7.12k
    _closed = true;
707
7.12k
    return Status::OK();
708
7.12k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
121k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
121k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
121k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
121k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
121k
    }
706
121k
    _closed = true;
707
121k
    return Status::OK();
708
121k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
638
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
638
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
638
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
638
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
638
    }
706
638
    _closed = true;
707
638
    return Status::OK();
708
638
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
627k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
627k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
    }
706
627k
    _closed = true;
707
627k
    return Status::OK();
708
627k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
8.92k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
8.92k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
8.92k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
8.92k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
8.92k
    }
706
8.92k
    _closed = true;
707
8.92k
    return Status::OK();
708
8.92k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
332
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
332
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
332
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
332
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
332
    }
706
332
    _closed = true;
707
332
    return Status::OK();
708
332
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
2.72k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
2.72k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
2.72k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
2.72k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
2.72k
    }
706
2.72k
    _closed = true;
707
2.72k
    return Status::OK();
708
2.72k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
12.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
12.5k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
12.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
12.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
12.5k
    }
706
12.5k
    _closed = true;
707
12.5k
    return Status::OK();
708
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
353k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
353k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
353k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
353k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
353k
    }
706
353k
    _closed = true;
707
353k
    return Status::OK();
708
353k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
480k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
480k
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
480k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
480k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
480k
    }
706
480k
    _closed = true;
707
480k
    return Status::OK();
708
480k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
699
107
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
700
107
    if (_closed) {
701
0
        return Status::OK();
702
0
    }
703
107
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
704
107
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
705
107
    }
706
107
    _closed = true;
707
107
    return Status::OK();
708
107
}
_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.48k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
5.48k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
5.48k
    return pull(state, block, eos);
714
5.48k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
711
31
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
31
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
31
    return pull(state, block, eos);
714
31
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
711
5.45k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
712
5.45k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
713
5.45k
    return pull(state, block, eos);
714
5.45k
}
715
716
template <typename LocalStateType>
717
28.2M
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
28.2M
    auto& local_state = get_local_state(state);
719
28.2M
    if (need_more_input_data(state)) {
720
798k
        local_state._child_block->clear_column_data(
721
798k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
798k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
798k
                state, local_state._child_block.get(), &local_state._child_eos));
724
798k
        *eos = local_state._child_eos;
725
798k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
75.5k
            return Status::OK();
727
75.5k
        }
728
723k
        {
729
723k
            SCOPED_TIMER(local_state.exec_time_counter());
730
723k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
723k
        }
732
723k
    }
733
734
28.1M
    if (!need_more_input_data(state)) {
735
28.0M
        SCOPED_TIMER(local_state.exec_time_counter());
736
28.0M
        bool new_eos = false;
737
28.0M
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
28.0M
        if (new_eos) {
739
694k
            *eos = true;
740
27.3M
        } else if (!need_more_input_data(state)) {
741
27.3M
            *eos = false;
742
27.3M
        }
743
28.0M
    }
744
28.1M
    return Status::OK();
745
28.1M
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
178k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
178k
    auto& local_state = get_local_state(state);
719
178k
    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
30.4k
            return Status::OK();
727
30.4k
        }
728
87.1k
        {
729
87.1k
            SCOPED_TIMER(local_state.exec_time_counter());
730
87.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
87.1k
        }
732
87.1k
    }
733
734
147k
    if (!need_more_input_data(state)) {
735
147k
        SCOPED_TIMER(local_state.exec_time_counter());
736
147k
        bool new_eos = false;
737
147k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
147k
        if (new_eos) {
739
105k
            *eos = true;
740
105k
        } else if (!need_more_input_data(state)) {
741
10.8k
            *eos = false;
742
10.8k
        }
743
147k
    }
744
147k
    return Status::OK();
745
147k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
3.53k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
3.53k
    auto& local_state = get_local_state(state);
719
3.53k
    if (need_more_input_data(state)) {
720
2.22k
        local_state._child_block->clear_column_data(
721
2.22k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
2.22k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
2.22k
                state, local_state._child_block.get(), &local_state._child_eos));
724
2.22k
        *eos = local_state._child_eos;
725
2.22k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
536
            return Status::OK();
727
536
        }
728
1.68k
        {
729
1.68k
            SCOPED_TIMER(local_state.exec_time_counter());
730
1.68k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
1.68k
        }
732
1.68k
    }
733
734
3.01k
    if (!need_more_input_data(state)) {
735
3.01k
        SCOPED_TIMER(local_state.exec_time_counter());
736
3.01k
        bool new_eos = false;
737
3.01k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
3.01k
        if (new_eos) {
739
1.37k
            *eos = true;
740
1.64k
        } else if (!need_more_input_data(state)) {
741
1.32k
            *eos = false;
742
1.32k
        }
743
3.01k
    }
744
3.00k
    return Status::OK();
745
3.00k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
1.55k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
1.55k
    auto& local_state = get_local_state(state);
719
1.55k
    if (need_more_input_data(state)) {
720
1.55k
        local_state._child_block->clear_column_data(
721
1.55k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
1.55k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
1.55k
                state, local_state._child_block.get(), &local_state._child_eos));
724
1.55k
        *eos = local_state._child_eos;
725
1.55k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
640
            return Status::OK();
727
640
        }
728
915
        {
729
915
            SCOPED_TIMER(local_state.exec_time_counter());
730
915
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
915
        }
732
915
    }
733
734
915
    if (!need_more_input_data(state)) {
735
915
        SCOPED_TIMER(local_state.exec_time_counter());
736
915
        bool new_eos = false;
737
915
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
915
        if (new_eos) {
739
663
            *eos = true;
740
663
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
915
    }
744
915
    return Status::OK();
745
915
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
17.6k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
17.6k
    auto& local_state = get_local_state(state);
719
17.6k
    if (need_more_input_data(state)) {
720
17.5k
        local_state._child_block->clear_column_data(
721
17.5k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
17.5k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
17.5k
                state, local_state._child_block.get(), &local_state._child_eos));
724
17.5k
        *eos = local_state._child_eos;
725
17.5k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
4.26k
            return Status::OK();
727
4.26k
        }
728
13.3k
        {
729
13.3k
            SCOPED_TIMER(local_state.exec_time_counter());
730
13.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
13.3k
        }
732
13.3k
    }
733
734
13.3k
    if (!need_more_input_data(state)) {
735
7.24k
        SCOPED_TIMER(local_state.exec_time_counter());
736
7.24k
        bool new_eos = false;
737
7.24k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
7.24k
        if (new_eos) {
739
7.10k
            *eos = true;
740
7.10k
        } else if (!need_more_input_data(state)) {
741
40
            *eos = false;
742
40
        }
743
7.24k
    }
744
13.3k
    return Status::OK();
745
13.3k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
636k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
636k
    auto& local_state = get_local_state(state);
719
638k
    if (need_more_input_data(state)) {
720
638k
        local_state._child_block->clear_column_data(
721
638k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
638k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
638k
                state, local_state._child_block.get(), &local_state._child_eos));
724
638k
        *eos = local_state._child_eos;
725
638k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
37.5k
            return Status::OK();
727
37.5k
        }
728
600k
        {
729
600k
            SCOPED_TIMER(local_state.exec_time_counter());
730
600k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
600k
        }
732
600k
    }
733
734
599k
    if (!need_more_input_data(state)) {
735
568k
        SCOPED_TIMER(local_state.exec_time_counter());
736
568k
        bool new_eos = false;
737
568k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
568k
        if (new_eos) {
739
567k
            *eos = true;
740
567k
        } else if (!need_more_input_data(state)) {
741
0
            *eos = false;
742
0
        }
743
568k
    }
744
599k
    return Status::OK();
745
599k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
27.3M
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
27.3M
    auto& local_state = get_local_state(state);
719
27.3M
    if (need_more_input_data(state)) {
720
14.4k
        local_state._child_block->clear_column_data(
721
14.4k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
14.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
14.4k
                state, local_state._child_block.get(), &local_state._child_eos));
724
14.4k
        *eos = local_state._child_eos;
725
14.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
1.70k
            return Status::OK();
727
1.70k
        }
728
12.7k
        {
729
12.7k
            SCOPED_TIMER(local_state.exec_time_counter());
730
12.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
12.7k
        }
732
12.7k
    }
733
734
27.3M
    if (!need_more_input_data(state)) {
735
27.3M
        SCOPED_TIMER(local_state.exec_time_counter());
736
27.3M
        bool new_eos = false;
737
27.3M
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
27.3M
        if (new_eos) {
739
6.99k
            *eos = true;
740
27.3M
        } else if (!need_more_input_data(state)) {
741
27.3M
            *eos = false;
742
27.3M
        }
743
27.3M
    }
744
27.3M
    return Status::OK();
745
27.3M
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
717
7.41k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
718
7.41k
    auto& local_state = get_local_state(state);
719
7.41k
    if (need_more_input_data(state)) {
720
7.05k
        local_state._child_block->clear_column_data(
721
7.05k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
722
7.05k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
723
7.05k
                state, local_state._child_block.get(), &local_state._child_eos));
724
7.05k
        *eos = local_state._child_eos;
725
7.05k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
726
455
            return Status::OK();
727
455
        }
728
6.59k
        {
729
6.59k
            SCOPED_TIMER(local_state.exec_time_counter());
730
6.59k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
731
6.59k
        }
732
6.59k
    }
733
734
6.96k
    if (!need_more_input_data(state)) {
735
6.96k
        SCOPED_TIMER(local_state.exec_time_counter());
736
6.96k
        bool new_eos = false;
737
6.96k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
738
6.96k
        if (new_eos) {
739
5.12k
            *eos = true;
740
5.12k
        } else if (!need_more_input_data(state)) {
741
374
            *eos = false;
742
374
        }
743
6.96k
    }
744
6.96k
    return Status::OK();
745
6.96k
}
746
747
template <typename Writer, typename Parent>
748
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
749
65.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
65.5k
    RETURN_IF_ERROR(Base::init(state, info));
751
65.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
65.5k
                                                         "AsyncWriterDependency", true);
753
65.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
65.5k
                             _finish_dependency));
755
756
65.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
65.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
65.5k
    return Status::OK();
759
65.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
338
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
338
    RETURN_IF_ERROR(Base::init(state, info));
751
338
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
338
                                                         "AsyncWriterDependency", true);
753
338
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
338
                             _finish_dependency));
755
756
338
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
338
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
338
    return Status::OK();
759
338
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
65.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
65.0k
    RETURN_IF_ERROR(Base::init(state, info));
751
65.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
65.0k
                                                         "AsyncWriterDependency", true);
753
65.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
65.0k
                             _finish_dependency));
755
756
65.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
65.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
65.0k
    return Status::OK();
759
65.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
749
139
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
750
139
    RETURN_IF_ERROR(Base::init(state, info));
751
139
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
752
139
                                                         "AsyncWriterDependency", true);
753
139
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
754
139
                             _finish_dependency));
755
756
139
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
757
139
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
758
139
    return Status::OK();
759
139
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
760
761
template <typename Writer, typename Parent>
762
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
763
66.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
66.1k
    RETURN_IF_ERROR(Base::open(state));
765
66.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
468k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
402k
        RETURN_IF_ERROR(
768
402k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
402k
    }
770
66.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
66.1k
    return Status::OK();
772
66.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
339
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
339
    RETURN_IF_ERROR(Base::open(state));
765
339
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
1.77k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
1.43k
        RETURN_IF_ERROR(
768
1.43k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
1.43k
    }
770
339
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
339
    return Status::OK();
772
339
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
65.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
65.6k
    RETURN_IF_ERROR(Base::open(state));
765
65.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
464k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
398k
        RETURN_IF_ERROR(
768
398k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
398k
    }
770
65.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
65.6k
    return Status::OK();
772
65.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
763
139
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
764
139
    RETURN_IF_ERROR(Base::open(state));
765
139
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
766
2.50k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
767
2.36k
        RETURN_IF_ERROR(
768
2.36k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
769
2.36k
    }
770
139
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
771
139
    return Status::OK();
772
139
}
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
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_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
1.25k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
1.25k
    return _writer->sink(block, eos);
778
1.25k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
76.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
76.8k
    return _writer->sink(block, eos);
778
76.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
776
139
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
777
139
    return _writer->sink(block, eos);
778
139
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
779
780
template <typename Writer, typename Parent>
781
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
782
66.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
66.2k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
66.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
66.2k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
66.3k
    if (_writer) {
790
66.3k
        Status st = _writer->get_writer_status();
791
66.3k
        if (exec_status.ok()) {
792
66.2k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
66.2k
                                                       : Status::Cancelled("force close"));
794
66.2k
        } else {
795
108
            _writer->force_close(exec_status);
796
108
        }
797
        // If there is an error in process_block thread, then we should get the writer
798
        // status before call force_close. For example, the thread may failed in commit
799
        // transaction.
800
66.3k
        RETURN_IF_ERROR(st);
801
66.3k
    }
802
66.2k
    return Base::close(state, exec_status);
803
66.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
327
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
327
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
327
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
327
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
327
    if (_writer) {
790
327
        Status st = _writer->get_writer_status();
791
327
        if (exec_status.ok()) {
792
327
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
327
                                                       : Status::Cancelled("force close"));
794
327
        } else {
795
0
            _writer->force_close(exec_status);
796
0
        }
797
        // If there is an error in process_block thread, then we should get the writer
798
        // status before call force_close. For example, the thread may failed in commit
799
        // transaction.
800
327
        RETURN_IF_ERROR(st);
801
327
    }
802
327
    return Base::close(state, exec_status);
803
327
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
65.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
65.8k
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
65.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
65.8k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
788
    // if the init failed, the _writer may be nullptr. so here need check
789
65.8k
    if (_writer) {
790
65.8k
        Status st = _writer->get_writer_status();
791
65.8k
        if (exec_status.ok()) {
792
65.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
65.7k
                                                       : Status::Cancelled("force close"));
794
65.7k
        } else {
795
108
            _writer->force_close(exec_status);
796
108
        }
797
        // If there is an error in process_block thread, then we should get the writer
798
        // status before call force_close. For example, the thread may failed in commit
799
        // transaction.
800
65.8k
        RETURN_IF_ERROR(st);
801
65.8k
    }
802
65.7k
    return Base::close(state, exec_status);
803
65.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
782
139
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
783
139
    if (_closed) {
784
0
        return Status::OK();
785
0
    }
786
139
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
787
139
    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
139
    if (_writer) {
790
139
        Status st = _writer->get_writer_status();
791
139
        if (exec_status.ok()) {
792
139
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
793
139
                                                       : Status::Cancelled("force close"));
794
139
        } 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
139
        RETURN_IF_ERROR(st);
801
139
    }
802
139
    return Base::close(state, exec_status);
803
139
}
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