Coverage Report

Created: 2026-10-18 20:45

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 <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
2.03M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
2.03M
    if (_parent->nereids_id() == -1) {
123
1.07M
        return fmt::format("(id={})", _parent->node_id());
124
1.07M
    } else {
125
962k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
962k
    }
127
2.03M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
70.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
70.0k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
70.0k
    } else {
125
70.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
70.0k
    }
127
70.0k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
1
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
230k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
230k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
230k
    } else {
125
230k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
230k
    }
127
230k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
27
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
27
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
27
    } else {
125
27
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
27
    }
127
27
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.12k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.12k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.12k
    } else {
125
5.12k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.12k
    }
127
5.12k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.42k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.42k
    if (_parent->nereids_id() == -1) {
123
16
        return fmt::format("(id={})", _parent->node_id());
124
9.40k
    } else {
125
9.40k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.40k
    }
127
9.42k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
98.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
98.4k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
98.4k
    } else {
125
98.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
98.4k
    }
127
98.4k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
65.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
65.5k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
65.5k
    } else {
125
65.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
65.5k
    }
127
65.5k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
27
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
27
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
27
    } else {
125
27
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
27
    }
127
27
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
762k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
762k
    if (_parent->nereids_id() == -1) {
123
339k
        return fmt::format("(id={})", _parent->node_id());
124
422k
    } else {
125
422k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
422k
    }
127
762k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.2k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.2k
    } else {
125
56.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.2k
    }
127
56.2k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4.48k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.49k
    if (_parent->nereids_id() == -1) {
123
4.49k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
4.48k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
636
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
636
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
534
    } else {
125
534
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
534
    }
127
636
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.22k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.22k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.21k
    } else {
125
5.21k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.21k
    }
127
5.22k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
727k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
728k
    if (_parent->nereids_id() == -1) {
123
728k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
727k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.31M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.31M
    if (_parent->nereids_id() == -1) {
132
772k
        return fmt::format("(id={})", _parent->node_id());
133
772k
    } else {
134
540k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
540k
    }
136
1.31M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
118k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
118k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
118k
    } else {
134
118k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
118k
    }
136
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
2
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
1
    } else {
134
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
1
    }
136
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
232k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
232k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
232k
    } else {
134
232k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
232k
    }
136
232k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
34
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
34
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
34
    } else {
134
34
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
34
    }
136
34
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.12k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.12k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.12k
    } else {
134
5.12k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.12k
    }
136
5.12k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.44k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.44k
    if (_parent->nereids_id() == -1) {
132
16
        return fmt::format("(id={})", _parent->node_id());
133
9.42k
    } else {
134
9.42k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.42k
    }
136
9.44k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
98.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
98.7k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
98.7k
    } else {
134
98.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
98.7k
    }
136
98.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
65.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
65.3k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
65.3k
    } else {
134
65.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
65.3k
    }
136
65.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
37
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
37
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
37
    } else {
134
37
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
37
    }
136
37
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
6
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
6
    if (_parent->nereids_id() == -1) {
132
6
        return fmt::format("(id={})", _parent->node_id());
133
6
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
6
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
11.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
11.0k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
10.9k
    } else {
134
10.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
10.9k
    }
136
11.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
637
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
637
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
535
    } else {
134
535
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
535
    }
136
637
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.6k
    if (_parent->nereids_id() == -1) {
132
12.6k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
286k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
287k
    if (_parent->nereids_id() == -1) {
132
287k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
286k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
471k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
472k
    if (_parent->nereids_id() == -1) {
132
472k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
471k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
33.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
33.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
33.0k
    _terminated = true;
144
33.0k
    return Status::OK();
145
33.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
5.36k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
5.36k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
5.36k
    _terminated = true;
144
5.36k
    return Status::OK();
145
5.36k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4
    _terminated = true;
144
4
    return Status::OK();
145
4
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.84k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.84k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.84k
    _terminated = true;
144
1.84k
    return Status::OK();
145
1.84k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
475
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
475
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
475
    _terminated = true;
144
475
    return Status::OK();
145
475
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
447
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
447
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
447
    _terminated = true;
144
447
    return Status::OK();
145
447
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
338
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
338
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
338
    _terminated = true;
144
338
    return Status::OK();
145
338
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
4
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
4
    _terminated = true;
144
4
    return Status::OK();
145
4
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
118
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
118
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
118
    _terminated = true;
144
118
    return Status::OK();
145
118
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
6
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
6
    _terminated = true;
144
6
    return Status::OK();
145
6
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
300
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
300
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
300
    _terminated = true;
144
300
    return Status::OK();
145
300
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
133
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
133
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
133
    _terminated = true;
144
133
    return Status::OK();
145
133
}
146
147
316k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
316k
    return _child && _child->is_serial_operator() && !is_source()
149
316k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
316k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
316k
}
152
153
23.6k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
23.6k
    if (!_child) {
155
22.9k
        return false;
156
22.9k
    }
157
697
    if (_child->is_serial_operator()) {
158
33
        return true;
159
33
    }
160
664
    const auto child_distribution = _child->required_data_distribution(state);
161
664
    return child_distribution.need_local_exchange() &&
162
664
           !is_shuffled_exchange(child_distribution.distribution_type);
163
697
}
164
165
template <typename SharedStateArg>
166
16.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.6k
    fmt::memory_buffer debug_string_buffer;
168
16.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.6k
    return fmt::to_string(debug_string_buffer);
170
16.6k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
3
    fmt::memory_buffer debug_string_buffer;
168
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
3
    return fmt::to_string(debug_string_buffer);
170
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
16.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
16.6k
    fmt::memory_buffer debug_string_buffer;
168
16.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
16.6k
    return fmt::to_string(debug_string_buffer);
170
16.6k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
171
172
template <typename SharedStateArg>
173
16.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.6k
    fmt::memory_buffer debug_string_buffer;
175
16.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.6k
    return fmt::to_string(debug_string_buffer);
177
16.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
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
173
16.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
16.6k
    fmt::memory_buffer debug_string_buffer;
175
16.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
16.6k
    return fmt::to_string(debug_string_buffer);
177
16.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
16.7k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
16.7k
    fmt::memory_buffer debug_string_buffer;
181
16.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
16.7k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
16.7k
                   _is_serial_operator);
184
16.7k
    return fmt::to_string(debug_string_buffer);
185
16.7k
}
186
187
16.6k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
16.6k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
16.6k
}
190
191
708k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
708k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
708k
    _nereids_id = tnode.nereids_id;
194
708k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.60k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.60k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.60k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
6.60k
    }
207
708k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
708k
    _op_name = substr + "_OPERATOR";
209
210
708k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
708k
    } else if (tnode.__isset.conjuncts) {
213
282k
        for (const auto& conjunct : tnode.conjuncts) {
214
282k
            VExprContextSPtr context;
215
282k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
282k
            _conjuncts.emplace_back(context);
217
282k
        }
218
104k
    }
219
220
    // create the projections expr
221
708k
    if (tnode.__isset.projections) {
222
274k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
274k
    }
224
708k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.60k
        DCHECK(has_projection()) << "no final projections";
226
6.60k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
11.6k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
11.6k
            VExprContextSPtrs projections;
229
11.6k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
11.6k
            _projection->intermediate_projections.push_back(projections);
231
11.6k
        }
232
6.60k
    }
233
708k
    return Status::OK();
234
708k
}
235
236
734k
Status OperatorXBase::prepare(RuntimeState* state) {
237
734k
    for (auto& conjunct : _conjuncts) {
238
282k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
282k
    }
240
734k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
684k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
346k
            return a->execute_cost() < b->execute_cost();
243
346k
        });
244
684k
    };
245
246
734k
    if (has_projection()) {
247
273k
        auto& projection = *_projection;
248
285k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
11.6k
            const auto& input_row_desc =
250
11.6k
                    i == 0 ? operator_row_desc_before_projection()
251
11.6k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
11.6k
            RETURN_IF_ERROR(
253
11.6k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
11.6k
        }
255
273k
        const auto& final_projection_input_row_desc =
256
273k
                projection.intermediate_output_row_descriptors.empty()
257
273k
                        ? operator_row_desc_before_projection()
258
273k
                        : projection.intermediate_output_row_descriptors.back();
259
273k
        RETURN_IF_ERROR(
260
273k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
273k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
273k
                                                      projection.output_row_descriptor));
263
273k
    }
264
265
734k
    for (auto& conjunct : _conjuncts) {
266
282k
        RETURN_IF_ERROR(conjunct->open(state));
267
282k
    }
268
734k
    if (has_projection()) {
269
273k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
273k
        for (auto& projections : _projection->intermediate_projections) {
271
11.6k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
11.6k
        }
273
273k
    }
274
734k
    if (_child && !is_source()) {
275
108k
        RETURN_IF_ERROR(_child->prepare(state));
276
108k
    }
277
278
734k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
734k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
734k
    return Status::OK();
284
734k
}
285
286
9.92k
Status OperatorXBase::terminate(RuntimeState* state) {
287
9.92k
    if (_child && !is_source()) {
288
844
        RETURN_IF_ERROR(_child->terminate(state));
289
844
    }
290
9.92k
    auto result = state->get_local_state_result(operator_id());
291
9.92k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
9.92k
    return result.value()->terminate(state);
295
9.92k
}
296
297
5.55M
Status OperatorXBase::close(RuntimeState* state) {
298
5.55M
    if (_child && !is_source()) {
299
976k
        RETURN_IF_ERROR(_child->close(state));
300
976k
    }
301
5.55M
    auto result = state->get_local_state_result(operator_id());
302
5.55M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.55M
    return result.value()->close(state);
306
5.55M
}
307
308
279k
void PipelineXLocalStateBase::clear_origin_block() {
309
279k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
279k
}
311
312
865k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
865k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
865k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
865k
    return Status::OK();
317
865k
}
318
319
0
bool PipelineXLocalStateBase::is_blockable() const {
320
0
    return std::any_of(_projections.begin(), _projections.end(),
321
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
322
0
}
323
324
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
325
279k
                                     Block* output_block) const {
326
279k
    auto* local_state = state->get_local_state(operator_id());
327
279k
    SCOPED_TIMER(local_state->exec_time_counter());
328
279k
    SCOPED_TIMER(local_state->_projection_timer);
329
279k
    const size_t rows = origin_block->rows();
330
279k
    if (rows == 0) {
331
139k
        return Status::OK();
332
139k
    }
333
139k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
139k
    {
336
139k
        Block input_block = *origin_block;
337
338
139k
        ColumnsWithTypeAndName new_columns;
339
139k
        for (const auto& projections : local_state->_intermediate_projections) {
340
4.65k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
4.65k
            new_columns.resize(projections.size());
345
78.6k
            for (int i = 0; i < projections.size(); i++) {
346
73.9k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
73.9k
                if (new_columns[i].column->size() != rows) {
348
0
                    return Status::InternalError(
349
0
                            "intermediate projection result column size {} not equal input rows "
350
0
                            "{}, expr: {}",
351
0
                            new_columns[i].column->size(), rows,
352
0
                            projections[i]->root()->debug_string());
353
0
                }
354
73.9k
            }
355
4.64k
            Block tmp_block {new_columns};
356
4.64k
            input_block.swap(tmp_block);
357
4.64k
        }
358
359
139k
        if (input_block.rows() != rows) {
360
0
            return Status::InternalError(
361
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
362
0
                    "input_block: {}",
363
0
                    input_block.rows(), rows, input_block.dump_structure());
364
0
        }
365
366
139k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
139k
                output_block, _projection->output_row_descriptor);
368
139k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
139k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
139k
        Columns shared_columns(mutable_columns.size());
371
372
782k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
643k
            ColumnPtr column_ptr;
374
643k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
643k
            if (column_ptr->size() != rows) {
376
0
                return Status::InternalError(
377
0
                        "projection result column size {} not equal input rows {}, expr: {}",
378
0
                        column_ptr->size(), rows,
379
0
                        local_state->_projections[i]->root()->debug_string());
380
0
            }
381
643k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
643k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
643k
            if (column_ptr->is_exclusive()) {
386
237k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
405k
            } else {
388
405k
                shared_columns[i] = std::move(column_ptr);
389
405k
            }
390
643k
        }
391
392
139k
        scoped_mutable_block.restore();
393
783k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
643k
            if (shared_columns[i]) {
395
405k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
405k
            }
397
643k
        }
398
139k
    }
399
400
0
    origin_block->clear_column_data(
401
139k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
139k
    DCHECK_EQ(output_block->rows(), rows);
403
404
139k
    return Status::OK();
405
139k
}
406
407
4.37M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.37M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.37M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.37M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.37M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.37M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.37M
            if (_debug_point_count++ % 2 == 0) {
414
4.37M
                return Status::OK();
415
4.37M
            }
416
4.37M
        }
417
4.37M
    });
418
419
4.37M
    Status status;
420
4.37M
    auto* local_state = state->get_local_state(operator_id());
421
4.37M
    Defer defer([&]() {
422
4.37M
        if (status.ok()) {
423
4.37M
            local_state->update_output_block_counters(*block);
424
4.37M
        }
425
4.37M
    });
426
4.37M
    if (has_projection()) {
427
279k
        local_state->clear_origin_block();
428
279k
        status = get_block(state, &local_state->_origin_block, eos);
429
279k
        if (UNLIKELY(!status.ok())) {
430
25
            return status;
431
25
        }
432
279k
        status = do_projections(state, &local_state->_origin_block, block);
433
279k
        return status;
434
279k
    }
435
4.09M
    status = get_block(state, block, eos);
436
4.09M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.09M
    return status;
438
4.09M
}
439
440
2.85M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.85M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.90k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.90k
        *eos = true;
444
9.90k
    }
445
446
2.85M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.85M
        auto op_name = to_lower(_parent->_op_name);
448
2.85M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.85M
        arg_op_name = to_lower(arg_op_name);
450
451
2.85M
        if (op_name == arg_op_name) {
452
2.85M
            *eos = true;
453
2.85M
        }
454
2.85M
    });
455
456
2.85M
    if (auto rows = block->rows()) {
457
749k
        _num_rows_returned += rows;
458
749k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
749k
    }
460
2.85M
}
461
462
33.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
33.0k
    auto result = state->get_sink_local_state_result();
464
33.0k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
33.0k
    return result.value()->terminate(state);
468
33.0k
}
469
470
16.6k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
16.6k
    fmt::memory_buffer debug_string_buffer;
472
473
16.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
16.6k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
16.6k
    return fmt::to_string(debug_string_buffer);
476
16.6k
}
477
478
16.6k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
16.6k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
16.6k
}
481
482
366k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
366k
    std::string op_name = "UNKNOWN_SINK";
484
366k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
367k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
367k
        op_name = it->second;
488
367k
    }
489
366k
    _name = op_name + "_OPERATOR";
490
366k
    return Status::OK();
491
366k
}
492
493
305k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
305k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
305k
    _nereids_id = tnode.nereids_id;
496
305k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
305k
    _name = substr + "_SINK_OPERATOR";
498
305k
    return Status::OK();
499
305k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.89M
                                                            LocalSinkStateInfo& info) {
504
1.89M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.89M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.89M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.89M
    return Status::OK();
508
1.89M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
118k
                                                            LocalSinkStateInfo& info) {
504
118k
    auto local_state = LocalStateType::create_unique(this, state);
505
118k
    RETURN_IF_ERROR(local_state->init(state, info));
506
118k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
118k
    return Status::OK();
508
118k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
423k
                                                            LocalSinkStateInfo& info) {
504
423k
    auto local_state = LocalStateType::create_unique(this, state);
505
423k
    RETURN_IF_ERROR(local_state->init(state, info));
506
423k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
423k
    return Status::OK();
508
423k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
369
                                                            LocalSinkStateInfo& info) {
504
369
    auto local_state = LocalStateType::create_unique(this, state);
505
369
    RETURN_IF_ERROR(local_state->init(state, info));
506
369
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
369
    return Status::OK();
508
369
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
49.8k
                                                            LocalSinkStateInfo& info) {
504
49.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
49.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
49.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
49.8k
    return Status::OK();
508
49.8k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
20
                                                            LocalSinkStateInfo& info) {
504
20
    auto local_state = LocalStateType::create_unique(this, state);
505
20
    RETURN_IF_ERROR(local_state->init(state, info));
506
20
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
20
    return Status::OK();
508
20
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
16
                                                            LocalSinkStateInfo& info) {
504
16
    auto local_state = LocalStateType::create_unique(this, state);
505
16
    RETURN_IF_ERROR(local_state->init(state, info));
506
16
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
16
    return Status::OK();
508
16
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.44k
                                                            LocalSinkStateInfo& info) {
504
9.44k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.44k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.44k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.44k
    return Status::OK();
508
9.44k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
233k
                                                            LocalSinkStateInfo& info) {
504
233k
    auto local_state = LocalStateType::create_unique(this, state);
505
233k
    RETURN_IF_ERROR(local_state->init(state, info));
506
233k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
233k
    return Status::OK();
508
233k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
34
                                                            LocalSinkStateInfo& info) {
504
34
    auto local_state = LocalStateType::create_unique(this, state);
505
34
    RETURN_IF_ERROR(local_state->init(state, info));
506
34
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
34
    return Status::OK();
508
34
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
287k
                                                            LocalSinkStateInfo& info) {
504
287k
    auto local_state = LocalStateType::create_unique(this, state);
505
287k
    RETURN_IF_ERROR(local_state->init(state, info));
506
287k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
287k
    return Status::OK();
508
287k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
98.8k
                                                            LocalSinkStateInfo& info) {
504
98.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
98.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
98.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
98.8k
    return Status::OK();
508
98.8k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
65.2k
                                                            LocalSinkStateInfo& info) {
504
65.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
65.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
65.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
65.2k
    return Status::OK();
508
65.2k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
37
                                                            LocalSinkStateInfo& info) {
504
37
    auto local_state = LocalStateType::create_unique(this, state);
505
37
    RETURN_IF_ERROR(local_state->init(state, info));
506
37
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
37
    return Status::OK();
508
37
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
575k
                                                            LocalSinkStateInfo& info) {
504
575k
    auto local_state = LocalStateType::create_unique(this, state);
505
575k
    RETURN_IF_ERROR(local_state->init(state, info));
506
575k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
575k
    return Status::OK();
508
575k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.12k
                                                            LocalSinkStateInfo& info) {
504
5.12k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.12k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.12k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.12k
    return Status::OK();
508
5.12k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
11.0k
                                                            LocalSinkStateInfo& info) {
504
11.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
11.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
11.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
11.0k
    return Status::OK();
508
11.0k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.62k
                                                            LocalSinkStateInfo& info) {
504
1.62k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.62k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.62k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.62k
    return Status::OK();
508
1.62k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
534
                                                            LocalSinkStateInfo& info) {
504
534
    auto local_state = LocalStateType::create_unique(this, state);
505
534
    RETURN_IF_ERROR(local_state->init(state, info));
506
534
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
534
    return Status::OK();
508
534
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.83k
                                                            LocalSinkStateInfo& info) {
504
4.83k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.83k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.83k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.83k
    return Status::OK();
508
4.83k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.60k
                                                            LocalSinkStateInfo& info) {
504
2.60k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.60k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.60k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.60k
    return Status::OK();
508
2.60k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.64k
                                                            LocalSinkStateInfo& info) {
504
2.64k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.64k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.64k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.64k
    return Status::OK();
508
2.64k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.53k
                                                            LocalSinkStateInfo& info) {
504
2.53k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.53k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.53k
    return Status::OK();
508
2.53k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
566
                                                            LocalSinkStateInfo& info) {
504
566
    auto local_state = LocalStateType::create_unique(this, state);
505
566
    RETURN_IF_ERROR(local_state->init(state, info));
506
566
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
566
    return Status::OK();
508
566
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.51M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
0
                                 LocalExchangeSharedState>) {
514
0
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
0
                                        MultiCastSharedState>) {
517
0
        throw Exception(Status::FatalError("should not reach here!"));
518
1.51M
    } else {
519
1.51M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.51M
        ss->id = operator_id();
521
1.51M
        for (auto& dest : dests_id()) {
522
1.50M
            ss->related_op_ids.insert(dest);
523
1.50M
        }
524
1.51M
        return ss;
525
1.51M
    }
526
1.51M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
104k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
104k
    } else {
519
104k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
104k
        ss->id = operator_id();
521
104k
        for (auto& dest : dests_id()) {
522
104k
            ss->related_op_ids.insert(dest);
523
104k
        }
524
104k
        return ss;
525
104k
    }
526
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
424k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
424k
    } else {
519
424k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
424k
        ss->id = operator_id();
521
424k
        for (auto& dest : dests_id()) {
522
422k
            ss->related_op_ids.insert(dest);
523
422k
        }
524
424k
        return ss;
525
424k
    }
526
424k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
369
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
369
    } else {
519
369
        auto ss = LocalStateType::SharedStateType::create_shared();
520
369
        ss->id = operator_id();
521
369
        for (auto& dest : dests_id()) {
522
367
            ss->related_op_ids.insert(dest);
523
367
        }
524
369
        return ss;
525
369
    }
526
369
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
50.0k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
50.0k
    } else {
519
50.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
50.0k
        ss->id = operator_id();
521
50.0k
        for (auto& dest : dests_id()) {
522
49.6k
            ss->related_op_ids.insert(dest);
523
49.6k
        }
524
50.0k
        return ss;
525
50.0k
    }
526
50.0k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
20
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
20
    } else {
519
20
        auto ss = LocalStateType::SharedStateType::create_shared();
520
20
        ss->id = operator_id();
521
20
        for (auto& dest : dests_id()) {
522
20
            ss->related_op_ids.insert(dest);
523
20
        }
524
20
        return ss;
525
20
    }
526
20
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
16
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
16
    } else {
519
16
        auto ss = LocalStateType::SharedStateType::create_shared();
520
16
        ss->id = operator_id();
521
16
        for (auto& dest : dests_id()) {
522
16
            ss->related_op_ids.insert(dest);
523
16
        }
524
16
        return ss;
525
16
    }
526
16
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9.49k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
9.49k
    } else {
519
9.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.49k
        ss->id = operator_id();
521
9.49k
        for (auto& dest : dests_id()) {
522
9.48k
            ss->related_op_ids.insert(dest);
523
9.48k
        }
524
9.49k
        return ss;
525
9.49k
    }
526
9.49k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
234k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
234k
    } else {
519
234k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
234k
        ss->id = operator_id();
521
234k
        for (auto& dest : dests_id()) {
522
234k
            ss->related_op_ids.insert(dest);
523
234k
        }
524
234k
        return ss;
525
234k
    }
526
234k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
36
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
36
    } else {
519
36
        auto ss = LocalStateType::SharedStateType::create_shared();
520
36
        ss->id = operator_id();
521
36
        for (auto& dest : dests_id()) {
522
36
            ss->related_op_ids.insert(dest);
523
36
        }
524
36
        return ss;
525
36
    }
526
36
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
99.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
99.1k
    } else {
519
99.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
99.1k
        ss->id = operator_id();
521
99.1k
        for (auto& dest : dests_id()) {
522
99.1k
            ss->related_op_ids.insert(dest);
523
99.1k
        }
524
99.1k
        return ss;
525
99.1k
    }
526
99.1k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
36
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
36
    } else {
519
36
        auto ss = LocalStateType::SharedStateType::create_shared();
520
36
        ss->id = operator_id();
521
36
        for (auto& dest : dests_id()) {
522
36
            ss->related_op_ids.insert(dest);
523
36
        }
524
36
        return ss;
525
36
    }
526
36
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
576k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
576k
    } else {
519
576k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
576k
        ss->id = operator_id();
521
576k
        for (auto& dest : dests_id()) {
522
569k
            ss->related_op_ids.insert(dest);
523
569k
        }
524
576k
        return ss;
525
576k
    }
526
576k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.13k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
5.13k
    } else {
519
5.13k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.13k
        ss->id = operator_id();
521
5.13k
        for (auto& dest : dests_id()) {
522
5.13k
            ss->related_op_ids.insert(dest);
523
5.13k
        }
524
5.13k
        return ss;
525
5.13k
    }
526
5.13k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
636
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
636
    } else {
519
636
        auto ss = LocalStateType::SharedStateType::create_shared();
520
636
        ss->id = operator_id();
521
637
        for (auto& dest : dests_id()) {
522
637
            ss->related_op_ids.insert(dest);
523
637
        }
524
636
        return ss;
525
636
    }
526
636
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.64k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.64k
    } else {
519
2.64k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.64k
        ss->id = operator_id();
521
2.65k
        for (auto& dest : dests_id()) {
522
2.65k
            ss->related_op_ids.insert(dest);
523
2.65k
        }
524
2.64k
        return ss;
525
2.64k
    }
526
2.64k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.54k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.54k
    } else {
519
2.54k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.54k
        ss->id = operator_id();
521
2.54k
        for (auto& dest : dests_id()) {
522
2.53k
            ss->related_op_ids.insert(dest);
523
2.53k
        }
524
2.54k
        return ss;
525
2.54k
    }
526
2.54k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
568
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
568
    } else {
519
568
        auto ss = LocalStateType::SharedStateType::create_shared();
520
568
        ss->id = operator_id();
521
568
        for (auto& dest : dests_id()) {
522
567
            ss->related_op_ids.insert(dest);
523
567
        }
524
568
        return ss;
525
568
    }
526
568
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
106
            ss->related_op_ids.insert(dest);
523
106
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.30M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.30M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.30M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.30M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.30M
    return Status::OK();
534
2.30M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
70.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
70.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
70.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
70.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
70.2k
    return Status::OK();
534
70.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
254k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
254k
    auto local_state = LocalStateType::create_unique(state, this);
531
254k
    RETURN_IF_ERROR(local_state->init(state, info));
532
254k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
254k
    return Status::OK();
534
254k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
125
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
125
    auto local_state = LocalStateType::create_unique(state, this);
531
125
    RETURN_IF_ERROR(local_state->init(state, info));
532
125
    state->emplace_local_state(operator_id(), std::move(local_state));
533
125
    return Status::OK();
534
125
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.27k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.27k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.27k
    return Status::OK();
534
3.27k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.45k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.45k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.45k
    return Status::OK();
534
9.45k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.69k
    return Status::OK();
534
8.69k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
224k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
224k
    auto local_state = LocalStateType::create_unique(state, this);
531
224k
    RETURN_IF_ERROR(local_state->init(state, info));
532
224k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
224k
    return Status::OK();
534
224k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
98.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
98.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
98.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
98.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
98.8k
    return Status::OK();
534
98.8k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
65.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
65.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
65.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
65.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
65.5k
    return Status::OK();
534
65.5k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.87k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.87k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.87k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.87k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.87k
    return Status::OK();
534
3.87k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
341k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
341k
    auto local_state = LocalStateType::create_unique(state, this);
531
341k
    RETURN_IF_ERROR(local_state->init(state, info));
532
341k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
341k
    return Status::OK();
534
341k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.30k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.30k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.30k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.30k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.30k
    return Status::OK();
534
1.30k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.12k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.12k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.12k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.12k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.12k
    return Status::OK();
534
5.12k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.55k
    return Status::OK();
534
1.55k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.2k
    return Status::OK();
534
56.2k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.49k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.49k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.49k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.49k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.49k
    return Status::OK();
534
4.49k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
535
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
535
    auto local_state = LocalStateType::create_unique(state, this);
531
535
    RETURN_IF_ERROR(local_state->init(state, info));
532
535
    state->emplace_local_state(operator_id(), std::move(local_state));
533
535
    return Status::OK();
534
535
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.66k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.66k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.66k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.66k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.66k
    return Status::OK();
534
2.66k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.55k
    return Status::OK();
534
2.55k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
505
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
505
    auto local_state = LocalStateType::create_unique(state, this);
531
505
    RETURN_IF_ERROR(local_state->init(state, info));
532
505
    state->emplace_local_state(operator_id(), std::move(local_state));
533
505
    return Status::OK();
534
505
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.69k
    return Status::OK();
534
1.69k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.8k
    return Status::OK();
534
10.8k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
735k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
735k
    auto local_state = LocalStateType::create_unique(state, this);
531
735k
    RETURN_IF_ERROR(local_state->init(state, info));
532
735k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
735k
    return Status::OK();
534
735k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
802
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
802
    auto local_state = LocalStateType::create_unique(state, this);
531
802
    RETURN_IF_ERROR(local_state->init(state, info));
532
802
    state->emplace_local_state(operator_id(), std::move(local_state));
533
802
    return Status::OK();
534
802
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
841
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
841
    auto local_state = LocalStateType::create_unique(state, this);
531
841
    RETURN_IF_ERROR(local_state->init(state, info));
532
841
    state->emplace_local_state(operator_id(), std::move(local_state));
533
841
    return Status::OK();
534
841
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.24k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.24k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.24k
    return Status::OK();
534
7.24k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
395k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
395k
    auto local_state = LocalStateType::create_unique(state, this);
531
395k
    RETURN_IF_ERROR(local_state->init(state, info));
532
395k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
395k
    return Status::OK();
534
395k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.88M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.29M
        : _num_rows_returned(0),
542
2.29M
          _rows_returned_counter(nullptr),
543
2.29M
          _parent(parent),
544
2.29M
          _state(state),
545
2.29M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.31M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.31M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.31M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.31M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.31M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2.31M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.31M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.31M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.31M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.31M
    if constexpr (!is_fake_shared) {
560
1.29M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
811k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
811k
                                    .first.get()
563
811k
                                    ->template cast<SharedStateArg>();
564
565
811k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
811k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
811k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
811k
        } else if (info.shared_state) {
569
409k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
409k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
409k
            _dependency = _shared_state->create_source_dependency(
576
409k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
409k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
409k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
409k
        } else {
580
70.4k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.06k
                DCHECK(false);
582
8.06k
            }
583
70.4k
        }
584
1.29M
    }
585
586
2.31M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2.31M
    _rows_returned_counter =
591
2.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.31M
    _blocks_returned_counter =
593
2.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.31M
    _output_block_bytes_counter =
595
2.31M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.31M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.31M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.31M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.31M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.31M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.31M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.31M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.31M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.31M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.31M
    _memory_used_counter =
606
2.31M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.31M
    _common_profile->add_info_string("IsColocate",
608
2.31M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.31M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.31M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.31M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.31M
    return Status::OK();
613
2.31M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
70.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
70.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
70.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
70.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
70.4k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
70.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
70.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
70.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
70.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
70.4k
    if constexpr (!is_fake_shared) {
560
70.4k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
13.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
13.6k
                                    .first.get()
563
13.6k
                                    ->template cast<SharedStateArg>();
564
565
13.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
13.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
13.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.7k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
56.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
56.0k
            _dependency = _shared_state->create_source_dependency(
576
56.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
56.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
56.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
56.0k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
738
        }
584
70.4k
    }
585
586
70.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
70.4k
    _rows_returned_counter =
591
70.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
70.4k
    _blocks_returned_counter =
593
70.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
70.4k
    _output_block_bytes_counter =
595
70.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
70.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
70.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
70.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
70.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
70.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
70.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
70.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
70.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
70.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
70.4k
    _memory_used_counter =
606
70.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
70.4k
    _common_profile->add_info_string("IsColocate",
608
70.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
70.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
70.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
70.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
70.4k
    return Status::OK();
613
70.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
1
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
233k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
233k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
233k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
233k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
233k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
233k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
233k
    _operator_profile->add_child(_common_profile.get(), true);
557
233k
    _operator_profile->add_child(_custom_profile.get(), true);
558
233k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
233k
    if constexpr (!is_fake_shared) {
560
233k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
233k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
225k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
225k
            _dependency = _shared_state->create_source_dependency(
576
225k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
225k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
225k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
225k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
8.17k
        }
584
233k
    }
585
586
233k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
233k
    _rows_returned_counter =
591
233k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
233k
    _blocks_returned_counter =
593
233k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
233k
    _output_block_bytes_counter =
595
233k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
233k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
233k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
233k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
233k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
233k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
233k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
233k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
233k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
233k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
233k
    _memory_used_counter =
606
233k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
233k
    _common_profile->add_info_string("IsColocate",
608
233k
                                     std::to_string(_parent->is_colocated_operator()));
609
233k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
233k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
233k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
233k
    return Status::OK();
613
233k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
27
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
27
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
27
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
27
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
27
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
27
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
27
    _operator_profile->add_child(_common_profile.get(), true);
557
27
    _operator_profile->add_child(_custom_profile.get(), true);
558
27
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
27
    if constexpr (!is_fake_shared) {
560
27
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
27
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
27
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
27
            _dependency = _shared_state->create_source_dependency(
576
27
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
27
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
27
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
27
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
27
    }
585
586
27
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
27
    _rows_returned_counter =
591
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
27
    _blocks_returned_counter =
593
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
27
    _output_block_bytes_counter =
595
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
27
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
27
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
27
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
27
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
27
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
27
    _memory_used_counter =
606
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
27
    _common_profile->add_info_string("IsColocate",
608
27
                                     std::to_string(_parent->is_colocated_operator()));
609
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
27
    return Status::OK();
613
27
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.13k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.13k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.13k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.13k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.13k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.13k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.13k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.13k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.13k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.13k
    if constexpr (!is_fake_shared) {
560
5.13k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.13k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.11k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.11k
            _dependency = _shared_state->create_source_dependency(
576
5.11k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.11k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.11k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.11k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
21
        }
584
5.13k
    }
585
586
5.13k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.13k
    _rows_returned_counter =
591
5.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.13k
    _blocks_returned_counter =
593
5.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.13k
    _output_block_bytes_counter =
595
5.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.13k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.13k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.13k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.13k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.13k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.13k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.13k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.13k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.13k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.13k
    _memory_used_counter =
606
5.13k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.13k
    _common_profile->add_info_string("IsColocate",
608
5.13k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.13k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.13k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.13k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.13k
    return Status::OK();
613
5.13k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.50k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.50k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.50k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.50k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.50k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
9.50k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.50k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.50k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.50k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.50k
    if constexpr (!is_fake_shared) {
560
9.50k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
9.50k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
9.40k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.40k
            _dependency = _shared_state->create_source_dependency(
576
9.40k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.40k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.40k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.40k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
99
        }
584
9.50k
    }
585
586
9.50k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
9.50k
    _rows_returned_counter =
591
9.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.50k
    _blocks_returned_counter =
593
9.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.50k
    _output_block_bytes_counter =
595
9.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.50k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.50k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.50k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.50k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.50k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.50k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.50k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.50k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.50k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.50k
    _memory_used_counter =
606
9.50k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.50k
    _common_profile->add_info_string("IsColocate",
608
9.50k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.50k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.50k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.50k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.50k
    return Status::OK();
613
9.50k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
99.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
99.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
99.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
99.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
99.2k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
99.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
99.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
99.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
99.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
99.2k
    if constexpr (!is_fake_shared) {
560
99.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
99.2k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
97.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
97.7k
            _dependency = _shared_state->create_source_dependency(
576
97.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
97.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
97.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
97.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.55k
        }
584
99.2k
    }
585
586
99.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
99.2k
    _rows_returned_counter =
591
99.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
99.2k
    _blocks_returned_counter =
593
99.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
99.2k
    _output_block_bytes_counter =
595
99.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
99.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
99.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
99.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
99.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
99.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
99.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
99.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
99.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
99.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
99.2k
    _memory_used_counter =
606
99.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
99.2k
    _common_profile->add_info_string("IsColocate",
608
99.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
99.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
99.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
99.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
99.2k
    return Status::OK();
613
99.2k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
65.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
65.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
65.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
65.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
65.5k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
65.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
65.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
65.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
65.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
65.5k
    if constexpr (!is_fake_shared) {
560
65.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
65.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
65.6k
                                    .first.get()
563
65.6k
                                    ->template cast<SharedStateArg>();
564
565
65.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
65.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
65.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
65.5k
    }
585
586
65.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
65.5k
    _rows_returned_counter =
591
65.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
65.5k
    _blocks_returned_counter =
593
65.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
65.5k
    _output_block_bytes_counter =
595
65.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
65.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
65.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
65.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
65.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
65.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
65.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
65.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
65.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
65.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
65.5k
    _memory_used_counter =
606
65.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
65.5k
    _common_profile->add_info_string("IsColocate",
608
65.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
65.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
65.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
65.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
65.5k
    return Status::OK();
613
65.5k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
27
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
27
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
27
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
27
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
27
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
27
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
27
    _operator_profile->add_child(_common_profile.get(), true);
557
27
    _operator_profile->add_child(_custom_profile.get(), true);
558
27
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
27
    if constexpr (!is_fake_shared) {
560
27
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
27
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
27
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
27
            _dependency = _shared_state->create_source_dependency(
576
27
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
27
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
27
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
27
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
27
    }
585
586
27
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
27
    _rows_returned_counter =
591
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
27
    _blocks_returned_counter =
593
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
27
    _output_block_bytes_counter =
595
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
27
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
27
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
27
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
27
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
27
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
27
    _memory_used_counter =
606
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
27
    _common_profile->add_info_string("IsColocate",
608
27
                                     std::to_string(_parent->is_colocated_operator()));
609
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
27
    return Status::OK();
613
27
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.02M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.02M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.02M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.02M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.02M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1.02M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.02M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.02M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.02M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
    if constexpr (!is_fake_shared) {
560
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
                                    .first.get()
563
                                    ->template cast<SharedStateArg>();
564
565
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
            _dependency = _shared_state->create_source_dependency(
576
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
        }
584
    }
585
586
1.02M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1.02M
    _rows_returned_counter =
591
1.02M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.02M
    _blocks_returned_counter =
593
1.02M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.02M
    _output_block_bytes_counter =
595
1.02M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.02M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.02M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.02M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.02M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.02M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.02M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.02M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.02M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.02M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.02M
    _memory_used_counter =
606
1.02M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.02M
    _common_profile->add_info_string("IsColocate",
608
1.02M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.02M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.02M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.02M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.02M
    return Status::OK();
613
1.02M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.2k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
56.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.2k
    if constexpr (!is_fake_shared) {
560
56.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.2k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.54k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.54k
            _dependency = _shared_state->create_source_dependency(
576
4.54k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.54k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.54k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.6k
        }
584
56.2k
    }
585
586
56.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
56.2k
    _rows_returned_counter =
591
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.2k
    _blocks_returned_counter =
593
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.2k
    _output_block_bytes_counter =
595
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.2k
    _memory_used_counter =
606
56.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.2k
    _common_profile->add_info_string("IsColocate",
608
56.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.2k
    return Status::OK();
613
56.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.50k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.50k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.50k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.50k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.50k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4.50k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.50k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.50k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.50k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.50k
    if constexpr (!is_fake_shared) {
560
4.50k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4.50k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.41k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.41k
            _dependency = _shared_state->create_source_dependency(
576
4.41k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.41k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.41k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.41k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
91
        }
584
4.50k
    }
585
586
4.50k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4.50k
    _rows_returned_counter =
591
4.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.50k
    _blocks_returned_counter =
593
4.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.50k
    _output_block_bytes_counter =
595
4.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.50k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.50k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.50k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.50k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.50k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.50k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.50k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.50k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.50k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.50k
    _memory_used_counter =
606
4.50k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.50k
    _common_profile->add_info_string("IsColocate",
608
4.50k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.50k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.50k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.50k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.50k
    return Status::OK();
613
4.50k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
634
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
634
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
634
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
634
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
634
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
634
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
634
    _operator_profile->add_child(_common_profile.get(), true);
557
634
    _operator_profile->add_child(_custom_profile.get(), true);
558
634
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
634
    if constexpr (!is_fake_shared) {
560
634
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
634
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
632
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
632
            _dependency = _shared_state->create_source_dependency(
576
632
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
632
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
632
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
632
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2
        }
584
634
    }
585
586
634
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
634
    _rows_returned_counter =
591
634
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
634
    _blocks_returned_counter =
593
634
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
634
    _output_block_bytes_counter =
595
634
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
634
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
634
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
634
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
634
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
634
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
634
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
634
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
634
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
634
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
634
    _memory_used_counter =
606
634
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
634
    _common_profile->add_info_string("IsColocate",
608
634
                                     std::to_string(_parent->is_colocated_operator()));
609
634
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
634
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
634
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
634
    return Status::OK();
613
634
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.23k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.23k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.23k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.23k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.23k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.23k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.23k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.23k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.23k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.23k
    if constexpr (!is_fake_shared) {
560
5.23k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.23k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.20k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.20k
            _dependency = _shared_state->create_source_dependency(
576
5.20k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.20k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.20k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.20k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
24
        }
584
5.23k
    }
585
586
5.23k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.23k
    _rows_returned_counter =
591
5.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.23k
    _blocks_returned_counter =
593
5.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.23k
    _output_block_bytes_counter =
595
5.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.23k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.23k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.23k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.23k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.23k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.23k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.23k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.23k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.23k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.23k
    _memory_used_counter =
606
5.23k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.23k
    _common_profile->add_info_string("IsColocate",
608
5.23k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.23k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.23k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.23k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.23k
    return Status::OK();
613
5.23k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
739k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
739k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
739k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
739k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
739k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
739k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
739k
    _operator_profile->add_child(_common_profile.get(), true);
557
739k
    _operator_profile->add_child(_custom_profile.get(), true);
558
739k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
739k
    if constexpr (!is_fake_shared) {
560
739k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
731k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
731k
                                    .first.get()
563
731k
                                    ->template cast<SharedStateArg>();
564
565
731k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
731k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
731k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
731k
        } else if (info.shared_state) {
569
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.06k
        } else {
580
8.06k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.06k
                DCHECK(false);
582
8.06k
            }
583
8.06k
        }
584
739k
    }
585
586
739k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
739k
    _rows_returned_counter =
591
739k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
739k
    _blocks_returned_counter =
593
739k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
739k
    _output_block_bytes_counter =
595
739k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
739k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
739k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
739k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
739k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
739k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
739k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
739k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
739k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
739k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
739k
    _memory_used_counter =
606
739k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
739k
    _common_profile->add_info_string("IsColocate",
608
739k
                                     std::to_string(_parent->is_colocated_operator()));
609
739k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
739k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
739k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
739k
    return Status::OK();
613
739k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
2.32M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.32M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.63M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
309k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
309k
    }
621
2.32M
    if (_parent->has_projection()) {
622
396k
        const auto& projection = *_parent->_projection;
623
396k
        _projections.resize(projection.projections.size());
624
2.44M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.04M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.04M
        }
627
396k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
417k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
21.4k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
274k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
253k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
253k
                        state, _intermediate_projections[i][j]));
633
253k
            }
634
21.4k
        }
635
396k
    }
636
2.32M
    return Status::OK();
637
2.32M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
70.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
70.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
72.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.60k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.60k
    }
621
70.5k
    if (_parent->has_projection()) {
622
70.5k
        const auto& projection = *_parent->_projection;
623
70.5k
        _projections.resize(projection.projections.size());
624
374k
        for (size_t i = 0; i < _projections.size(); i++) {
625
303k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
303k
        }
627
70.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.43k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
202k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
193k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
193k
                        state, _intermediate_projections[i][j]));
633
193k
            }
634
9.43k
        }
635
70.5k
    }
636
70.5k
    return Status::OK();
637
70.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
235k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
235k
    _conjuncts.resize(_parent->_conjuncts.size());
618
235k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
235k
    if (_parent->has_projection()) {
622
83
        const auto& projection = *_parent->_projection;
623
83
        _projections.resize(projection.projections.size());
624
420
        for (size_t i = 0; i < _projections.size(); i++) {
625
337
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
337
        }
627
83
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
83
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
83
    }
636
235k
    return Status::OK();
637
235k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
27
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
27
    _conjuncts.resize(_parent->_conjuncts.size());
618
27
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
27
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
27
    return Status::OK();
637
27
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.14k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.14k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.21k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
76
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
76
    }
621
5.14k
    if (_parent->has_projection()) {
622
5.14k
        const auto& projection = *_parent->_projection;
623
5.14k
        _projections.resize(projection.projections.size());
624
19.7k
        for (size_t i = 0; i < _projections.size(); i++) {
625
14.5k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
14.5k
        }
627
5.14k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.17k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
34
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
224
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
190
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
190
                        state, _intermediate_projections[i][j]));
633
190
            }
634
34
        }
635
5.14k
    }
636
5.14k
    return Status::OK();
637
5.14k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.51k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.51k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.07k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.07k
    }
621
9.51k
    if (_parent->has_projection()) {
622
4.62k
        const auto& projection = *_parent->_projection;
623
4.62k
        _projections.resize(projection.projections.size());
624
20.2k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.6k
        }
627
4.62k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.74k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
113
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
863
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
750
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
750
                        state, _intermediate_projections[i][j]));
633
750
            }
634
113
        }
635
4.62k
    }
636
9.51k
    return Status::OK();
637
9.51k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
99.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
99.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
100k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.53k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.53k
    }
621
99.4k
    if (_parent->has_projection()) {
622
32.2k
        const auto& projection = *_parent->_projection;
623
32.2k
        _projections.resize(projection.projections.size());
624
295k
        for (size_t i = 0; i < _projections.size(); i++) {
625
263k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
263k
        }
627
32.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
32.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
718
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.48k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.76k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.76k
                        state, _intermediate_projections[i][j]));
633
3.76k
            }
634
718
        }
635
32.2k
    }
636
99.4k
    return Status::OK();
637
99.4k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
65.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
65.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
65.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
19
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
19
    }
621
65.5k
    if (_parent->has_projection()) {
622
208
        const auto& projection = *_parent->_projection;
623
208
        _projections.resize(projection.projections.size());
624
850
        for (size_t i = 0; i < _projections.size(); i++) {
625
642
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
642
        }
627
208
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
212
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
4
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
26
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
22
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
22
                        state, _intermediate_projections[i][j]));
633
22
            }
634
4
        }
635
208
    }
636
65.5k
    return Status::OK();
637
65.5k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
31
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
31
    _conjuncts.resize(_parent->_conjuncts.size());
618
31
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
31
    if (_parent->has_projection()) {
622
1
        const auto& projection = *_parent->_projection;
623
1
        _projections.resize(projection.projections.size());
624
3
        for (size_t i = 0; i < _projections.size(); i++) {
625
2
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2
        }
627
1
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
1
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
1
    }
636
31
    return Status::OK();
637
31
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
1.02M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.02M
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.33M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
304k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
304k
    }
621
1.02M
    if (_parent->has_projection()) {
622
271k
        const auto& projection = *_parent->_projection;
623
271k
        _projections.resize(projection.projections.size());
624
1.61M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.34M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.34M
        }
627
271k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
282k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.0k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
64.9k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
53.8k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
53.8k
                        state, _intermediate_projections[i][j]));
633
53.8k
            }
634
11.0k
        }
635
271k
    }
636
1.02M
    return Status::OK();
637
1.02M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
56.5k
    if (_parent->has_projection()) {
622
11.7k
        const auto& projection = *_parent->_projection;
623
11.7k
        _projections.resize(projection.projections.size());
624
114k
        for (size_t i = 0; i < _projections.size(); i++) {
625
102k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
102k
        }
627
11.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
99
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.66k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.56k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.56k
                        state, _intermediate_projections[i][j]));
633
1.56k
            }
634
99
        }
635
11.7k
    }
636
56.5k
    return Status::OK();
637
56.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.51k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.51k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.90k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
386
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
386
    }
621
4.51k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
4.51k
    return Status::OK();
637
4.51k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
638
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
638
    _conjuncts.resize(_parent->_conjuncts.size());
618
638
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
638
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
638
    return Status::OK();
637
638
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.22k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.22k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.22k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.22k
    if (_parent->has_projection()) {
622
67
        const auto& projection = *_parent->_projection;
623
67
        _projections.resize(projection.projections.size());
624
245
        for (size_t i = 0; i < _projections.size(); i++) {
625
178
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
178
        }
627
67
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
67
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
67
    }
636
5.22k
    return Status::OK();
637
5.22k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
742k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
742k
    _conjuncts.resize(_parent->_conjuncts.size());
618
742k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
742k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
742k
    return Status::OK();
637
742k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
9.93k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9.93k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9.93k
    _terminated = true;
645
9.93k
    return Status::OK();
646
9.93k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
492
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
492
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
492
    _terminated = true;
645
492
    return Status::OK();
646
492
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
28
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
28
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
28
    _terminated = true;
645
28
    return Status::OK();
646
28
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
109
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
109
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
109
    _terminated = true;
645
109
    return Status::OK();
646
109
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4
    _terminated = true;
645
4
    return Status::OK();
646
4
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
84
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
84
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
84
    _terminated = true;
645
84
    return Status::OK();
646
84
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7.91k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.91k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.91k
    _terminated = true;
645
7.91k
    return Status::OK();
646
7.91k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
41
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
41
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
41
    _terminated = true;
645
41
    return Status::OK();
646
41
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
9
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9
    _terminated = true;
645
9
    return Status::OK();
646
9
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
27
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
27
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
27
    _terminated = true;
645
27
    return Status::OK();
646
27
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.18k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.18k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.18k
    _terminated = true;
645
1.18k
    return Status::OK();
646
1.18k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
36
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
36
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
36
    _terminated = true;
645
36
    return Status::OK();
646
36
}
647
648
template <typename SharedStateArg>
649
2.58M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.58M
    if (_closed) {
651
264k
        return Status::OK();
652
264k
    }
653
2.32M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.29M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.29M
    }
656
2.32M
    _closed = true;
657
2.32M
    return Status::OK();
658
2.58M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
70.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
70.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
70.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
70.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
70.5k
    }
656
70.5k
    _closed = true;
657
70.5k
    return Status::OK();
658
70.5k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
466k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
466k
    if (_closed) {
651
234k
        return Status::OK();
652
234k
    }
653
232k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
232k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
232k
    }
656
232k
    _closed = true;
657
232k
    return Status::OK();
658
466k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
27
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
27
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
27
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
27
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
27
    }
656
27
    _closed = true;
657
27
    return Status::OK();
658
27
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.13k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.13k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.13k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.13k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.13k
    }
656
5.13k
    _closed = true;
657
5.13k
    return Status::OK();
658
5.13k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
19.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
19.2k
    if (_closed) {
651
9.71k
        return Status::OK();
652
9.71k
    }
653
9.49k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.49k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.49k
    }
656
9.49k
    _closed = true;
657
9.49k
    return Status::OK();
658
19.2k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
99.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
99.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
99.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
99.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
99.2k
    }
656
99.2k
    _closed = true;
657
99.2k
    return Status::OK();
658
99.2k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
65.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
65.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
65.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
65.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
65.2k
    }
656
65.2k
    _closed = true;
657
65.2k
    return Status::OK();
658
65.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
26
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
26
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
26
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
26
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
26
    }
656
26
    _closed = true;
657
26
    return Status::OK();
658
26
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.04M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.04M
    if (_closed) {
651
14.2k
        return Status::OK();
652
14.2k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
1.02M
    _closed = true;
657
1.02M
    return Status::OK();
658
1.04M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.5k
    }
656
56.5k
    _closed = true;
657
56.5k
    return Status::OK();
658
56.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.49k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.49k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.49k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.49k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.49k
    }
656
4.49k
    _closed = true;
657
4.49k
    return Status::OK();
658
4.49k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.07k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.07k
    if (_closed) {
651
536
        return Status::OK();
652
536
    }
653
535
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
535
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
535
    }
656
535
    _closed = true;
657
535
    return Status::OK();
658
1.07k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.8k
    if (_closed) {
651
5.63k
        return Status::OK();
652
5.63k
    }
653
5.21k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.21k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.21k
    }
656
5.21k
    _closed = true;
657
5.21k
    return Status::OK();
658
10.8k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
743k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
743k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
743k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
743k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
743k
    }
656
743k
    _closed = true;
657
743k
    return Status::OK();
658
743k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
335
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
335
    if (_closed) {
651
176
        return Status::OK();
652
176
    }
653
159
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
159
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
159
    }
656
159
    _closed = true;
657
159
    return Status::OK();
658
335
}
659
660
template <typename SharedState>
661
1.90M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.90M
    _operator_profile =
664
1.90M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.90M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.90M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.90M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.90M
    _operator_profile->add_child(_common_profile, true);
673
1.90M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.90M
    _operator_profile->set_metadata(_parent->node_id());
676
1.90M
    _wait_for_finish_dependency_timer =
677
1.90M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.90M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.90M
    if constexpr (!is_fake_shared) {
680
1.32M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.32M
            info.shared_state_map.end()) {
682
367k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
287k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
287k
            }
685
367k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
367k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
367k
                                                  ? 0
688
367k
                                                  : info.task_idx]
689
367k
                                  .get();
690
367k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
954k
        } else {
692
954k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
178
                DCHECK(false);
694
178
            }
695
954k
            _shared_state = info.shared_state->template cast<SharedState>();
696
954k
            _dependency = _shared_state->create_sink_dependency(
697
954k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
954k
        }
699
1.32M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.32M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.32M
    }
702
703
1.90M
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.90M
    _rows_input_counter =
708
1.90M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.90M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.90M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.90M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.90M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.90M
    _memory_used_counter =
714
1.90M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.90M
    _common_profile->add_info_string("IsColocate",
716
1.90M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.90M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.90M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.90M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.90M
    return Status::OK();
721
1.90M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
118k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
118k
    _operator_profile =
664
118k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
118k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
118k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
118k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
118k
    _operator_profile->add_child(_common_profile, true);
673
118k
    _operator_profile->add_child(_custom_profile, true);
674
675
118k
    _operator_profile->set_metadata(_parent->node_id());
676
118k
    _wait_for_finish_dependency_timer =
677
118k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
118k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
118k
    if constexpr (!is_fake_shared) {
680
118k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
118k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
13.8k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
13.8k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
13.8k
                                                  ? 0
688
13.8k
                                                  : info.task_idx]
689
13.8k
                                  .get();
690
13.8k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
104k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
104k
            _shared_state = info.shared_state->template cast<SharedState>();
696
104k
            _dependency = _shared_state->create_sink_dependency(
697
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
104k
        }
699
118k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
118k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
118k
    }
702
703
118k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
118k
    _rows_input_counter =
708
118k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
118k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
118k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
118k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
118k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
118k
    _memory_used_counter =
714
118k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
118k
    _common_profile->add_info_string("IsColocate",
716
118k
                                     std::to_string(_parent->is_colocated_operator()));
717
118k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
118k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
118k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
118k
    return Status::OK();
721
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2
    _operator_profile =
664
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2
    _operator_profile->add_child(_common_profile, true);
673
2
    _operator_profile->add_child(_custom_profile, true);
674
675
2
    _operator_profile->set_metadata(_parent->node_id());
676
2
    _wait_for_finish_dependency_timer =
677
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2
    if constexpr (!is_fake_shared) {
680
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2
            _shared_state = info.shared_state->template cast<SharedState>();
696
2
            _dependency = _shared_state->create_sink_dependency(
697
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2
        }
699
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2
    }
702
703
2
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2
    _rows_input_counter =
708
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2
    _memory_used_counter =
714
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2
    _common_profile->add_info_string("IsColocate",
716
2
                                     std::to_string(_parent->is_colocated_operator()));
717
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2
    return Status::OK();
721
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
234k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
234k
    _operator_profile =
664
234k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
234k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
234k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
234k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
234k
    _operator_profile->add_child(_common_profile, true);
673
234k
    _operator_profile->add_child(_custom_profile, true);
674
675
234k
    _operator_profile->set_metadata(_parent->node_id());
676
234k
    _wait_for_finish_dependency_timer =
677
234k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
234k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
234k
    if constexpr (!is_fake_shared) {
680
234k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
234k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
234k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
234k
            _shared_state = info.shared_state->template cast<SharedState>();
696
234k
            _dependency = _shared_state->create_sink_dependency(
697
234k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
234k
        }
699
234k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
234k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
234k
    }
702
703
234k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
234k
    _rows_input_counter =
708
234k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
234k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
234k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
234k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
234k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
234k
    _memory_used_counter =
714
234k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
234k
    _common_profile->add_info_string("IsColocate",
716
234k
                                     std::to_string(_parent->is_colocated_operator()));
717
234k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
234k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
234k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
234k
    return Status::OK();
721
234k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
34
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
34
    _operator_profile =
664
34
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
34
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
34
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
34
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
34
    _operator_profile->add_child(_common_profile, true);
673
34
    _operator_profile->add_child(_custom_profile, true);
674
675
34
    _operator_profile->set_metadata(_parent->node_id());
676
34
    _wait_for_finish_dependency_timer =
677
34
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
34
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
34
    if constexpr (!is_fake_shared) {
680
34
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
34
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
34
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
34
            _shared_state = info.shared_state->template cast<SharedState>();
696
34
            _dependency = _shared_state->create_sink_dependency(
697
34
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
34
        }
699
34
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
34
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
34
    }
702
703
34
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
34
    _rows_input_counter =
708
34
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
34
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
34
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
34
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
34
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
34
    _memory_used_counter =
714
34
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
34
    _common_profile->add_info_string("IsColocate",
716
34
                                     std::to_string(_parent->is_colocated_operator()));
717
34
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
34
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
34
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
34
    return Status::OK();
721
34
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.13k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.13k
    _operator_profile =
664
5.13k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.13k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.13k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5.13k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.13k
    _operator_profile->add_child(_common_profile, true);
673
5.13k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.13k
    _operator_profile->set_metadata(_parent->node_id());
676
5.13k
    _wait_for_finish_dependency_timer =
677
5.13k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.13k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.13k
    if constexpr (!is_fake_shared) {
680
5.13k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.13k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5.13k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.13k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.13k
            _dependency = _shared_state->create_sink_dependency(
697
5.13k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.13k
        }
699
5.13k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.13k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.13k
    }
702
703
5.13k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5.13k
    _rows_input_counter =
708
5.13k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.13k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.13k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.13k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.13k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.13k
    _memory_used_counter =
714
5.13k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.13k
    _common_profile->add_info_string("IsColocate",
716
5.13k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.13k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.13k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.13k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.13k
    return Status::OK();
721
5.13k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.48k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.48k
    _operator_profile =
664
9.48k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.48k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.48k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
9.48k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.48k
    _operator_profile->add_child(_common_profile, true);
673
9.48k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.48k
    _operator_profile->set_metadata(_parent->node_id());
676
9.48k
    _wait_for_finish_dependency_timer =
677
9.48k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.48k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.48k
    if constexpr (!is_fake_shared) {
680
9.48k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.48k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
9.48k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.48k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.48k
            _dependency = _shared_state->create_sink_dependency(
697
9.48k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.48k
        }
699
9.48k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.48k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.48k
    }
702
703
9.48k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
9.48k
    _rows_input_counter =
708
9.48k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.48k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.48k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.48k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.48k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.48k
    _memory_used_counter =
714
9.48k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.48k
    _common_profile->add_info_string("IsColocate",
716
9.48k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.48k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.48k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.48k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.48k
    return Status::OK();
721
9.48k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
99.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
99.2k
    _operator_profile =
664
99.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
99.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
99.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
99.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
99.2k
    _operator_profile->add_child(_common_profile, true);
673
99.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
99.2k
    _operator_profile->set_metadata(_parent->node_id());
676
99.2k
    _wait_for_finish_dependency_timer =
677
99.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
99.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
99.2k
    if constexpr (!is_fake_shared) {
680
99.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
99.2k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
99.2k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
99.2k
            _shared_state = info.shared_state->template cast<SharedState>();
696
99.2k
            _dependency = _shared_state->create_sink_dependency(
697
99.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
99.2k
        }
699
99.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
99.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
99.2k
    }
702
703
99.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
99.2k
    _rows_input_counter =
708
99.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
99.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
99.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
99.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
99.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
99.2k
    _memory_used_counter =
714
99.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
99.2k
    _common_profile->add_info_string("IsColocate",
716
99.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
99.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
99.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
99.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
99.2k
    return Status::OK();
721
99.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
65.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
65.5k
    _operator_profile =
664
65.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
65.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
65.5k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
65.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
65.5k
    _operator_profile->add_child(_common_profile, true);
673
65.5k
    _operator_profile->add_child(_custom_profile, true);
674
675
65.5k
    _operator_profile->set_metadata(_parent->node_id());
676
65.5k
    _wait_for_finish_dependency_timer =
677
65.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
65.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
65.5k
    if constexpr (!is_fake_shared) {
680
65.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
65.6k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
65.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
65.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
65.6k
                                                  ? 0
688
65.6k
                                                  : info.task_idx]
689
65.6k
                                  .get();
690
65.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
65.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
65.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
65.5k
    }
702
703
65.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
65.5k
    _rows_input_counter =
708
65.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
65.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
65.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
65.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
65.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
65.5k
    _memory_used_counter =
714
65.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
65.5k
    _common_profile->add_info_string("IsColocate",
716
65.5k
                                     std::to_string(_parent->is_colocated_operator()));
717
65.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
65.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
65.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
65.5k
    return Status::OK();
721
65.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
37
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
37
    _operator_profile =
664
37
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
37
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
37
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
37
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
37
    _operator_profile->add_child(_common_profile, true);
673
37
    _operator_profile->add_child(_custom_profile, true);
674
675
37
    _operator_profile->set_metadata(_parent->node_id());
676
37
    _wait_for_finish_dependency_timer =
677
37
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
37
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
37
    if constexpr (!is_fake_shared) {
680
37
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
37
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
37
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
37
            _shared_state = info.shared_state->template cast<SharedState>();
696
37
            _dependency = _shared_state->create_sink_dependency(
697
37
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
37
        }
699
37
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
37
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
37
    }
702
703
37
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
37
    _rows_input_counter =
708
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
37
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
37
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
37
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
37
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
37
    _memory_used_counter =
714
37
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
37
    _common_profile->add_info_string("IsColocate",
716
37
                                     std::to_string(_parent->is_colocated_operator()));
717
37
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
37
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
37
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
37
    return Status::OK();
721
37
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
578k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
578k
    _operator_profile =
664
578k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
578k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
578k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
578k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
578k
    _operator_profile->add_child(_common_profile, true);
673
578k
    _operator_profile->add_child(_custom_profile, true);
674
675
578k
    _operator_profile->set_metadata(_parent->node_id());
676
578k
    _wait_for_finish_dependency_timer =
677
578k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
578k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
    if constexpr (!is_fake_shared) {
680
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
                                                  ? 0
688
                                                  : info.task_idx]
689
                                  .get();
690
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
            _shared_state = info.shared_state->template cast<SharedState>();
696
            _dependency = _shared_state->create_sink_dependency(
697
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
        }
699
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
    }
702
703
578k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
578k
    _rows_input_counter =
708
578k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
578k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
578k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
578k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
578k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
578k
    _memory_used_counter =
714
578k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
578k
    _common_profile->add_info_string("IsColocate",
716
578k
                                     std::to_string(_parent->is_colocated_operator()));
717
578k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
578k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
578k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
578k
    return Status::OK();
721
578k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11.0k
    _operator_profile =
664
11.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
11.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11.0k
    _operator_profile->add_child(_common_profile, true);
673
11.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
11.0k
    _operator_profile->set_metadata(_parent->node_id());
676
11.0k
    _wait_for_finish_dependency_timer =
677
11.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11.0k
    if constexpr (!is_fake_shared) {
680
11.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11.0k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
11.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
11.0k
            _dependency = _shared_state->create_sink_dependency(
697
11.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11.0k
        }
699
11.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11.0k
    }
702
703
11.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
11.0k
    _rows_input_counter =
708
11.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11.0k
    _memory_used_counter =
714
11.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11.0k
    _common_profile->add_info_string("IsColocate",
716
11.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
11.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11.0k
    return Status::OK();
721
11.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
637
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
637
    _operator_profile =
664
637
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
637
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
637
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
637
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
637
    _operator_profile->add_child(_common_profile, true);
673
637
    _operator_profile->add_child(_custom_profile, true);
674
675
637
    _operator_profile->set_metadata(_parent->node_id());
676
637
    _wait_for_finish_dependency_timer =
677
637
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
637
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
637
    if constexpr (!is_fake_shared) {
680
637
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
637
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
637
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
637
            _shared_state = info.shared_state->template cast<SharedState>();
696
637
            _dependency = _shared_state->create_sink_dependency(
697
637
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
637
        }
699
637
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
637
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
637
    }
702
703
637
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
637
    _rows_input_counter =
708
637
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
637
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
637
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
637
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
637
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
637
    _memory_used_counter =
714
637
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
637
    _common_profile->add_info_string("IsColocate",
716
637
                                     std::to_string(_parent->is_colocated_operator()));
717
637
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
637
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
637
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
637
    return Status::OK();
721
637
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.61k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.61k
    _operator_profile =
664
1.61k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.61k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.61k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.61k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.61k
    _operator_profile->add_child(_common_profile, true);
673
1.61k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.61k
    _operator_profile->set_metadata(_parent->node_id());
676
1.61k
    _wait_for_finish_dependency_timer =
677
1.61k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.61k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.61k
    if constexpr (!is_fake_shared) {
680
1.61k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.61k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.61k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.61k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.61k
            _dependency = _shared_state->create_sink_dependency(
697
1.61k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.61k
        }
699
1.61k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.61k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.61k
    }
702
703
1.61k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.61k
    _rows_input_counter =
708
1.61k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.61k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.61k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.61k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.61k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.61k
    _memory_used_counter =
714
1.61k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.61k
    _common_profile->add_info_string("IsColocate",
716
1.61k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.61k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.61k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.61k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.61k
    return Status::OK();
721
1.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.7k
    _operator_profile =
664
12.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.7k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.7k
    _operator_profile->add_child(_common_profile, true);
673
12.7k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.7k
    _operator_profile->set_metadata(_parent->node_id());
676
12.7k
    _wait_for_finish_dependency_timer =
677
12.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.7k
    if constexpr (!is_fake_shared) {
680
12.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.7k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.7k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.7k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.7k
            _dependency = _shared_state->create_sink_dependency(
697
12.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.7k
        }
699
12.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.7k
    }
702
703
12.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.7k
    _rows_input_counter =
708
12.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.7k
    _memory_used_counter =
714
12.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.7k
    _common_profile->add_info_string("IsColocate",
716
12.7k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.7k
    return Status::OK();
721
12.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
287k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
287k
    _operator_profile =
664
287k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
287k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
287k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
287k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
287k
    _operator_profile->add_child(_common_profile, true);
673
287k
    _operator_profile->add_child(_custom_profile, true);
674
675
287k
    _operator_profile->set_metadata(_parent->node_id());
676
287k
    _wait_for_finish_dependency_timer =
677
287k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
287k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
287k
    if constexpr (!is_fake_shared) {
680
287k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
287k
            info.shared_state_map.end()) {
682
287k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
287k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
287k
            }
685
287k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
287k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
287k
                                                  ? 0
688
287k
                                                  : info.task_idx]
689
287k
                                  .get();
690
287k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
287k
        } else {
692
178
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
178
                DCHECK(false);
694
178
            }
695
178
            _shared_state = info.shared_state->template cast<SharedState>();
696
178
            _dependency = _shared_state->create_sink_dependency(
697
178
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
178
        }
699
287k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
287k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
287k
    }
702
703
287k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
287k
    _rows_input_counter =
708
287k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
287k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
287k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
287k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
287k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
287k
    _memory_used_counter =
714
287k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
287k
    _common_profile->add_info_string("IsColocate",
716
287k
                                     std::to_string(_parent->is_colocated_operator()));
717
287k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
287k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
287k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
287k
    return Status::OK();
721
287k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
474k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
474k
    _operator_profile =
664
474k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
474k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
474k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
474k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
474k
    _operator_profile->add_child(_common_profile, true);
673
474k
    _operator_profile->add_child(_custom_profile, true);
674
675
474k
    _operator_profile->set_metadata(_parent->node_id());
676
474k
    _wait_for_finish_dependency_timer =
677
474k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
474k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
474k
    if constexpr (!is_fake_shared) {
680
474k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
474k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
474k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
474k
            _shared_state = info.shared_state->template cast<SharedState>();
696
474k
            _dependency = _shared_state->create_sink_dependency(
697
474k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
474k
        }
699
474k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
474k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
474k
    }
702
703
474k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
474k
    _rows_input_counter =
708
474k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
474k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
474k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
474k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
474k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
474k
    _memory_used_counter =
714
474k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
474k
    _common_profile->add_info_string("IsColocate",
716
474k
                                     std::to_string(_parent->is_colocated_operator()));
717
474k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
474k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
474k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
474k
    return Status::OK();
721
474k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.90M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.90M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.90M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.32M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.32M
    }
731
1.90M
    _closed = true;
732
1.90M
    return Status::OK();
733
1.90M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
118k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
118k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
118k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
118k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
118k
    }
731
118k
    _closed = true;
732
118k
    return Status::OK();
733
118k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
234k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
234k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
234k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
234k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
234k
    }
731
234k
    _closed = true;
732
234k
    return Status::OK();
733
234k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
25
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
25
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
23
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
23
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
23
    }
731
23
    _closed = true;
732
23
    return Status::OK();
733
25
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.11k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.11k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.11k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.11k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.11k
    }
731
5.11k
    _closed = true;
732
5.11k
    return Status::OK();
733
5.11k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.48k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.48k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.48k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.48k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.48k
    }
731
9.48k
    _closed = true;
732
9.48k
    return Status::OK();
733
9.48k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
99.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
99.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
99.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
99.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
99.1k
    }
731
99.1k
    _closed = true;
732
99.1k
    return Status::OK();
733
99.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
65.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
65.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
65.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
65.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
65.1k
    }
731
65.1k
    _closed = true;
732
65.1k
    return Status::OK();
733
65.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
26
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
26
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
26
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
26
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
26
    }
731
26
    _closed = true;
732
26
    return Status::OK();
733
26
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
580k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
580k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
    }
731
580k
    _closed = true;
732
580k
    return Status::OK();
733
580k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
11.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
11.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
11.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
11.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
11.1k
    }
731
11.1k
    _closed = true;
732
11.1k
    return Status::OK();
733
11.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
533
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
533
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
533
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
533
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
533
    }
731
533
    _closed = true;
732
533
    return Status::OK();
733
533
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.63k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.63k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.63k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.63k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.63k
    }
731
1.63k
    _closed = true;
732
1.63k
    return Status::OK();
733
1.63k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.7k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.7k
    }
731
12.7k
    _closed = true;
732
12.7k
    return Status::OK();
733
12.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
288k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
288k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
288k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
288k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
288k
    }
731
288k
    _closed = true;
732
288k
    return Status::OK();
733
288k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
477k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
477k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
477k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
477k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
477k
    }
731
477k
    _closed = true;
732
477k
    return Status::OK();
733
477k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
1.70k
                                                          bool* eos) {
738
1.70k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.69k
    return pull(state, block, eos);
740
1.70k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
37
                                                          bool* eos) {
738
37
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
37
    return pull(state, block, eos);
740
37
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.66k
                                                          bool* eos) {
738
1.66k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.65k
    return pull(state, block, eos);
740
1.66k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
617k
                                                         bool* eos) {
745
617k
    auto& local_state = get_local_state(state);
746
617k
    if (need_more_input_data(state)) {
747
583k
        local_state._child_block->clear_column_data(
748
583k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
583k
                        .num_slots());
750
583k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
583k
                state, local_state._child_block.get(), &local_state._child_eos));
752
583k
        *eos = local_state._child_eos;
753
583k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
48.7k
            return Status::OK();
755
48.7k
        }
756
535k
        {
757
535k
            SCOPED_TIMER(local_state.exec_time_counter());
758
535k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
535k
        }
760
535k
    }
761
762
568k
    if (!need_more_input_data(state)) {
763
537k
        SCOPED_TIMER(local_state.exec_time_counter());
764
537k
        bool new_eos = false;
765
537k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
537k
        if (new_eos) {
767
460k
            *eos = true;
768
460k
        } else if (!need_more_input_data(state)) {
769
26.4k
            *eos = false;
770
26.4k
        }
771
537k
    }
772
568k
    return Status::OK();
773
568k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
127k
                                                         bool* eos) {
745
127k
    auto& local_state = get_local_state(state);
746
127k
    if (need_more_input_data(state)) {
747
107k
        local_state._child_block->clear_column_data(
748
107k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
107k
                        .num_slots());
750
107k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
107k
                state, local_state._child_block.get(), &local_state._child_eos));
752
107k
        *eos = local_state._child_eos;
753
107k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
26.1k
            return Status::OK();
755
26.1k
        }
756
81.2k
        {
757
81.2k
            SCOPED_TIMER(local_state.exec_time_counter());
758
81.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
81.2k
        }
760
81.2k
    }
761
762
101k
    if (!need_more_input_data(state)) {
763
101k
        SCOPED_TIMER(local_state.exec_time_counter());
764
101k
        bool new_eos = false;
765
101k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
101k
        if (new_eos) {
767
46.0k
            *eos = true;
768
55.4k
        } else if (!need_more_input_data(state)) {
769
12.1k
            *eos = false;
770
12.1k
        }
771
101k
    }
772
101k
    return Status::OK();
773
101k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.23k
                                                         bool* eos) {
745
4.23k
    auto& local_state = get_local_state(state);
746
4.23k
    if (need_more_input_data(state)) {
747
2.33k
        local_state._child_block->clear_column_data(
748
2.33k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.33k
                        .num_slots());
750
2.33k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.33k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.33k
        *eos = local_state._child_eos;
753
2.33k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
470
            return Status::OK();
755
470
        }
756
1.86k
        {
757
1.86k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.86k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.86k
        }
760
1.86k
    }
761
762
3.77k
    if (!need_more_input_data(state)) {
763
3.77k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.77k
        bool new_eos = false;
765
3.77k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.77k
        if (new_eos) {
767
1.30k
            *eos = true;
768
2.46k
        } else if (!need_more_input_data(state)) {
769
1.91k
            *eos = false;
770
1.91k
        }
771
3.77k
    }
772
3.76k
    return Status::OK();
773
3.76k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.87k
                                                         bool* eos) {
745
1.87k
    auto& local_state = get_local_state(state);
746
1.87k
    if (need_more_input_data(state)) {
747
1.87k
        local_state._child_block->clear_column_data(
748
1.87k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.87k
                        .num_slots());
750
1.87k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.87k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.87k
        *eos = local_state._child_eos;
753
1.87k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
793
            return Status::OK();
755
793
        }
756
1.08k
        {
757
1.08k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.08k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.08k
        }
760
1.08k
    }
761
762
1.08k
    if (!need_more_input_data(state)) {
763
1.08k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.08k
        bool new_eos = false;
765
1.08k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.08k
        if (new_eos) {
767
803
            *eos = true;
768
803
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.08k
    }
772
1.08k
    return Status::OK();
773
1.08k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
17.9k
                                                         bool* eos) {
745
17.9k
    auto& local_state = get_local_state(state);
746
17.9k
    if (need_more_input_data(state)) {
747
17.9k
        local_state._child_block->clear_column_data(
748
17.9k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
17.9k
                        .num_slots());
750
17.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
17.9k
                state, local_state._child_block.get(), &local_state._child_eos));
752
17.9k
        *eos = local_state._child_eos;
753
17.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
4.20k
            return Status::OK();
755
4.20k
        }
756
13.7k
        {
757
13.7k
            SCOPED_TIMER(local_state.exec_time_counter());
758
13.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
13.7k
        }
760
13.7k
    }
761
762
13.7k
    if (!need_more_input_data(state)) {
763
7.29k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.29k
        bool new_eos = false;
765
7.29k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.29k
        if (new_eos) {
767
7.19k
            *eos = true;
768
7.19k
        } else if (!need_more_input_data(state)) {
769
11
            *eos = false;
770
11
        }
771
7.29k
    }
772
13.7k
    return Status::OK();
773
13.7k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
436k
                                                         bool* eos) {
745
436k
    auto& local_state = get_local_state(state);
746
437k
    if (need_more_input_data(state)) {
747
437k
        local_state._child_block->clear_column_data(
748
437k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
437k
                        .num_slots());
750
437k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
437k
                state, local_state._child_block.get(), &local_state._child_eos));
752
437k
        *eos = local_state._child_eos;
753
437k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
15.2k
            return Status::OK();
755
15.2k
        }
756
422k
        {
757
422k
            SCOPED_TIMER(local_state.exec_time_counter());
758
422k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
422k
        }
760
422k
    }
761
762
421k
    if (!need_more_input_data(state)) {
763
396k
        SCOPED_TIMER(local_state.exec_time_counter());
764
396k
        bool new_eos = false;
765
396k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
396k
        if (new_eos) {
767
395k
            *eos = true;
768
395k
        } else if (!need_more_input_data(state)) {
769
8
            *eos = false;
770
8
        }
771
396k
    }
772
421k
    return Status::OK();
773
421k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.5k
                                                         bool* eos) {
745
22.5k
    auto& local_state = get_local_state(state);
746
22.5k
    if (need_more_input_data(state)) {
747
10.5k
        local_state._child_block->clear_column_data(
748
10.5k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.5k
                        .num_slots());
750
10.5k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.5k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.5k
        *eos = local_state._child_eos;
753
10.5k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.15k
            return Status::OK();
755
1.15k
        }
756
9.43k
        {
757
9.43k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.43k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.43k
        }
760
9.43k
    }
761
762
21.3k
    if (!need_more_input_data(state)) {
763
20.8k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.8k
        bool new_eos = false;
765
20.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.8k
        if (new_eos) {
767
5.10k
            *eos = true;
768
15.7k
        } else if (!need_more_input_data(state)) {
769
11.9k
            *eos = false;
770
11.9k
        }
771
20.8k
    }
772
21.3k
    return Status::OK();
773
21.3k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
6.70k
                                                         bool* eos) {
745
6.70k
    auto& local_state = get_local_state(state);
746
6.70k
    if (need_more_input_data(state)) {
747
6.34k
        local_state._child_block->clear_column_data(
748
6.34k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.34k
                        .num_slots());
750
6.34k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.34k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.34k
        *eos = local_state._child_eos;
753
6.34k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
734
            return Status::OK();
755
734
        }
756
5.61k
        {
757
5.61k
            SCOPED_TIMER(local_state.exec_time_counter());
758
5.61k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
5.61k
        }
760
5.61k
    }
761
762
5.98k
    if (!need_more_input_data(state)) {
763
5.98k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.98k
        bool new_eos = false;
765
5.98k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.98k
        if (new_eos) {
767
3.83k
            *eos = true;
768
3.83k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
5.98k
    }
772
5.96k
    return Status::OK();
773
5.96k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
49.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.7k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.7k
                                                         "AsyncWriterDependency", true);
781
49.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.7k
                             _finish_dependency));
783
784
49.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.7k
    return Status::OK();
787
49.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
368
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
368
    RETURN_IF_ERROR(Base::init(state, info));
779
368
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
368
                                                         "AsyncWriterDependency", true);
781
368
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
368
                             _finish_dependency));
783
784
368
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
368
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
368
    return Status::OK();
787
368
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
49.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
49.3k
    RETURN_IF_ERROR(Base::init(state, info));
779
49.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
49.3k
                                                         "AsyncWriterDependency", true);
781
49.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
49.3k
                             _finish_dependency));
783
784
49.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
49.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
49.3k
    return Status::OK();
787
49.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
20
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
20
    RETURN_IF_ERROR(Base::init(state, info));
779
20
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
20
                                                         "AsyncWriterDependency", true);
781
20
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
20
                             _finish_dependency));
783
784
20
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
20
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
20
    return Status::OK();
787
20
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
16
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
16
    RETURN_IF_ERROR(Base::init(state, info));
779
16
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
16
                                                         "AsyncWriterDependency", true);
781
16
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
16
                             _finish_dependency));
783
784
16
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
16
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
16
    return Status::OK();
787
16
}
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
50.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.6k
    RETURN_IF_ERROR(Base::open(state));
793
50.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
391k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
341k
        RETURN_IF_ERROR(
796
341k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
341k
    }
798
50.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.6k
    return Status::OK();
800
50.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
369
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
369
    RETURN_IF_ERROR(Base::open(state));
793
369
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.87k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.50k
        RETURN_IF_ERROR(
796
1.50k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.50k
    }
798
369
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
369
    return Status::OK();
800
369
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
50.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
50.2k
    RETURN_IF_ERROR(Base::open(state));
793
50.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
389k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
339k
        RETURN_IF_ERROR(
796
339k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
339k
    }
798
50.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
50.2k
    return Status::OK();
800
50.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
20
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
20
    RETURN_IF_ERROR(Base::open(state));
793
20
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
360
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
340
        RETURN_IF_ERROR(
796
340
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
340
    }
798
20
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
20
    return Status::OK();
800
20
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
16
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
16
    RETURN_IF_ERROR(Base::open(state));
793
16
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
33
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
17
        RETURN_IF_ERROR(
796
17
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
17
    }
798
16
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
16
    return Status::OK();
800
16
}
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
66.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
66.6k
    return _writer->sink(block, eos);
806
66.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.63k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.63k
    return _writer->sink(block, eos);
806
1.63k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
64.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.9k
    return _writer->sink(block, eos);
806
64.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
20
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
20
    return _writer->sink(block, eos);
806
20
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
52
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
52
    return _writer->sink(block, eos);
806
52
}
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
50.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.7k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.7k
    if (_writer) {
818
50.7k
        Status st = _writer->get_writer_status();
819
50.7k
        if (exec_status.ok()) {
820
50.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.6k
                                                       : Status::Cancelled("force close"));
822
50.6k
        } else {
823
61
            _writer->force_close(exec_status);
824
61
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.7k
        RETURN_IF_ERROR(st);
829
50.7k
    }
830
50.6k
    return Base::close(state, exec_status);
831
50.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
358
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
358
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
358
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
358
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
358
    if (_writer) {
818
358
        Status st = _writer->get_writer_status();
819
358
        if (exec_status.ok()) {
820
358
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
358
                                                       : Status::Cancelled("force close"));
822
358
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
358
        RETURN_IF_ERROR(st);
829
358
    }
830
358
    return Base::close(state, exec_status);
831
358
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
50.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
50.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
50.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
50.3k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
50.3k
    if (_writer) {
818
50.3k
        Status st = _writer->get_writer_status();
819
50.3k
        if (exec_status.ok()) {
820
50.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
50.3k
                                                       : Status::Cancelled("force close"));
822
50.3k
        } else {
823
61
            _writer->force_close(exec_status);
824
61
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
50.3k
        RETURN_IF_ERROR(st);
829
50.3k
    }
830
50.2k
    return Base::close(state, exec_status);
831
50.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
20
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
20
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
20
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
20
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
20
    if (_writer) {
818
20
        Status st = _writer->get_writer_status();
819
20
        if (exec_status.ok()) {
820
20
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
20
                                                       : Status::Cancelled("force close"));
822
20
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
20
        RETURN_IF_ERROR(st);
829
20
    }
830
20
    return Base::close(state, exec_status);
831
20
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
16
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
16
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
16
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
16
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
16
    if (_writer) {
818
16
        Status st = _writer->get_writer_status();
819
16
        if (exec_status.ok()) {
820
16
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
16
                                                       : Status::Cancelled("force close"));
822
16
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
16
        RETURN_IF_ERROR(st);
829
16
    }
830
16
    return Base::close(state, exec_status);
831
16
}
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(PaimonTableSinkLocalState)
850
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
851
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
852
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
853
DECLARE_OPERATOR(MCTableSinkLocalState)
854
DECLARE_OPERATOR(AnalyticSinkLocalState)
855
DECLARE_OPERATOR(BlackholeSinkLocalState)
856
DECLARE_OPERATOR(SortSinkLocalState)
857
DECLARE_OPERATOR(SpillSortSinkLocalState)
858
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
859
DECLARE_OPERATOR(AggSinkLocalState)
860
DECLARE_OPERATOR(BucketedAggSinkLocalState)
861
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
862
DECLARE_OPERATOR(ExchangeSinkLocalState)
863
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
864
DECLARE_OPERATOR(UnionSinkLocalState)
865
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
866
DECLARE_OPERATOR(PartitionSortSinkLocalState)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
869
DECLARE_OPERATOR(SetSinkLocalState<true>)
870
DECLARE_OPERATOR(SetSinkLocalState<false>)
871
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
872
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
873
DECLARE_OPERATOR(CacheSinkLocalState)
874
DECLARE_OPERATOR(DictSinkLocalState)
875
DECLARE_OPERATOR(RecCTESinkLocalState)
876
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
877
878
#undef DECLARE_OPERATOR
879
880
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
881
DECLARE_OPERATOR(HashJoinProbeLocalState)
882
DECLARE_OPERATOR(OlapScanLocalState)
883
DECLARE_OPERATOR(GroupCommitLocalState)
884
DECLARE_OPERATOR(JDBCScanLocalState)
885
DECLARE_OPERATOR(FileScanLocalState)
886
DECLARE_OPERATOR(AnalyticLocalState)
887
DECLARE_OPERATOR(SortLocalState)
888
DECLARE_OPERATOR(SpillSortLocalState)
889
DECLARE_OPERATOR(LocalMergeSortLocalState)
890
DECLARE_OPERATOR(AggLocalState)
891
DECLARE_OPERATOR(BucketedAggLocalState)
892
DECLARE_OPERATOR(PartitionedAggLocalState)
893
DECLARE_OPERATOR(TableFunctionLocalState)
894
DECLARE_OPERATOR(ExchangeLocalState)
895
DECLARE_OPERATOR(RepeatLocalState)
896
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
897
DECLARE_OPERATOR(AssertNumRowsLocalState)
898
DECLARE_OPERATOR(EmptySetLocalState)
899
DECLARE_OPERATOR(UnionSourceLocalState)
900
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
901
DECLARE_OPERATOR(PartitionSortSourceLocalState)
902
DECLARE_OPERATOR(SetSourceLocalState<true>)
903
DECLARE_OPERATOR(SetSourceLocalState<false>)
904
DECLARE_OPERATOR(DataGenLocalState)
905
DECLARE_OPERATOR(SchemaScanLocalState)
906
DECLARE_OPERATOR(MetaScanLocalState)
907
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
908
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
909
DECLARE_OPERATOR(CacheSourceLocalState)
910
DECLARE_OPERATOR(RecCTESourceLocalState)
911
DECLARE_OPERATOR(RecCTEScanLocalState)
912
913
#ifdef BE_TEST
914
DECLARE_OPERATOR(MockLocalState)
915
DECLARE_OPERATOR(MockScanLocalState)
916
#endif
917
#undef DECLARE_OPERATOR
918
919
template class StreamingOperatorX<AssertNumRowsLocalState>;
920
template class StreamingOperatorX<SelectLocalState>;
921
922
template class StatefulOperatorX<HashJoinProbeLocalState>;
923
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
924
template class StatefulOperatorX<RepeatLocalState>;
925
template class StatefulOperatorX<MaterializationLocalState>;
926
template class StatefulOperatorX<StreamingAggLocalState>;
927
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
928
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
929
template class StatefulOperatorX<TableFunctionLocalState>;
930
931
template class PipelineXSinkLocalState<HashJoinSharedState>;
932
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
933
template class PipelineXSinkLocalState<SortSharedState>;
934
template class PipelineXSinkLocalState<SpillSortSharedState>;
935
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
936
template class PipelineXSinkLocalState<AnalyticSharedState>;
937
template class PipelineXSinkLocalState<AggSharedState>;
938
template class PipelineXSinkLocalState<BucketedAggSharedState>;
939
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
940
template class PipelineXSinkLocalState<FakeSharedState>;
941
template class PipelineXSinkLocalState<UnionSharedState>;
942
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
943
template class PipelineXSinkLocalState<MultiCastSharedState>;
944
template class PipelineXSinkLocalState<SetSharedState>;
945
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
946
template class PipelineXSinkLocalState<BasicSharedState>;
947
template class PipelineXSinkLocalState<DataQueueSharedState>;
948
template class PipelineXSinkLocalState<RecCTESharedState>;
949
950
template class PipelineXLocalState<HashJoinSharedState>;
951
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
952
template class PipelineXLocalState<SortSharedState>;
953
template class PipelineXLocalState<SpillSortSharedState>;
954
template class PipelineXLocalState<NestedLoopJoinSharedState>;
955
template class PipelineXLocalState<AnalyticSharedState>;
956
template class PipelineXLocalState<AggSharedState>;
957
template class PipelineXLocalState<BucketedAggSharedState>;
958
template class PipelineXLocalState<PartitionedAggSharedState>;
959
template class PipelineXLocalState<FakeSharedState>;
960
template class PipelineXLocalState<UnionSharedState>;
961
template class PipelineXLocalState<DataQueueSharedState>;
962
template class PipelineXLocalState<MultiCastSharedState>;
963
template class PipelineXLocalState<PartitionSortNodeSharedState>;
964
template class PipelineXLocalState<SetSharedState>;
965
template class PipelineXLocalState<LocalExchangeSharedState>;
966
template class PipelineXLocalState<BasicSharedState>;
967
template class PipelineXLocalState<RecCTESharedState>;
968
969
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
970
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
973
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
977
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
978
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
979
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
980
981
#ifdef BE_TEST
982
template class OperatorX<DummyOperatorLocalState>;
983
template class DataSinkOperatorX<DummySinkLocalState>;
984
#endif
985
986
} // namespace doris