Coverage Report

Created: 2026-10-01 05:55

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/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
1.91M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.91M
    if (_parent->nereids_id() == -1) {
122
1.00M
        return fmt::format("(id={})", _parent->node_id());
123
1.00M
    } else {
124
904k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
904k
    }
126
1.91M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
71.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
71.3k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
71.3k
    } else {
124
71.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
71.3k
    }
126
71.3k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
230k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
230k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
230k
    } else {
124
230k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
230k
    }
126
230k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
21
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
21
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
21
    } else {
124
21
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
21
    }
126
21
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.11k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.11k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
6.11k
    } else {
124
6.11k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
6.11k
    }
126
6.11k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.42k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.42k
    if (_parent->nereids_id() == -1) {
122
16
        return fmt::format("(id={})", _parent->node_id());
123
8.41k
    } else {
124
8.41k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
8.41k
    }
126
8.42k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
98.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
98.2k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
98.2k
    } else {
124
98.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
98.2k
    }
126
98.2k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
73.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
73.2k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
73.2k
    } else {
124
73.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
73.2k
    }
126
73.2k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
172
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
172
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
172
    } else {
124
172
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
172
    }
126
172
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
653k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
653k
    if (_parent->nereids_id() == -1) {
122
297k
        return fmt::format("(id={})", _parent->node_id());
123
355k
    } else {
124
355k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
355k
    }
126
653k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
56.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
56.3k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
56.3k
    } else {
124
56.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
56.3k
    }
126
56.3k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
26
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.12k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.13k
    if (_parent->nereids_id() == -1) {
122
6.13k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
6.12k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
356
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
356
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
254
    } else {
124
254
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
254
    }
126
356
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.11k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.11k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
5.10k
    } else {
124
5.10k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.10k
    }
126
5.11k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
705k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
705k
    if (_parent->nereids_id() == -1) {
122
705k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
705k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
169
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
169
    } else {
124
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
169
    }
126
169
}
127
128
template <typename SharedStateArg>
129
1.28M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.28M
    if (_parent->nereids_id() == -1) {
131
727k
        return fmt::format("(id={})", _parent->node_id());
132
727k
    } else {
133
552k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
552k
    }
135
1.28M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
120k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
120k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
120k
    } else {
133
120k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
120k
    }
135
120k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
234k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
234k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
234k
    } else {
133
234k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
234k
    }
135
234k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
28
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
28
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
28
    } else {
133
28
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
28
    }
135
28
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.22k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.22k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
6.22k
    } else {
133
6.22k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.22k
    }
135
6.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.43k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.43k
    if (_parent->nereids_id() == -1) {
131
16
        return fmt::format("(id={})", _parent->node_id());
132
8.41k
    } else {
133
8.41k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.41k
    }
135
8.43k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
98.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
98.8k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
98.7k
    } else {
133
98.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
98.7k
    }
135
98.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
72.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
72.9k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
72.9k
    } else {
133
72.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
72.9k
    }
135
72.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
182
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
182
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
182
    } else {
133
182
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
182
    }
135
182
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
23
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
23
    if (_parent->nereids_id() == -1) {
131
20
        return fmt::format("(id={})", _parent->node_id());
132
20
    } else {
133
3
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
3
    }
135
23
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
11.5k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
11.5k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
11.5k
    } else {
133
11.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
11.5k
    }
135
11.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
356
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
356
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
254
    } else {
133
254
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
254
    }
135
356
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.8k
    if (_parent->nereids_id() == -1) {
131
12.8k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
268k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
269k
    if (_parent->nereids_id() == -1) {
131
269k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
268k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
444k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
444k
    if (_parent->nereids_id() == -1) {
131
444k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
444k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
25
    if (_parent->nereids_id() == -1) {
131
25
        return fmt::format("(id={})", _parent->node_id());
132
25
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
338
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
338
    } else {
133
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
338
    }
135
338
}
136
137
template <typename SharedStateArg>
138
30.9k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
30.9k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
30.9k
    _terminated = true;
143
30.9k
    return Status::OK();
144
30.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.0k
    _terminated = true;
143
24.0k
    return Status::OK();
144
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2.87k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2.87k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2.87k
    _terminated = true;
143
2.87k
    return Status::OK();
144
2.87k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.71k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.71k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.71k
    _terminated = true;
143
1.71k
    return Status::OK();
144
1.71k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
730
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
730
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
730
    _terminated = true;
143
730
    return Status::OK();
144
730
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
720
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
720
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
720
    _terminated = true;
143
720
    return Status::OK();
144
720
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
131
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
131
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
131
    _terminated = true;
143
131
    return Status::OK();
144
131
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
5
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
5
    _terminated = true;
143
5
    return Status::OK();
144
5
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
266
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
266
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
266
    _terminated = true;
143
266
    return Status::OK();
144
266
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
11
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
11
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
11
    _terminated = true;
143
11
    return Status::OK();
144
11
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
326
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
326
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
326
    _terminated = true;
143
326
    return Status::OK();
144
326
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
133
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
133
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
133
    _terminated = true;
143
133
    return Status::OK();
144
133
}
145
146
313k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
313k
    return _child && _child->is_serial_operator() && !is_source()
148
313k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
313k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
313k
}
151
152
23.8k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
23.8k
    if (!_child) {
154
22.6k
        return false;
155
22.6k
    }
156
1.21k
    if (_child->is_serial_operator()) {
157
166
        return true;
158
166
    }
159
1.05k
    const auto child_distribution = _child->required_data_distribution(state);
160
1.05k
    return child_distribution.need_local_exchange() &&
161
1.05k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.21k
}
163
164
template <typename SharedStateArg>
165
14.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
14.8k
    fmt::memory_buffer debug_string_buffer;
167
14.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
14.8k
    return fmt::to_string(debug_string_buffer);
169
14.8k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
3
    fmt::memory_buffer debug_string_buffer;
167
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
3
    return fmt::to_string(debug_string_buffer);
169
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
165
14.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
14.8k
    fmt::memory_buffer debug_string_buffer;
167
14.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
14.8k
    return fmt::to_string(debug_string_buffer);
169
14.8k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
1
    fmt::memory_buffer debug_string_buffer;
167
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
1
    return fmt::to_string(debug_string_buffer);
169
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
170
171
template <typename SharedStateArg>
172
14.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
14.8k
    fmt::memory_buffer debug_string_buffer;
174
14.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
14.8k
    return fmt::to_string(debug_string_buffer);
176
14.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
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
172
14.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
14.8k
    fmt::memory_buffer debug_string_buffer;
174
14.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
14.8k
    return fmt::to_string(debug_string_buffer);
176
14.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
14.9k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
14.9k
    fmt::memory_buffer debug_string_buffer;
180
14.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
14.9k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
14.9k
                   _is_serial_operator);
183
14.9k
    return fmt::to_string(debug_string_buffer);
184
14.9k
}
185
186
14.8k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
14.8k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
14.8k
}
189
190
682k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
682k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
682k
    _nereids_id = tnode.nereids_id;
193
682k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
5.61k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
5.61k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
5.61k
            tnode.intermediate_projections_list.size()) {
199
0
            return Status::InternalError(
200
0
                    "intermediate_output_tuple_id_list size:{} not match "
201
0
                    "intermediate_projections_list size:{}",
202
0
                    tnode.intermediate_output_tuple_id_list.size(),
203
0
                    tnode.intermediate_projections_list.size());
204
0
        }
205
5.61k
    }
206
682k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
682k
    _op_name = substr + "_OPERATOR";
208
209
682k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
682k
    } else if (tnode.__isset.conjuncts) {
212
277k
        for (const auto& conjunct : tnode.conjuncts) {
213
277k
            VExprContextSPtr context;
214
277k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
277k
            _conjuncts.emplace_back(context);
216
277k
        }
217
102k
    }
218
219
    // create the projections expr
220
682k
    if (tnode.__isset.projections) {
221
268k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
268k
    }
223
682k
    if (!tnode.intermediate_projections_list.empty()) {
224
5.61k
        DCHECK(has_projection()) << "no final projections";
225
5.61k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
9.37k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
9.37k
            VExprContextSPtrs projections;
228
9.37k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
9.37k
            _projection->intermediate_projections.push_back(projections);
230
9.37k
        }
231
5.61k
    }
232
682k
    return Status::OK();
233
682k
}
234
235
709k
Status OperatorXBase::prepare(RuntimeState* state) {
236
709k
    for (auto& conjunct : _conjuncts) {
237
277k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
277k
    }
239
709k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
659k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
342k
            return a->execute_cost() < b->execute_cost();
242
342k
        });
243
659k
    };
244
245
709k
    if (has_projection()) {
246
268k
        auto& projection = *_projection;
247
277k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
9.37k
            const auto& input_row_desc =
249
9.37k
                    i == 0 ? operator_row_desc_before_projection()
250
9.37k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
9.37k
            RETURN_IF_ERROR(
252
9.37k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
9.37k
        }
254
268k
        const auto& final_projection_input_row_desc =
255
268k
                projection.intermediate_output_row_descriptors.empty()
256
268k
                        ? operator_row_desc_before_projection()
257
268k
                        : projection.intermediate_output_row_descriptors.back();
258
268k
        RETURN_IF_ERROR(
259
268k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
268k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
268k
                                                      projection.output_row_descriptor));
262
268k
    }
263
264
709k
    for (auto& conjunct : _conjuncts) {
265
277k
        RETURN_IF_ERROR(conjunct->open(state));
266
277k
    }
267
709k
    if (has_projection()) {
268
268k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
268k
        for (auto& projections : _projection->intermediate_projections) {
270
9.37k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
9.37k
        }
272
268k
    }
273
709k
    if (_child && !is_source()) {
274
98.5k
        RETURN_IF_ERROR(_child->prepare(state));
275
98.5k
    }
276
277
709k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
709k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
709k
    return Status::OK();
283
709k
}
284
285
7.76k
Status OperatorXBase::terminate(RuntimeState* state) {
286
7.76k
    if (_child && !is_source()) {
287
789
        RETURN_IF_ERROR(_child->terminate(state));
288
789
    }
289
7.76k
    auto result = state->get_local_state_result(operator_id());
290
7.76k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
7.76k
    return result.value()->terminate(state);
294
7.76k
}
295
296
5.17M
Status OperatorXBase::close(RuntimeState* state) {
297
5.17M
    if (_child && !is_source()) {
298
850k
        RETURN_IF_ERROR(_child->close(state));
299
850k
    }
300
5.17M
    auto result = state->get_local_state_result(operator_id());
301
5.17M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
5.17M
    return result.value()->close(state);
305
5.17M
}
306
307
281k
void PipelineXLocalStateBase::clear_origin_block() {
308
281k
    _origin_block.clear_column_data(
309
281k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
281k
}
311
312
831k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
831k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
831k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
831k
    return Status::OK();
317
831k
}
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
281k
                                     Block* output_block) const {
326
281k
    auto* local_state = state->get_local_state(operator_id());
327
281k
    SCOPED_TIMER(local_state->exec_time_counter());
328
281k
    SCOPED_TIMER(local_state->_projection_timer);
329
281k
    const size_t rows = origin_block->rows();
330
281k
    if (rows == 0) {
331
148k
        return Status::OK();
332
148k
    }
333
132k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
132k
    {
336
132k
        Block input_block = *origin_block;
337
338
132k
        ColumnsWithTypeAndName new_columns;
339
132k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.10k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.10k
            new_columns.resize(projections.size());
345
50.5k
            for (int i = 0; i < projections.size(); i++) {
346
47.4k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
47.4k
                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
47.4k
            }
355
3.09k
            Block tmp_block {new_columns};
356
3.09k
            input_block.swap(tmp_block);
357
3.09k
        }
358
359
132k
        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
132k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
132k
                output_block, _projection->output_row_descriptor);
368
132k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
132k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
132k
        Columns shared_columns(mutable_columns.size());
371
372
758k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
625k
            ColumnPtr column_ptr;
374
625k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
625k
            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
625k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
625k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
625k
            if (column_ptr->is_exclusive()) {
386
228k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
397k
            } else {
388
397k
                shared_columns[i] = std::move(column_ptr);
389
397k
            }
390
625k
        }
391
392
132k
        scoped_mutable_block.restore();
393
758k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
625k
            if (shared_columns[i]) {
395
397k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
397k
            }
397
625k
        }
398
132k
    }
399
400
0
    origin_block->clear_column_data(
401
132k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
132k
    DCHECK_EQ(output_block->rows(), rows);
403
404
132k
    return Status::OK();
405
132k
}
406
407
4.33M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.33M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.33M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.33M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.33M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.33M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.33M
            if (_debug_point_count++ % 2 == 0) {
414
4.33M
                return Status::OK();
415
4.33M
            }
416
4.33M
        }
417
4.33M
    });
418
419
4.33M
    Status status;
420
4.33M
    auto* local_state = state->get_local_state(operator_id());
421
4.33M
    Defer defer([&]() {
422
4.33M
        if (status.ok()) {
423
4.33M
            local_state->update_output_block_counters(*block);
424
4.33M
        }
425
4.33M
    });
426
4.33M
    if (has_projection()) {
427
281k
        local_state->clear_origin_block();
428
281k
        status = get_block(state, &local_state->_origin_block, eos);
429
281k
        if (UNLIKELY(!status.ok())) {
430
25
            return status;
431
25
        }
432
281k
        status = do_projections(state, &local_state->_origin_block, block);
433
281k
        return status;
434
281k
    }
435
4.05M
    status = get_block(state, block, eos);
436
4.05M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.05M
    return status;
438
4.05M
}
439
440
2.88M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.88M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.65k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.65k
        *eos = true;
444
9.65k
    }
445
446
2.88M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.88M
        auto op_name = to_lower(_parent->_op_name);
448
2.88M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.88M
        arg_op_name = to_lower(arg_op_name);
450
451
2.88M
        if (op_name == arg_op_name) {
452
2.88M
            *eos = true;
453
2.88M
        }
454
2.88M
    });
455
456
2.88M
    if (auto rows = block->rows()) {
457
771k
        _num_rows_returned += rows;
458
771k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
771k
    }
460
2.88M
}
461
462
30.9k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
30.9k
    auto result = state->get_sink_local_state_result();
464
30.9k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
30.9k
    return result.value()->terminate(state);
468
30.9k
}
469
470
14.8k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
14.8k
    fmt::memory_buffer debug_string_buffer;
472
473
14.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
14.8k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
14.8k
    return fmt::to_string(debug_string_buffer);
476
14.8k
}
477
478
14.8k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
14.8k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
14.8k
}
481
482
354k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
354k
    std::string op_name = "UNKNOWN_SINK";
484
354k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
354k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
354k
        op_name = it->second;
488
354k
    }
489
354k
    _name = op_name + "_OPERATOR";
490
354k
    return Status::OK();
491
354k
}
492
493
303k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
303k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
303k
    _nereids_id = tnode.nereids_id;
496
303k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
303k
    _name = substr + "_SINK_OPERATOR";
498
303k
    return Status::OK();
499
303k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.83M
                                                            LocalSinkStateInfo& info) {
504
1.83M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.83M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.83M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.83M
    return Status::OK();
508
1.83M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
120k
                                                            LocalSinkStateInfo& info) {
504
120k
    auto local_state = LocalStateType::create_unique(this, state);
505
120k
    RETURN_IF_ERROR(local_state->init(state, info));
506
120k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
120k
    return Status::OK();
508
120k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
396k
                                                            LocalSinkStateInfo& info) {
504
396k
    auto local_state = LocalStateType::create_unique(this, state);
505
396k
    RETURN_IF_ERROR(local_state->init(state, info));
506
396k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
396k
    return Status::OK();
508
396k
}
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
381
                                                            LocalSinkStateInfo& info) {
504
381
    auto local_state = LocalStateType::create_unique(this, state);
505
381
    RETURN_IF_ERROR(local_state->init(state, info));
506
381
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
381
    return Status::OK();
508
381
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
48.0k
                                                            LocalSinkStateInfo& info) {
504
48.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
48.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
48.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
48.0k
    return Status::OK();
508
48.0k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
42
                                                            LocalSinkStateInfo& info) {
504
42
    auto local_state = LocalStateType::create_unique(this, state);
505
42
    RETURN_IF_ERROR(local_state->init(state, info));
506
42
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
42
    return Status::OK();
508
42
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_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
8.41k
                                                            LocalSinkStateInfo& info) {
504
8.41k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.41k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.41k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.41k
    return Status::OK();
508
8.41k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
15
                                                            LocalSinkStateInfo& info) {
504
15
    auto local_state = LocalStateType::create_unique(this, state);
505
15
    RETURN_IF_ERROR(local_state->init(state, info));
506
15
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
15
    return Status::OK();
508
15
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
235k
                                                            LocalSinkStateInfo& info) {
504
235k
    auto local_state = LocalStateType::create_unique(this, state);
505
235k
    RETURN_IF_ERROR(local_state->init(state, info));
506
235k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
235k
    return Status::OK();
508
235k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
28
                                                            LocalSinkStateInfo& info) {
504
28
    auto local_state = LocalStateType::create_unique(this, state);
505
28
    RETURN_IF_ERROR(local_state->init(state, info));
506
28
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
28
    return Status::OK();
508
28
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
269k
                                                            LocalSinkStateInfo& info) {
504
269k
    auto local_state = LocalStateType::create_unique(this, state);
505
269k
    RETURN_IF_ERROR(local_state->init(state, info));
506
269k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
269k
    return Status::OK();
508
269k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
98.9k
                                                            LocalSinkStateInfo& info) {
504
98.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
98.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
98.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
98.9k
    return Status::OK();
508
98.9k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
72.9k
                                                            LocalSinkStateInfo& info) {
504
72.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
72.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
72.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
72.9k
    return Status::OK();
508
72.9k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
182
                                                            LocalSinkStateInfo& info) {
504
182
    auto local_state = LocalStateType::create_unique(this, state);
505
182
    RETURN_IF_ERROR(local_state->init(state, info));
506
182
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
182
    return Status::OK();
508
182
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
546k
                                                            LocalSinkStateInfo& info) {
504
546k
    auto local_state = LocalStateType::create_unique(this, state);
505
546k
    RETURN_IF_ERROR(local_state->init(state, info));
506
546k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
546k
    return Status::OK();
508
546k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.24k
                                                            LocalSinkStateInfo& info) {
504
6.24k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.24k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.24k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.24k
    return Status::OK();
508
6.24k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
11.5k
                                                            LocalSinkStateInfo& info) {
504
11.5k
    auto local_state = LocalStateType::create_unique(this, state);
505
11.5k
    RETURN_IF_ERROR(local_state->init(state, info));
506
11.5k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
11.5k
    return Status::OK();
508
11.5k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.42k
                                                            LocalSinkStateInfo& info) {
504
2.42k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.42k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.42k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.42k
    return Status::OK();
508
2.42k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
254
                                                            LocalSinkStateInfo& info) {
504
254
    auto local_state = LocalStateType::create_unique(this, state);
505
254
    RETURN_IF_ERROR(local_state->init(state, info));
506
254
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
254
    return Status::OK();
508
254
}
_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.61k
                                                            LocalSinkStateInfo& info) {
504
2.61k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.61k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.61k
    return Status::OK();
508
2.61k
}
_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.54k
                                                            LocalSinkStateInfo& info) {
504
2.54k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.54k
    return Status::OK();
508
2.54k
}
_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
565
                                                            LocalSinkStateInfo& info) {
504
565
    auto local_state = LocalStateType::create_unique(this, state);
505
565
    RETURN_IF_ERROR(local_state->init(state, info));
506
565
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
565
    return Status::OK();
508
565
}
_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
107
                                                            LocalSinkStateInfo& info) {
504
107
    auto local_state = LocalStateType::create_unique(this, state);
505
107
    RETURN_IF_ERROR(local_state->init(state, info));
506
107
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
107
    return Status::OK();
508
107
}
_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.45M
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.45M
    } else {
519
1.45M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.45M
        ss->id = operator_id();
521
1.45M
        for (auto& dest : dests_id()) {
522
1.45M
            ss->related_op_ids.insert(dest);
523
1.45M
        }
524
1.45M
        return ss;
525
1.45M
    }
526
1.45M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
105k
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
105k
    } else {
519
105k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
105k
        ss->id = operator_id();
521
105k
        for (auto& dest : dests_id()) {
522
105k
            ss->related_op_ids.insert(dest);
523
105k
        }
524
105k
        return ss;
525
105k
    }
526
105k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
397k
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
397k
    } else {
519
397k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
397k
        ss->id = operator_id();
521
397k
        for (auto& dest : dests_id()) {
522
395k
            ss->related_op_ids.insert(dest);
523
395k
        }
524
397k
        return ss;
525
397k
    }
526
397k
}
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
385
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
385
    } else {
519
385
        auto ss = LocalStateType::SharedStateType::create_shared();
520
385
        ss->id = operator_id();
521
385
        for (auto& dest : dests_id()) {
522
385
            ss->related_op_ids.insert(dest);
523
385
        }
524
385
        return ss;
525
385
    }
526
385
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
48.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
48.1k
    } else {
519
48.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
48.1k
        ss->id = operator_id();
521
48.1k
        for (auto& dest : dests_id()) {
522
48.0k
            ss->related_op_ids.insert(dest);
523
48.0k
        }
524
48.1k
        return ss;
525
48.1k
    }
526
48.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
42
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
42
    } else {
519
42
        auto ss = LocalStateType::SharedStateType::create_shared();
520
42
        ss->id = operator_id();
521
42
        for (auto& dest : dests_id()) {
522
42
            ss->related_op_ids.insert(dest);
523
42
        }
524
42
        return ss;
525
42
    }
526
42
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8.45k
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
8.45k
    } else {
519
8.45k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.45k
        ss->id = operator_id();
521
8.45k
        for (auto& dest : dests_id()) {
522
8.45k
            ss->related_op_ids.insert(dest);
523
8.45k
        }
524
8.45k
        return ss;
525
8.45k
    }
526
8.45k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
19
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
19
    } else {
519
19
        auto ss = LocalStateType::SharedStateType::create_shared();
520
19
        ss->id = operator_id();
521
20
        for (auto& dest : dests_id()) {
522
20
            ss->related_op_ids.insert(dest);
523
20
        }
524
19
        return ss;
525
19
    }
526
19
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
236k
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
236k
    } else {
519
236k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
236k
        ss->id = operator_id();
521
236k
        for (auto& dest : dests_id()) {
522
236k
            ss->related_op_ids.insert(dest);
523
236k
        }
524
236k
        return ss;
525
236k
    }
526
236k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
30
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
30
    } else {
519
30
        auto ss = LocalStateType::SharedStateType::create_shared();
520
30
        ss->id = operator_id();
521
30
        for (auto& dest : dests_id()) {
522
30
            ss->related_op_ids.insert(dest);
523
30
        }
524
30
        return ss;
525
30
    }
526
30
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
99.2k
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.2k
    } else {
519
99.2k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
99.2k
        ss->id = operator_id();
521
99.3k
        for (auto& dest : dests_id()) {
522
99.3k
            ss->related_op_ids.insert(dest);
523
99.3k
        }
524
99.2k
        return ss;
525
99.2k
    }
526
99.2k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
181
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
181
    } else {
519
181
        auto ss = LocalStateType::SharedStateType::create_shared();
520
181
        ss->id = operator_id();
521
181
        for (auto& dest : dests_id()) {
522
181
            ss->related_op_ids.insert(dest);
523
181
        }
524
181
        return ss;
525
181
    }
526
181
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
549k
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
549k
    } else {
519
549k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
549k
        ss->id = operator_id();
521
549k
        for (auto& dest : dests_id()) {
522
544k
            ss->related_op_ids.insert(dest);
523
544k
        }
524
549k
        return ss;
525
549k
    }
526
549k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.25k
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
6.25k
    } else {
519
6.25k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.25k
        ss->id = operator_id();
521
6.25k
        for (auto& dest : dests_id()) {
522
6.24k
            ss->related_op_ids.insert(dest);
523
6.24k
        }
524
6.25k
        return ss;
525
6.25k
    }
526
6.25k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
356
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
356
    } else {
519
356
        auto ss = LocalStateType::SharedStateType::create_shared();
520
356
        ss->id = operator_id();
521
356
        for (auto& dest : dests_id()) {
522
356
            ss->related_op_ids.insert(dest);
523
356
        }
524
356
        return ss;
525
356
    }
526
356
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.65k
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.65k
    } else {
519
2.65k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.65k
        ss->id = operator_id();
521
2.68k
        for (auto& dest : dests_id()) {
522
2.68k
            ss->related_op_ids.insert(dest);
523
2.68k
        }
524
2.65k
        return ss;
525
2.65k
    }
526
2.65k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.55k
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.55k
    } else {
519
2.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.55k
        ss->id = operator_id();
521
2.56k
        for (auto& dest : dests_id()) {
522
2.56k
            ss->related_op_ids.insert(dest);
523
2.56k
        }
524
2.55k
        return ss;
525
2.55k
    }
526
2.55k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
566
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
566
    } else {
519
566
        auto ss = LocalStateType::SharedStateType::create_shared();
520
566
        ss->id = operator_id();
521
566
        for (auto& dest : dests_id()) {
522
553
            ss->related_op_ids.insert(dest);
523
553
        }
524
566
        return ss;
525
566
    }
526
566
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
107
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
107
    } else {
519
107
        auto ss = LocalStateType::SharedStateType::create_shared();
520
107
        ss->id = operator_id();
521
107
        for (auto& dest : dests_id()) {
522
107
            ss->related_op_ids.insert(dest);
523
107
        }
524
107
        return ss;
525
107
    }
526
107
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.18M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.18M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.18M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.18M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.18M
    return Status::OK();
534
2.18M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
71.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
71.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
71.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
71.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
71.9k
    return Status::OK();
534
71.9k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
248k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
248k
    auto local_state = LocalStateType::create_unique(state, this);
531
248k
    RETURN_IF_ERROR(local_state->init(state, info));
532
248k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
248k
    return Status::OK();
534
248k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
129
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
129
    auto local_state = LocalStateType::create_unique(state, this);
531
129
    RETURN_IF_ERROR(local_state->init(state, info));
532
129
    state->emplace_local_state(operator_id(), std::move(local_state));
533
129
    return Status::OK();
534
129
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.21k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.21k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.21k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.21k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.21k
    return Status::OK();
534
3.21k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.42k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.42k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.42k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.42k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.42k
    return Status::OK();
534
8.42k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.65k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.65k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.65k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.65k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.65k
    return Status::OK();
534
7.65k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
21
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
21
    auto local_state = LocalStateType::create_unique(state, this);
531
21
    RETURN_IF_ERROR(local_state->init(state, info));
532
21
    state->emplace_local_state(operator_id(), std::move(local_state));
533
21
    return Status::OK();
534
21
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
226k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
226k
    auto local_state = LocalStateType::create_unique(state, this);
531
226k
    RETURN_IF_ERROR(local_state->init(state, info));
532
226k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
226k
    return Status::OK();
534
226k
}
_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
73.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
73.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
73.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
73.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
73.4k
    return Status::OK();
534
73.4k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
172
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
172
    auto local_state = LocalStateType::create_unique(state, this);
531
172
    RETURN_IF_ERROR(local_state->init(state, info));
532
172
    state->emplace_local_state(operator_id(), std::move(local_state));
533
172
    return Status::OK();
534
172
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.61k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.61k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.61k
    return Status::OK();
534
4.61k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
298k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
298k
    auto local_state = LocalStateType::create_unique(state, this);
531
298k
    RETURN_IF_ERROR(local_state->init(state, info));
532
298k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
298k
    return Status::OK();
534
298k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.32k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.32k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.32k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.32k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.32k
    return Status::OK();
534
1.32k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.16k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.16k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.16k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.16k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.16k
    return Status::OK();
534
6.16k
}
_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.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.54k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.54k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.54k
    return Status::OK();
534
1.54k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.3k
    return Status::OK();
534
56.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.15k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.15k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.15k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.15k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.15k
    return Status::OK();
534
6.15k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
254
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
254
    auto local_state = LocalStateType::create_unique(state, this);
531
254
    RETURN_IF_ERROR(local_state->init(state, info));
532
254
    state->emplace_local_state(operator_id(), std::move(local_state));
533
254
    return Status::OK();
534
254
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.63k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.63k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.63k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.63k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.63k
    return Status::OK();
534
2.63k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.53k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.53k
    return Status::OK();
534
2.53k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
415
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
415
    auto local_state = LocalStateType::create_unique(state, this);
531
415
    RETURN_IF_ERROR(local_state->init(state, info));
532
415
    state->emplace_local_state(operator_id(), std::move(local_state));
533
415
    return Status::OK();
534
415
}
_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.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.4k
    return Status::OK();
534
10.4k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
712k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
712k
    auto local_state = LocalStateType::create_unique(state, this);
531
712k
    RETURN_IF_ERROR(local_state->init(state, info));
532
712k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
712k
    return Status::OK();
534
712k
}
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
796
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
796
    auto local_state = LocalStateType::create_unique(state, this);
531
796
    RETURN_IF_ERROR(local_state->init(state, info));
532
796
    state->emplace_local_state(operator_id(), std::move(local_state));
533
796
    return Status::OK();
534
796
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.14k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.14k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.14k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.14k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.14k
    return Status::OK();
534
1.14k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.27k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.27k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.27k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.27k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.27k
    return Status::OK();
534
7.27k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
327k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
327k
    auto local_state = LocalStateType::create_unique(state, this);
531
327k
    RETURN_IF_ERROR(local_state->init(state, info));
532
327k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
327k
    return Status::OK();
534
327k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.82M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.17M
        : _num_rows_returned(0),
542
2.17M
          _rows_returned_counter(nullptr),
543
2.17M
          _parent(parent),
544
2.17M
          _state(state),
545
2.17M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.18M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.18M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.18M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.18M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.18M
    _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.18M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.18M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.18M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.18M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.18M
    if constexpr (!is_fake_shared) {
560
1.27M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
792k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
792k
                                    .first.get()
563
792k
                                    ->template cast<SharedStateArg>();
564
565
792k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
792k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
792k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
792k
        } else if (info.shared_state) {
569
412k
            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
412k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
412k
            _dependency = _shared_state->create_source_dependency(
576
412k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
412k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
412k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
412k
        } else {
580
73.4k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
10.2k
                DCHECK(false);
582
10.2k
            }
583
73.4k
        }
584
1.27M
    }
585
586
2.18M
    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.18M
    _rows_returned_counter =
591
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.18M
    _blocks_returned_counter =
593
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.18M
    _output_block_bytes_counter =
595
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.18M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.18M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.18M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.18M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.18M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.18M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.18M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.18M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.18M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.18M
    _memory_used_counter =
606
2.18M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.18M
    _common_profile->add_info_string("IsColocate",
608
2.18M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.18M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.18M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.18M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.18M
    return Status::OK();
613
2.18M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
71.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
71.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
71.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
71.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
71.9k
    _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
71.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
71.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
71.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
71.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
71.9k
    if constexpr (!is_fake_shared) {
560
71.9k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
14.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
14.2k
                                    .first.get()
563
14.2k
                                    ->template cast<SharedStateArg>();
564
565
14.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
14.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
14.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
57.6k
        } 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
57.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
57.0k
            _dependency = _shared_state->create_source_dependency(
576
57.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
57.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
57.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
57.0k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
638
        }
584
71.9k
    }
585
586
71.9k
    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
71.9k
    _rows_returned_counter =
591
71.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
71.9k
    _blocks_returned_counter =
593
71.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
71.9k
    _output_block_bytes_counter =
595
71.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
71.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
71.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
71.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
71.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
71.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
71.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
71.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
71.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
71.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
71.9k
    _memory_used_counter =
606
71.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
71.9k
    _common_profile->add_info_string("IsColocate",
608
71.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
71.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
71.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
71.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
71.9k
    return Status::OK();
613
71.9k
}
_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
235k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
235k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
235k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
235k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
235k
    _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
235k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
235k
    _operator_profile->add_child(_common_profile.get(), true);
557
235k
    _operator_profile->add_child(_custom_profile.get(), true);
558
235k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
235k
    if constexpr (!is_fake_shared) {
560
235k
        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
235k
        } 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
226k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
226k
            _dependency = _shared_state->create_source_dependency(
576
226k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
226k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
226k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
226k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
9.02k
        }
584
235k
    }
585
586
235k
    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
235k
    _rows_returned_counter =
591
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
235k
    _blocks_returned_counter =
593
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
235k
    _output_block_bytes_counter =
595
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
235k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
235k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
235k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
235k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
235k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
235k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
235k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
235k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
235k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
235k
    _memory_used_counter =
606
235k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
235k
    _common_profile->add_info_string("IsColocate",
608
235k
                                     std::to_string(_parent->is_colocated_operator()));
609
235k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
235k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
235k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
235k
    return Status::OK();
613
235k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
21
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
21
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
21
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
21
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
21
    _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
21
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
21
    _operator_profile->add_child(_common_profile.get(), true);
557
21
    _operator_profile->add_child(_custom_profile.get(), true);
558
21
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
21
    if constexpr (!is_fake_shared) {
560
21
        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
21
        } 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
21
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
21
            _dependency = _shared_state->create_source_dependency(
576
21
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
21
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
21
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
21
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
21
    }
585
586
21
    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
21
    _rows_returned_counter =
591
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
21
    _blocks_returned_counter =
593
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
21
    _output_block_bytes_counter =
595
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
21
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
21
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
21
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
21
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
21
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
21
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
21
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
21
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
21
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
21
    _memory_used_counter =
606
21
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
21
    _common_profile->add_info_string("IsColocate",
608
21
                                     std::to_string(_parent->is_colocated_operator()));
609
21
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
21
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
21
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
21
    return Status::OK();
613
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.19k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.19k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.19k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.19k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.19k
    _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
6.19k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.19k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.19k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.19k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.19k
    if constexpr (!is_fake_shared) {
560
6.19k
        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
6.19k
        } 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
6.05k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.05k
            _dependency = _shared_state->create_source_dependency(
576
6.05k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.05k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.05k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.05k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
136
        }
584
6.19k
    }
585
586
6.19k
    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
6.19k
    _rows_returned_counter =
591
6.19k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.19k
    _blocks_returned_counter =
593
6.19k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.19k
    _output_block_bytes_counter =
595
6.19k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.19k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.19k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.19k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.19k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.19k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.19k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.19k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.19k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.19k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.19k
    _memory_used_counter =
606
6.19k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.19k
    _common_profile->add_info_string("IsColocate",
608
6.19k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.19k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.19k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.19k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.19k
    return Status::OK();
613
6.19k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.45k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.45k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.45k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.45k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.45k
    _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
8.45k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.45k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.45k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.45k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.45k
    if constexpr (!is_fake_shared) {
560
8.45k
        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
8.45k
        } 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
8.41k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.41k
            _dependency = _shared_state->create_source_dependency(
576
8.41k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.41k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.41k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.41k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
42
        }
584
8.45k
    }
585
586
8.45k
    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
8.45k
    _rows_returned_counter =
591
8.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.45k
    _blocks_returned_counter =
593
8.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.45k
    _output_block_bytes_counter =
595
8.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.45k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.45k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.45k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.45k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.45k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.45k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.45k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.45k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.45k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.45k
    _memory_used_counter =
606
8.45k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.45k
    _common_profile->add_info_string("IsColocate",
608
8.45k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.45k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.45k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.45k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.45k
    return Status::OK();
613
8.45k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
99.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
99.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
99.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
99.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
99.1k
    _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.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
99.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
99.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
99.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
99.1k
    if constexpr (!is_fake_shared) {
560
99.1k
        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.1k
        } 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.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
97.2k
            _dependency = _shared_state->create_source_dependency(
576
97.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
97.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
97.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
97.2k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.89k
        }
584
99.1k
    }
585
586
99.1k
    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.1k
    _rows_returned_counter =
591
99.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
99.1k
    _blocks_returned_counter =
593
99.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
99.1k
    _output_block_bytes_counter =
595
99.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
99.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
99.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
99.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
99.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
99.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
99.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
99.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
99.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
99.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
99.1k
    _memory_used_counter =
606
99.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
99.1k
    _common_profile->add_info_string("IsColocate",
608
99.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
99.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
99.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
99.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
99.1k
    return Status::OK();
613
99.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
73.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
73.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
73.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
73.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
73.3k
    _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
73.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
73.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
73.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
73.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
73.3k
    if constexpr (!is_fake_shared) {
560
73.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
73.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
73.3k
                                    .first.get()
563
73.3k
                                    ->template cast<SharedStateArg>();
564
565
73.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
73.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
73.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
73.3k
        } 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
41
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
41
        }
584
73.3k
    }
585
586
73.3k
    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
73.3k
    _rows_returned_counter =
591
73.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
73.3k
    _blocks_returned_counter =
593
73.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
73.3k
    _output_block_bytes_counter =
595
73.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
73.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
73.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
73.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
73.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
73.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
73.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
73.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
73.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
73.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
73.3k
    _memory_used_counter =
606
73.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
73.3k
    _common_profile->add_info_string("IsColocate",
608
73.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
73.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
73.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
73.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
73.3k
    return Status::OK();
613
73.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
172
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
172
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
172
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
172
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
172
    _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
172
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
172
    _operator_profile->add_child(_common_profile.get(), true);
557
172
    _operator_profile->add_child(_custom_profile.get(), true);
558
172
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
172
    if constexpr (!is_fake_shared) {
560
172
        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
172
        } 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
172
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
172
            _dependency = _shared_state->create_source_dependency(
576
172
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
172
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
172
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
172
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
172
    }
585
586
172
    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
172
    _rows_returned_counter =
591
172
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
172
    _blocks_returned_counter =
593
172
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
172
    _output_block_bytes_counter =
595
172
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
172
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
172
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
172
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
172
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
172
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
172
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
172
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
172
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
172
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
172
    _memory_used_counter =
606
172
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
172
    _common_profile->add_info_string("IsColocate",
608
172
                                     std::to_string(_parent->is_colocated_operator()));
609
172
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
172
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
172
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
172
    return Status::OK();
613
172
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
907k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
907k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
907k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
907k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
907k
    _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
907k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
907k
    _operator_profile->add_child(_common_profile.get(), true);
557
907k
    _operator_profile->add_child(_custom_profile.get(), true);
558
907k
    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
907k
    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
907k
    _rows_returned_counter =
591
907k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
907k
    _blocks_returned_counter =
593
907k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
907k
    _output_block_bytes_counter =
595
907k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
907k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
907k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
907k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
907k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
907k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
907k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
907k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
907k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
907k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
907k
    _memory_used_counter =
606
907k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
907k
    _common_profile->add_info_string("IsColocate",
608
907k
                                     std::to_string(_parent->is_colocated_operator()));
609
907k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
907k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
907k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
907k
    return Status::OK();
613
907k
}
_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
5.12k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.12k
            _dependency = _shared_state->create_source_dependency(
576
5.12k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.12k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.12k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.1k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.1k
        }
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
6.15k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.15k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.15k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.15k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.15k
    _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
6.15k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.15k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.15k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.15k
    if constexpr (!is_fake_shared) {
560
6.15k
        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
6.15k
        } 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
6.11k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.11k
            _dependency = _shared_state->create_source_dependency(
576
6.11k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.11k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.11k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.11k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
49
        }
584
6.15k
    }
585
586
6.15k
    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
6.15k
    _rows_returned_counter =
591
6.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.15k
    _blocks_returned_counter =
593
6.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.15k
    _output_block_bytes_counter =
595
6.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.15k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.15k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.15k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.15k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.15k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.15k
    _memory_used_counter =
606
6.15k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.15k
    _common_profile->add_info_string("IsColocate",
608
6.15k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.15k
    return Status::OK();
613
6.15k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
356
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
356
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
356
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
356
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
356
    _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
356
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
356
    _operator_profile->add_child(_common_profile.get(), true);
557
356
    _operator_profile->add_child(_custom_profile.get(), true);
558
356
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
356
    if constexpr (!is_fake_shared) {
560
356
        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
356
        } 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
356
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
356
            _dependency = _shared_state->create_source_dependency(
576
356
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
356
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
356
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
356
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
356
    }
585
586
356
    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
356
    _rows_returned_counter =
591
356
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
356
    _blocks_returned_counter =
593
356
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
356
    _output_block_bytes_counter =
595
356
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
356
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
356
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
356
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
356
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
356
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
356
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
356
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
356
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
356
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
356
    _memory_used_counter =
606
356
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
356
    _common_profile->add_info_string("IsColocate",
608
356
                                     std::to_string(_parent->is_colocated_operator()));
609
356
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
356
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
356
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
356
    return Status::OK();
613
356
}
_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.04k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.04k
            _dependency = _shared_state->create_source_dependency(
576
5.04k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.04k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.04k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.04k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
192
        }
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
715k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
715k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
715k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
715k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
715k
    _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
715k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
715k
    _operator_profile->add_child(_common_profile.get(), true);
557
715k
    _operator_profile->add_child(_custom_profile.get(), true);
558
715k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
715k
    if constexpr (!is_fake_shared) {
560
715k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
705k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
705k
                                    .first.get()
563
705k
                                    ->template cast<SharedStateArg>();
564
565
705k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
705k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
705k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
705k
        } 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
10.2k
        } else {
580
10.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
10.2k
                DCHECK(false);
582
10.2k
            }
583
10.2k
        }
584
715k
    }
585
586
715k
    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
715k
    _rows_returned_counter =
591
715k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
715k
    _blocks_returned_counter =
593
715k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
715k
    _output_block_bytes_counter =
595
715k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
715k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
715k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
715k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
715k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
715k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
715k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
715k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
715k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
715k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
715k
    _memory_used_counter =
606
715k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
715k
    _common_profile->add_info_string("IsColocate",
608
715k
                                     std::to_string(_parent->is_colocated_operator()));
609
715k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
715k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
715k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
715k
    return Status::OK();
613
715k
}
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.19M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.19M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.50M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
306k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
306k
    }
621
2.19M
    if (_parent->has_projection()) {
622
391k
        const auto& projection = *_parent->_projection;
623
391k
        _projections.resize(projection.projections.size());
624
2.42M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.02M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.02M
        }
627
391k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
407k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
16.6k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
189k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
172k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
172k
                        state, _intermediate_projections[i][j]));
633
172k
            }
634
16.6k
        }
635
391k
    }
636
2.19M
    return Status::OK();
637
2.19M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
72.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
72.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
74.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.33k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.33k
    }
621
72.7k
    if (_parent->has_projection()) {
622
72.7k
        const auto& projection = *_parent->_projection;
623
72.7k
        _projections.resize(projection.projections.size());
624
389k
        for (size_t i = 0; i < _projections.size(); i++) {
625
316k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
316k
        }
627
72.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
78.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
5.68k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
121k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
115k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
115k
                        state, _intermediate_projections[i][j]));
633
115k
            }
634
5.68k
        }
635
72.7k
    }
636
72.7k
    return Status::OK();
637
72.7k
}
_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
237k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
237k
    _conjuncts.resize(_parent->_conjuncts.size());
618
237k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
237k
    if (_parent->has_projection()) {
622
80
        const auto& projection = *_parent->_projection;
623
80
        _projections.resize(projection.projections.size());
624
402
        for (size_t i = 0; i < _projections.size(); i++) {
625
322
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
322
        }
627
80
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80
        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
80
    }
636
237k
    return Status::OK();
637
237k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
21
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
21
    _conjuncts.resize(_parent->_conjuncts.size());
618
21
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
21
    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
21
    return Status::OK();
637
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.27k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.27k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.31k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
37
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
37
    }
621
6.28k
    if (_parent->has_projection()) {
622
6.28k
        const auto& projection = *_parent->_projection;
623
6.28k
        _projections.resize(projection.projections.size());
624
29.5k
        for (size_t i = 0; i < _projections.size(); i++) {
625
23.2k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
23.2k
        }
627
6.28k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.29k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
15
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
136
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
121
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
121
                        state, _intermediate_projections[i][j]));
633
121
            }
634
15
        }
635
6.28k
    }
636
6.27k
    return Status::OK();
637
6.27k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.46k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.46k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.13k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
672
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
672
    }
621
8.46k
    if (_parent->has_projection()) {
622
4.49k
        const auto& projection = *_parent->_projection;
623
4.49k
        _projections.resize(projection.projections.size());
624
18.7k
        for (size_t i = 0; i < _projections.size(); i++) {
625
14.2k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
14.2k
        }
627
4.49k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.61k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
113
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
867
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
754
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
754
                        state, _intermediate_projections[i][j]));
633
754
            }
634
113
        }
635
4.49k
    }
636
8.46k
    return Status::OK();
637
8.46k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
99.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
99.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
101k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.64k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.64k
    }
621
99.5k
    if (_parent->has_projection()) {
622
31.6k
        const auto& projection = *_parent->_projection;
623
31.6k
        _projections.resize(projection.projections.size());
624
284k
        for (size_t i = 0; i < _projections.size(); i++) {
625
252k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
252k
        }
627
31.6k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
31.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
172
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.14k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
975
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
975
                        state, _intermediate_projections[i][j]));
633
975
            }
634
172
        }
635
31.6k
    }
636
99.5k
    return Status::OK();
637
99.5k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
73.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
73.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
73.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
17
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
17
    }
621
73.4k
    if (_parent->has_projection()) {
622
140
        const auto& projection = *_parent->_projection;
623
140
        _projections.resize(projection.projections.size());
624
620
        for (size_t i = 0; i < _projections.size(); i++) {
625
480
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
480
        }
627
140
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
140
        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
140
    }
636
73.4k
    return Status::OK();
637
73.4k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
176
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
176
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
176
    if (_parent->has_projection()) {
622
158
        const auto& projection = *_parent->_projection;
623
158
        _projections.resize(projection.projections.size());
624
474
        for (size_t i = 0; i < _projections.size(); i++) {
625
316
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
316
        }
627
158
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
158
        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
158
    }
636
176
    return Status::OK();
637
176
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
912k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
912k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.21M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
302k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
302k
    }
621
912k
    if (_parent->has_projection()) {
622
263k
        const auto& projection = *_parent->_projection;
623
263k
        _projections.resize(projection.projections.size());
624
1.58M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.31M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.31M
        }
627
263k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
273k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.5k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
61.7k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
51.2k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
51.2k
                        state, _intermediate_projections[i][j]));
633
51.2k
            }
634
10.5k
        }
635
263k
    }
636
912k
    return Status::OK();
637
912k
}
_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.8k
        const auto& projection = *_parent->_projection;
623
11.8k
        _projections.resize(projection.projections.size());
624
112k
        for (size_t i = 0; i < _projections.size(); i++) {
625
101k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
101k
        }
627
11.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
179
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3.90k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.72k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.72k
                        state, _intermediate_projections[i][j]));
633
3.72k
            }
634
179
        }
635
11.8k
    }
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
6.16k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.16k
    _conjuncts.resize(_parent->_conjuncts.size());
618
7.32k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.15k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.15k
    }
621
6.16k
    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
6.16k
    return Status::OK();
637
6.16k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
356
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
356
    _conjuncts.resize(_parent->_conjuncts.size());
618
356
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
356
    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
356
    return Status::OK();
637
356
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.30k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.30k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.30k
    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.30k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
228
        for (size_t i = 0; i < _projections.size(); i++) {
625
168
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
168
        }
627
60
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
60
        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
60
    }
636
5.30k
    return Status::OK();
637
5.30k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
720k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
720k
    _conjuncts.resize(_parent->_conjuncts.size());
618
720k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
720k
    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
720k
    return Status::OK();
637
720k
}
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
7.76k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.76k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.76k
    _terminated = true;
645
7.76k
    return Status::OK();
646
7.76k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
320
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
320
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
320
    _terminated = true;
645
320
    return Status::OK();
646
320
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
17
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
17
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
17
    _terminated = true;
645
17
    return Status::OK();
646
17
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
26
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
26
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
26
    _terminated = true;
645
26
    return Status::OK();
646
26
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
153
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
153
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
153
    _terminated = true;
645
153
    return Status::OK();
646
153
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.03k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.03k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.03k
    _terminated = true;
645
6.03k
    return Status::OK();
646
6.03k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
13
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
13
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
13
    _terminated = true;
645
13
    return Status::OK();
646
13
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
166
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
166
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
166
    _terminated = true;
645
166
    return Status::OK();
646
166
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
989
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
989
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
989
    _terminated = true;
645
989
    return Status::OK();
646
989
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
38
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
38
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
38
    _terminated = true;
645
38
    return Status::OK();
646
38
}
647
648
template <typename SharedStateArg>
649
2.46M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.46M
    if (_closed) {
651
266k
        return Status::OK();
652
266k
    }
653
2.19M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.28M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.28M
    }
656
2.19M
    _closed = true;
657
2.19M
    return Status::OK();
658
2.46M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
72.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
72.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
72.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
72.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
72.6k
    }
656
72.6k
    _closed = true;
657
72.6k
    return Status::OK();
658
72.6k
}
_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
469k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
469k
    if (_closed) {
651
235k
        return Status::OK();
652
235k
    }
653
234k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
234k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
234k
    }
656
234k
    _closed = true;
657
234k
    return Status::OK();
658
469k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
21
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
21
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
21
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
21
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
21
    }
656
21
    _closed = true;
657
21
    return Status::OK();
658
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.27k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.27k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.27k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.27k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.27k
    }
656
6.27k
    _closed = true;
657
6.27k
    return Status::OK();
658
6.27k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
17.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
17.0k
    if (_closed) {
651
8.64k
        return Status::OK();
652
8.64k
    }
653
8.43k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.43k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.43k
    }
656
8.43k
    _closed = true;
657
8.43k
    return Status::OK();
658
17.0k
}
_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
73.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
73.0k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
73.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
73.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
73.0k
    }
656
73.0k
    _closed = true;
657
73.0k
    return Status::OK();
658
73.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
171
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
171
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
171
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
171
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
171
    }
656
171
    _closed = true;
657
171
    return Status::OK();
658
171
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
928k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
928k
    if (_closed) {
651
15.9k
        return Status::OK();
652
15.9k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
912k
    _closed = true;
657
912k
    return Status::OK();
658
928k
}
_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
6.13k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.13k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.13k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.13k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.13k
    }
656
6.13k
    _closed = true;
657
6.13k
    return Status::OK();
658
6.13k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
507
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
507
    if (_closed) {
651
253
        return Status::OK();
652
253
    }
653
254
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
254
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
254
    }
656
254
    _closed = true;
657
254
    return Status::OK();
658
507
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.7k
    if (_closed) {
651
5.44k
        return Status::OK();
652
5.44k
    }
653
5.29k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.29k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.29k
    }
656
5.29k
    _closed = true;
657
5.29k
    return Status::OK();
658
10.7k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
722k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
722k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
722k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
722k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
722k
    }
656
722k
    _closed = true;
657
722k
    return Status::OK();
658
722k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
334
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
334
    if (_closed) {
651
174
        return Status::OK();
652
174
    }
653
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160
    }
656
160
    _closed = true;
657
160
    return Status::OK();
658
334
}
659
660
template <typename SharedState>
661
1.83M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.83M
    _operator_profile =
664
1.83M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.83M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.83M
    _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.83M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.83M
    _operator_profile->add_child(_common_profile, true);
673
1.83M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.83M
    _operator_profile->set_metadata(_parent->node_id());
676
1.83M
    _wait_for_finish_dependency_timer =
677
1.83M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.83M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.83M
    if constexpr (!is_fake_shared) {
680
1.28M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.28M
            info.shared_state_map.end()) {
682
358k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
270k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
270k
            }
685
358k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
358k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
358k
                                                  ? 0
688
358k
                                                  : info.task_idx]
689
358k
                                  .get();
690
358k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
929k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
929k
            _shared_state = info.shared_state->template cast<SharedState>();
696
929k
            _dependency = _shared_state->create_sink_dependency(
697
929k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
929k
        }
699
1.28M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.28M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.28M
    }
702
703
1.83M
    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.83M
    _rows_input_counter =
708
1.83M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.83M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.83M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.83M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.83M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.83M
    _memory_used_counter =
714
1.83M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.83M
    _common_profile->add_info_string("IsColocate",
716
1.83M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.83M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.83M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.83M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.83M
    return Status::OK();
721
1.83M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
120k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
120k
    _operator_profile =
664
120k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
120k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
120k
    _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
120k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
120k
    _operator_profile->add_child(_common_profile, true);
673
120k
    _operator_profile->add_child(_custom_profile, true);
674
675
120k
    _operator_profile->set_metadata(_parent->node_id());
676
120k
    _wait_for_finish_dependency_timer =
677
120k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
120k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
120k
    if constexpr (!is_fake_shared) {
680
120k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
120k
            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
14.8k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
14.8k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
14.8k
                                                  ? 0
688
14.8k
                                                  : info.task_idx]
689
14.8k
                                  .get();
690
14.8k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
105k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
105k
            _shared_state = info.shared_state->template cast<SharedState>();
696
105k
            _dependency = _shared_state->create_sink_dependency(
697
105k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
105k
        }
699
120k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
120k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
120k
    }
702
703
120k
    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
120k
    _rows_input_counter =
708
120k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
120k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
120k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
120k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
120k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
120k
    _memory_used_counter =
714
120k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
120k
    _common_profile->add_info_string("IsColocate",
716
120k
                                     std::to_string(_parent->is_colocated_operator()));
717
120k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
120k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
120k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
120k
    return Status::OK();
721
120k
}
_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
235k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
235k
    _operator_profile =
664
235k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
235k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
235k
    _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
235k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
235k
    _operator_profile->add_child(_common_profile, true);
673
235k
    _operator_profile->add_child(_custom_profile, true);
674
675
235k
    _operator_profile->set_metadata(_parent->node_id());
676
235k
    _wait_for_finish_dependency_timer =
677
235k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
235k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
235k
    if constexpr (!is_fake_shared) {
680
235k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
235k
            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
235k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
235k
            _shared_state = info.shared_state->template cast<SharedState>();
696
235k
            _dependency = _shared_state->create_sink_dependency(
697
235k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
235k
        }
699
235k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
235k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
235k
    }
702
703
235k
    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
235k
    _rows_input_counter =
708
235k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
235k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
235k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
235k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
235k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
235k
    _memory_used_counter =
714
235k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
235k
    _common_profile->add_info_string("IsColocate",
716
235k
                                     std::to_string(_parent->is_colocated_operator()));
717
235k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
235k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
235k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
235k
    return Status::OK();
721
235k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
28
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
28
    _operator_profile =
664
28
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
28
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
28
    _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
28
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
28
    _operator_profile->add_child(_common_profile, true);
673
28
    _operator_profile->add_child(_custom_profile, true);
674
675
28
    _operator_profile->set_metadata(_parent->node_id());
676
28
    _wait_for_finish_dependency_timer =
677
28
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
28
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
28
    if constexpr (!is_fake_shared) {
680
28
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
28
            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
28
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
28
            _shared_state = info.shared_state->template cast<SharedState>();
696
28
            _dependency = _shared_state->create_sink_dependency(
697
28
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
28
        }
699
28
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
28
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
28
    }
702
703
28
    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
28
    _rows_input_counter =
708
28
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
28
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
28
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
28
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
28
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
28
    _memory_used_counter =
714
28
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
28
    _common_profile->add_info_string("IsColocate",
716
28
                                     std::to_string(_parent->is_colocated_operator()));
717
28
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
28
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
28
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
28
    return Status::OK();
721
28
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.24k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.24k
    _operator_profile =
664
6.24k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.24k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.24k
    _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
6.24k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.24k
    _operator_profile->add_child(_common_profile, true);
673
6.24k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.24k
    _operator_profile->set_metadata(_parent->node_id());
676
6.24k
    _wait_for_finish_dependency_timer =
677
6.24k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.24k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.24k
    if constexpr (!is_fake_shared) {
680
6.24k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.24k
            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
6.24k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.24k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.24k
            _dependency = _shared_state->create_sink_dependency(
697
6.24k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.24k
        }
699
6.24k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.24k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.24k
    }
702
703
6.24k
    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
6.24k
    _rows_input_counter =
708
6.24k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.24k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.24k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.24k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.24k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.24k
    _memory_used_counter =
714
6.24k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.24k
    _common_profile->add_info_string("IsColocate",
716
6.24k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.24k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.24k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.24k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.24k
    return Status::OK();
721
6.24k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.44k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.44k
    _operator_profile =
664
8.44k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.44k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.44k
    _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
8.44k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.44k
    _operator_profile->add_child(_common_profile, true);
673
8.44k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.44k
    _operator_profile->set_metadata(_parent->node_id());
676
8.44k
    _wait_for_finish_dependency_timer =
677
8.44k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.44k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.44k
    if constexpr (!is_fake_shared) {
680
8.44k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.44k
            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
8.44k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.44k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.44k
            _dependency = _shared_state->create_sink_dependency(
697
8.44k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.44k
        }
699
8.44k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.44k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.44k
    }
702
703
8.44k
    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
8.44k
    _rows_input_counter =
708
8.44k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.44k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.44k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.44k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.44k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.44k
    _memory_used_counter =
714
8.44k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.44k
    _common_profile->add_info_string("IsColocate",
716
8.44k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.44k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.44k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.44k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.44k
    return Status::OK();
721
8.44k
}
_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
73.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
73.2k
    _operator_profile =
664
73.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
73.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
73.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
73.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
73.2k
    _operator_profile->add_child(_common_profile, true);
673
73.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
73.2k
    _operator_profile->set_metadata(_parent->node_id());
676
73.2k
    _wait_for_finish_dependency_timer =
677
73.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
73.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
73.2k
    if constexpr (!is_fake_shared) {
680
73.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
73.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
73.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
73.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
73.2k
                                                  ? 0
688
73.2k
                                                  : info.task_idx]
689
73.2k
                                  .get();
690
73.2k
            _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
73.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
73.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
73.2k
    }
702
703
73.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
73.2k
    _rows_input_counter =
708
73.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
73.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
73.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
73.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
73.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
73.2k
    _memory_used_counter =
714
73.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
73.2k
    _common_profile->add_info_string("IsColocate",
716
73.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
73.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
73.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
73.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
73.2k
    return Status::OK();
721
73.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
182
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
182
    _operator_profile =
664
182
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
182
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
182
    _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
182
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
182
    _operator_profile->add_child(_common_profile, true);
673
182
    _operator_profile->add_child(_custom_profile, true);
674
675
182
    _operator_profile->set_metadata(_parent->node_id());
676
182
    _wait_for_finish_dependency_timer =
677
182
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
182
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
182
    if constexpr (!is_fake_shared) {
680
182
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
182
            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
182
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
182
            _shared_state = info.shared_state->template cast<SharedState>();
696
182
            _dependency = _shared_state->create_sink_dependency(
697
182
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
182
        }
699
182
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
182
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
182
    }
702
703
182
    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
182
    _rows_input_counter =
708
182
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
182
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
182
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
182
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
182
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
182
    _memory_used_counter =
714
182
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
182
    _common_profile->add_info_string("IsColocate",
716
182
                                     std::to_string(_parent->is_colocated_operator()));
717
182
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
182
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
182
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
182
    return Status::OK();
721
182
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
549k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
549k
    _operator_profile =
664
549k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
549k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
549k
    _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
549k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
549k
    _operator_profile->add_child(_common_profile, true);
673
549k
    _operator_profile->add_child(_custom_profile, true);
674
675
549k
    _operator_profile->set_metadata(_parent->node_id());
676
549k
    _wait_for_finish_dependency_timer =
677
549k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
549k
    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
549k
    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
549k
    _rows_input_counter =
708
549k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
549k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
549k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
549k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
549k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
549k
    _memory_used_counter =
714
549k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
549k
    _common_profile->add_info_string("IsColocate",
716
549k
                                     std::to_string(_parent->is_colocated_operator()));
717
549k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
549k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
549k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
549k
    return Status::OK();
721
549k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11.5k
    _operator_profile =
664
11.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11.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
11.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11.5k
    _operator_profile->add_child(_common_profile, true);
673
11.5k
    _operator_profile->add_child(_custom_profile, true);
674
675
11.5k
    _operator_profile->set_metadata(_parent->node_id());
676
11.5k
    _wait_for_finish_dependency_timer =
677
11.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11.5k
    if constexpr (!is_fake_shared) {
680
11.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11.5k
            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.5k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11.5k
            _shared_state = info.shared_state->template cast<SharedState>();
696
11.5k
            _dependency = _shared_state->create_sink_dependency(
697
11.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11.5k
        }
699
11.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11.5k
    }
702
703
11.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
11.5k
    _rows_input_counter =
708
11.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11.5k
    _memory_used_counter =
714
11.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11.5k
    _common_profile->add_info_string("IsColocate",
716
11.5k
                                     std::to_string(_parent->is_colocated_operator()));
717
11.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11.5k
    return Status::OK();
721
11.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
356
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
356
    _operator_profile =
664
356
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
356
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
356
    _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
356
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
356
    _operator_profile->add_child(_common_profile, true);
673
356
    _operator_profile->add_child(_custom_profile, true);
674
675
356
    _operator_profile->set_metadata(_parent->node_id());
676
356
    _wait_for_finish_dependency_timer =
677
356
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
356
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
356
    if constexpr (!is_fake_shared) {
680
356
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
356
            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
356
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
356
            _shared_state = info.shared_state->template cast<SharedState>();
696
356
            _dependency = _shared_state->create_sink_dependency(
697
356
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
356
        }
699
356
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
356
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
356
    }
702
703
356
    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
356
    _rows_input_counter =
708
356
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
356
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
356
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
356
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
356
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
356
    _memory_used_counter =
714
356
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
356
    _common_profile->add_info_string("IsColocate",
716
356
                                     std::to_string(_parent->is_colocated_operator()));
717
356
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
356
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
356
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
356
    return Status::OK();
721
356
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.41k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.41k
    _operator_profile =
664
2.41k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.41k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.41k
    _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.41k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.41k
    _operator_profile->add_child(_common_profile, true);
673
2.41k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.41k
    _operator_profile->set_metadata(_parent->node_id());
676
2.41k
    _wait_for_finish_dependency_timer =
677
2.41k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.41k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.41k
    if constexpr (!is_fake_shared) {
680
2.41k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.41k
            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.41k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.41k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.41k
            _dependency = _shared_state->create_sink_dependency(
697
2.41k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.41k
        }
699
2.41k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.41k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.41k
    }
702
703
2.41k
    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.41k
    _rows_input_counter =
708
2.41k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.41k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.41k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.41k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.41k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.41k
    _memory_used_counter =
714
2.41k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.41k
    _common_profile->add_info_string("IsColocate",
716
2.41k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.41k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.41k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.41k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.41k
    return Status::OK();
721
2.41k
}
_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
269k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
269k
    _operator_profile =
664
269k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
269k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
269k
    _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
269k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
269k
    _operator_profile->add_child(_common_profile, true);
673
269k
    _operator_profile->add_child(_custom_profile, true);
674
675
269k
    _operator_profile->set_metadata(_parent->node_id());
676
269k
    _wait_for_finish_dependency_timer =
677
269k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
269k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
269k
    if constexpr (!is_fake_shared) {
680
269k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
270k
            info.shared_state_map.end()) {
682
270k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
270k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
270k
            }
685
270k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
270k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
270k
                                                  ? 0
688
270k
                                                  : info.task_idx]
689
270k
                                  .get();
690
270k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
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
269k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
269k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
269k
    }
702
703
269k
    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
269k
    _rows_input_counter =
708
269k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
269k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
269k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
269k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
269k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
269k
    _memory_used_counter =
714
269k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
269k
    _common_profile->add_info_string("IsColocate",
716
269k
                                     std::to_string(_parent->is_colocated_operator()));
717
269k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
269k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
269k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
269k
    return Status::OK();
721
269k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
447k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
447k
    _operator_profile =
664
447k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
447k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
447k
    _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
447k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
447k
    _operator_profile->add_child(_common_profile, true);
673
447k
    _operator_profile->add_child(_custom_profile, true);
674
675
447k
    _operator_profile->set_metadata(_parent->node_id());
676
447k
    _wait_for_finish_dependency_timer =
677
447k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
447k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
447k
    if constexpr (!is_fake_shared) {
680
447k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
447k
            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
447k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
447k
            _shared_state = info.shared_state->template cast<SharedState>();
696
447k
            _dependency = _shared_state->create_sink_dependency(
697
447k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
447k
        }
699
447k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
447k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
447k
    }
702
703
447k
    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
447k
    _rows_input_counter =
708
447k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
447k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
447k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
447k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
447k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
447k
    _memory_used_counter =
714
447k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
447k
    _common_profile->add_info_string("IsColocate",
716
447k
                                     std::to_string(_parent->is_colocated_operator()));
717
447k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
447k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
447k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
447k
    return Status::OK();
721
447k
}
_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.84M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.84M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.84M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.29M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.29M
    }
731
1.84M
    _closed = true;
732
1.84M
    return Status::OK();
733
1.84M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
120k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
120k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
120k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
120k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
120k
    }
731
120k
    _closed = true;
732
120k
    return Status::OK();
733
120k
}
_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
235k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
235k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
235k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
235k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
235k
    }
731
235k
    _closed = true;
732
235k
    return Status::OK();
733
235k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
19
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
19
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
17
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
17
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
17
    }
731
17
    _closed = true;
732
17
    return Status::OK();
733
19
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
6.26k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
6.26k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
6.26k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
6.26k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
6.26k
    }
731
6.26k
    _closed = true;
732
6.26k
    return Status::OK();
733
6.26k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.42k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.42k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.42k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.42k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.42k
    }
731
8.42k
    _closed = true;
732
8.42k
    return Status::OK();
733
8.42k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
99.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
99.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
99.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
99.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
99.0k
    }
731
99.0k
    _closed = true;
732
99.0k
    return Status::OK();
733
99.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
73.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
73.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
73.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
73.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
73.0k
    }
731
73.0k
    _closed = true;
732
73.0k
    return Status::OK();
733
73.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
171
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
171
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
171
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
171
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
171
    }
731
171
    _closed = true;
732
171
    return Status::OK();
733
171
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
553k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
553k
    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
553k
    _closed = true;
732
553k
    return Status::OK();
733
553k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
11.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
11.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
11.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
11.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
11.6k
    }
731
11.6k
    _closed = true;
732
11.6k
    return Status::OK();
733
11.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
253
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
253
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
253
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
253
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
253
    }
731
253
    _closed = true;
732
253
    return Status::OK();
733
253
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.46k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.46k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.46k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.46k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.46k
    }
731
2.46k
    _closed = true;
732
2.46k
    return Status::OK();
733
2.46k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.8k
    }
731
12.8k
    _closed = true;
732
12.8k
    return Status::OK();
733
12.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
271k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
271k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
271k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
271k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
271k
    }
731
271k
    _closed = true;
732
271k
    return Status::OK();
733
271k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
448k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
448k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
448k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
448k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
448k
    }
731
448k
    _closed = true;
732
448k
    return Status::OK();
733
448k
}
_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
9.53k
                                                          bool* eos) {
738
9.53k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
9.53k
    return pull(state, block, eos);
740
9.53k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
36
                                                          bool* eos) {
738
36
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
36
    return pull(state, block, eos);
740
36
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
9.50k
                                                          bool* eos) {
738
9.50k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
9.49k
    return pull(state, block, eos);
740
9.50k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
553k
                                                         bool* eos) {
745
553k
    auto& local_state = get_local_state(state);
746
553k
    if (need_more_input_data(state)) {
747
519k
        local_state._child_block->clear_column_data(
748
519k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
519k
                        .num_materialized_slots());
750
519k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
519k
                state, local_state._child_block.get(), &local_state._child_eos));
752
519k
        *eos = local_state._child_eos;
753
519k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
51.3k
            return Status::OK();
755
51.3k
        }
756
468k
        {
757
468k
            SCOPED_TIMER(local_state.exec_time_counter());
758
468k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
468k
        }
760
468k
    }
761
762
501k
    if (!need_more_input_data(state)) {
763
473k
        SCOPED_TIMER(local_state.exec_time_counter());
764
473k
        bool new_eos = false;
765
473k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
473k
        if (new_eos) {
767
396k
            *eos = true;
768
396k
        } else if (!need_more_input_data(state)) {
769
25.1k
            *eos = false;
770
25.1k
        }
771
473k
    }
772
501k
    return Status::OK();
773
501k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
135k
                                                         bool* eos) {
745
135k
    auto& local_state = get_local_state(state);
746
135k
    if (need_more_input_data(state)) {
747
116k
        local_state._child_block->clear_column_data(
748
116k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
116k
                        .num_materialized_slots());
750
116k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
116k
                state, local_state._child_block.get(), &local_state._child_eos));
752
116k
        *eos = local_state._child_eos;
753
116k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
31.7k
            return Status::OK();
755
31.7k
        }
756
84.4k
        {
757
84.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
84.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
84.4k
        }
760
84.4k
    }
761
762
104k
    if (!need_more_input_data(state)) {
763
104k
        SCOPED_TIMER(local_state.exec_time_counter());
764
104k
        bool new_eos = false;
765
104k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
104k
        if (new_eos) {
767
48.4k
            *eos = true;
768
55.7k
        } else if (!need_more_input_data(state)) {
769
10.7k
            *eos = false;
770
10.7k
        }
771
104k
    }
772
104k
    return Status::OK();
773
104k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.31k
                                                         bool* eos) {
745
4.31k
    auto& local_state = get_local_state(state);
746
4.31k
    if (need_more_input_data(state)) {
747
2.37k
        local_state._child_block->clear_column_data(
748
2.37k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.37k
                        .num_materialized_slots());
750
2.37k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.37k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.37k
        *eos = local_state._child_eos;
753
2.37k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
446
            return Status::OK();
755
446
        }
756
1.92k
        {
757
1.92k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.92k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.92k
        }
760
1.92k
    }
761
762
3.89k
    if (!need_more_input_data(state)) {
763
3.89k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.89k
        bool new_eos = false;
765
3.89k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.89k
        if (new_eos) {
767
1.33k
            *eos = true;
768
2.56k
        } else if (!need_more_input_data(state)) {
769
1.96k
            *eos = false;
770
1.96k
        }
771
3.89k
    }
772
3.87k
    return Status::OK();
773
3.87k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.94k
                                                         bool* eos) {
745
1.94k
    auto& local_state = get_local_state(state);
746
1.94k
    if (need_more_input_data(state)) {
747
1.94k
        local_state._child_block->clear_column_data(
748
1.94k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.94k
                        .num_materialized_slots());
750
1.94k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.94k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.94k
        *eos = local_state._child_eos;
753
1.94k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
790
            return Status::OK();
755
790
        }
756
1.15k
        {
757
1.15k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.15k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.15k
        }
760
1.15k
    }
761
762
1.15k
    if (!need_more_input_data(state)) {
763
1.15k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.15k
        bool new_eos = false;
765
1.15k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.15k
        if (new_eos) {
767
797
            *eos = true;
768
797
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.15k
    }
772
1.15k
    return Status::OK();
773
1.15k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
15.9k
                                                         bool* eos) {
745
15.9k
    auto& local_state = get_local_state(state);
746
15.9k
    if (need_more_input_data(state)) {
747
15.9k
        local_state._child_block->clear_column_data(
748
15.9k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
15.9k
                        .num_materialized_slots());
750
15.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
15.9k
                state, local_state._child_block.get(), &local_state._child_eos));
752
15.9k
        *eos = local_state._child_eos;
753
15.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.14k
            return Status::OK();
755
3.14k
        }
756
12.8k
        {
757
12.8k
            SCOPED_TIMER(local_state.exec_time_counter());
758
12.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
12.8k
        }
760
12.8k
    }
761
762
12.8k
    if (!need_more_input_data(state)) {
763
7.34k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.34k
        bool new_eos = false;
765
7.34k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.34k
        if (new_eos) {
767
7.24k
            *eos = true;
768
7.24k
        } else if (!need_more_input_data(state)) {
769
14
            *eos = false;
770
14
        }
771
7.34k
    }
772
12.8k
    return Status::OK();
773
12.8k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
363k
                                                         bool* eos) {
745
363k
    auto& local_state = get_local_state(state);
746
364k
    if (need_more_input_data(state)) {
747
364k
        local_state._child_block->clear_column_data(
748
364k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
364k
                        .num_materialized_slots());
750
364k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
364k
                state, local_state._child_block.get(), &local_state._child_eos));
752
364k
        *eos = local_state._child_eos;
753
364k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
13.2k
            return Status::OK();
755
13.2k
        }
756
351k
        {
757
351k
            SCOPED_TIMER(local_state.exec_time_counter());
758
351k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
351k
        }
760
351k
    }
761
762
350k
    if (!need_more_input_data(state)) {
763
328k
        SCOPED_TIMER(local_state.exec_time_counter());
764
328k
        bool new_eos = false;
765
328k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
328k
        if (new_eos) {
767
327k
            *eos = true;
768
327k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
328k
    }
772
350k
    return Status::OK();
773
350k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
23.8k
                                                         bool* eos) {
745
23.8k
    auto& local_state = get_local_state(state);
746
23.8k
    if (need_more_input_data(state)) {
747
11.7k
        local_state._child_block->clear_column_data(
748
11.7k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
11.7k
                        .num_materialized_slots());
750
11.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
11.7k
                state, local_state._child_block.get(), &local_state._child_eos));
752
11.7k
        *eos = local_state._child_eos;
753
11.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.16k
            return Status::OK();
755
1.16k
        }
756
10.5k
        {
757
10.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.5k
        }
760
10.5k
    }
761
762
22.6k
    if (!need_more_input_data(state)) {
763
22.1k
        SCOPED_TIMER(local_state.exec_time_counter());
764
22.1k
        bool new_eos = false;
765
22.1k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
22.1k
        if (new_eos) {
767
6.26k
            *eos = true;
768
15.8k
        } else if (!need_more_input_data(state)) {
769
12.0k
            *eos = false;
770
12.0k
        }
771
22.1k
    }
772
22.6k
    return Status::OK();
773
22.6k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.67k
                                                         bool* eos) {
745
7.67k
    auto& local_state = get_local_state(state);
746
7.67k
    if (need_more_input_data(state)) {
747
7.31k
        local_state._child_block->clear_column_data(
748
7.31k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.31k
                        .num_materialized_slots());
750
7.31k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.31k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.31k
        *eos = local_state._child_eos;
753
7.31k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
818
            return Status::OK();
755
818
        }
756
6.49k
        {
757
6.49k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.49k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.49k
        }
760
6.49k
    }
761
762
6.85k
    if (!need_more_input_data(state)) {
763
6.85k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.85k
        bool new_eos = false;
765
6.85k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.85k
        if (new_eos) {
767
4.64k
            *eos = true;
768
4.64k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
6.85k
    }
772
6.84k
    return Status::OK();
773
6.84k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
48.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
48.0k
    RETURN_IF_ERROR(Base::init(state, info));
779
48.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
48.0k
                                                         "AsyncWriterDependency", true);
781
48.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
48.0k
                             _finish_dependency));
783
784
48.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
48.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
48.0k
    return Status::OK();
787
48.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
382
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
382
    RETURN_IF_ERROR(Base::init(state, info));
779
382
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
382
                                                         "AsyncWriterDependency", true);
781
382
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
382
                             _finish_dependency));
783
784
382
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
382
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
382
    return Status::OK();
787
382
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
47.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.6k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.6k
                                                         "AsyncWriterDependency", true);
781
47.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.6k
                             _finish_dependency));
783
784
47.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.6k
    return Status::OK();
787
47.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
42
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
42
    RETURN_IF_ERROR(Base::init(state, info));
779
42
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
42
                                                         "AsyncWriterDependency", true);
781
42
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
42
                             _finish_dependency));
783
784
42
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
42
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
42
    return Status::OK();
787
42
}
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
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
48.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.7k
    RETURN_IF_ERROR(Base::open(state));
793
48.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
386k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
337k
        RETURN_IF_ERROR(
796
337k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
337k
    }
798
48.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.7k
    return Status::OK();
800
48.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
384
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
384
    RETURN_IF_ERROR(Base::open(state));
793
384
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.94k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.55k
        RETURN_IF_ERROR(
796
1.55k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.55k
    }
798
384
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
384
    return Status::OK();
800
384
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
48.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.2k
    RETURN_IF_ERROR(Base::open(state));
793
48.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
383k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
335k
        RETURN_IF_ERROR(
796
335k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
335k
    }
798
48.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.2k
    return Status::OK();
800
48.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
42
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
42
    RETURN_IF_ERROR(Base::open(state));
793
42
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
756
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
714
        RETURN_IF_ERROR(
796
714
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
714
    }
798
42
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
42
    return Status::OK();
800
42
}
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
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
64.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.0k
    return _writer->sink(block, eos);
806
64.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.43k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.43k
    return _writer->sink(block, eos);
806
1.43k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
62.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
62.5k
    return _writer->sink(block, eos);
806
62.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
42
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
42
    return _writer->sink(block, eos);
806
42
}
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
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
48.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.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
48.8k
    if (_writer) {
818
48.8k
        Status st = _writer->get_writer_status();
819
48.8k
        if (exec_status.ok()) {
820
48.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.7k
                                                       : Status::Cancelled("force close"));
822
48.7k
        } else {
823
103
            _writer->force_close(exec_status);
824
103
        }
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
48.8k
        RETURN_IF_ERROR(st);
829
48.8k
    }
830
48.7k
    return Base::close(state, exec_status);
831
48.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
372
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
372
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
372
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
372
    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
372
    if (_writer) {
818
372
        Status st = _writer->get_writer_status();
819
372
        if (exec_status.ok()) {
820
372
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
372
                                                       : Status::Cancelled("force close"));
822
372
        } 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
372
        RETURN_IF_ERROR(st);
829
372
    }
830
372
    return Base::close(state, exec_status);
831
372
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
48.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.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
48.4k
    if (_writer) {
818
48.4k
        Status st = _writer->get_writer_status();
819
48.4k
        if (exec_status.ok()) {
820
48.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.3k
                                                       : Status::Cancelled("force close"));
822
48.3k
        } else {
823
103
            _writer->force_close(exec_status);
824
103
        }
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
48.4k
        RETURN_IF_ERROR(st);
829
48.4k
    }
830
48.3k
    return Base::close(state, exec_status);
831
48.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
42
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
42
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
42
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
42
    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
42
    if (_writer) {
818
42
        Status st = _writer->get_writer_status();
819
42
        if (exec_status.ok()) {
820
42
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
42
                                                       : Status::Cancelled("force close"));
822
42
        } 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
42
        RETURN_IF_ERROR(st);
829
42
    }
830
42
    return Base::close(state, exec_status);
831
42
}
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
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
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(SpillIcebergTableSinkLocalState)
850
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
851
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
852
DECLARE_OPERATOR(MCTableSinkLocalState)
853
DECLARE_OPERATOR(AnalyticSinkLocalState)
854
DECLARE_OPERATOR(BlackholeSinkLocalState)
855
DECLARE_OPERATOR(SortSinkLocalState)
856
DECLARE_OPERATOR(SpillSortSinkLocalState)
857
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
858
DECLARE_OPERATOR(AggSinkLocalState)
859
DECLARE_OPERATOR(BucketedAggSinkLocalState)
860
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
861
DECLARE_OPERATOR(ExchangeSinkLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
863
DECLARE_OPERATOR(UnionSinkLocalState)
864
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
865
DECLARE_OPERATOR(PartitionSortSinkLocalState)
866
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
868
DECLARE_OPERATOR(SetSinkLocalState<true>)
869
DECLARE_OPERATOR(SetSinkLocalState<false>)
870
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
871
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
872
DECLARE_OPERATOR(CacheSinkLocalState)
873
DECLARE_OPERATOR(DictSinkLocalState)
874
DECLARE_OPERATOR(RecCTESinkLocalState)
875
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
876
877
#undef DECLARE_OPERATOR
878
879
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
880
DECLARE_OPERATOR(HashJoinProbeLocalState)
881
DECLARE_OPERATOR(OlapScanLocalState)
882
DECLARE_OPERATOR(GroupCommitLocalState)
883
DECLARE_OPERATOR(JDBCScanLocalState)
884
DECLARE_OPERATOR(FileScanLocalState)
885
DECLARE_OPERATOR(AnalyticLocalState)
886
DECLARE_OPERATOR(SortLocalState)
887
DECLARE_OPERATOR(SpillSortLocalState)
888
DECLARE_OPERATOR(LocalMergeSortLocalState)
889
DECLARE_OPERATOR(AggLocalState)
890
DECLARE_OPERATOR(BucketedAggLocalState)
891
DECLARE_OPERATOR(PartitionedAggLocalState)
892
DECLARE_OPERATOR(TableFunctionLocalState)
893
DECLARE_OPERATOR(ExchangeLocalState)
894
DECLARE_OPERATOR(RepeatLocalState)
895
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
896
DECLARE_OPERATOR(AssertNumRowsLocalState)
897
DECLARE_OPERATOR(EmptySetLocalState)
898
DECLARE_OPERATOR(UnionSourceLocalState)
899
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
900
DECLARE_OPERATOR(PartitionSortSourceLocalState)
901
DECLARE_OPERATOR(SetSourceLocalState<true>)
902
DECLARE_OPERATOR(SetSourceLocalState<false>)
903
DECLARE_OPERATOR(DataGenLocalState)
904
DECLARE_OPERATOR(SchemaScanLocalState)
905
DECLARE_OPERATOR(MetaScanLocalState)
906
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
907
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
908
DECLARE_OPERATOR(CacheSourceLocalState)
909
DECLARE_OPERATOR(RecCTESourceLocalState)
910
DECLARE_OPERATOR(RecCTEScanLocalState)
911
912
#ifdef BE_TEST
913
DECLARE_OPERATOR(MockLocalState)
914
DECLARE_OPERATOR(MockScanLocalState)
915
#endif
916
#undef DECLARE_OPERATOR
917
918
template class StreamingOperatorX<AssertNumRowsLocalState>;
919
template class StreamingOperatorX<SelectLocalState>;
920
921
template class StatefulOperatorX<HashJoinProbeLocalState>;
922
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
923
template class StatefulOperatorX<RepeatLocalState>;
924
template class StatefulOperatorX<MaterializationLocalState>;
925
template class StatefulOperatorX<StreamingAggLocalState>;
926
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
927
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
928
template class StatefulOperatorX<TableFunctionLocalState>;
929
930
template class PipelineXSinkLocalState<HashJoinSharedState>;
931
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
932
template class PipelineXSinkLocalState<SortSharedState>;
933
template class PipelineXSinkLocalState<SpillSortSharedState>;
934
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
935
template class PipelineXSinkLocalState<AnalyticSharedState>;
936
template class PipelineXSinkLocalState<AggSharedState>;
937
template class PipelineXSinkLocalState<BucketedAggSharedState>;
938
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
939
template class PipelineXSinkLocalState<FakeSharedState>;
940
template class PipelineXSinkLocalState<UnionSharedState>;
941
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
942
template class PipelineXSinkLocalState<MultiCastSharedState>;
943
template class PipelineXSinkLocalState<SetSharedState>;
944
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
945
template class PipelineXSinkLocalState<BasicSharedState>;
946
template class PipelineXSinkLocalState<DataQueueSharedState>;
947
template class PipelineXSinkLocalState<RecCTESharedState>;
948
949
template class PipelineXLocalState<HashJoinSharedState>;
950
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
951
template class PipelineXLocalState<SortSharedState>;
952
template class PipelineXLocalState<SpillSortSharedState>;
953
template class PipelineXLocalState<NestedLoopJoinSharedState>;
954
template class PipelineXLocalState<AnalyticSharedState>;
955
template class PipelineXLocalState<AggSharedState>;
956
template class PipelineXLocalState<BucketedAggSharedState>;
957
template class PipelineXLocalState<PartitionedAggSharedState>;
958
template class PipelineXLocalState<FakeSharedState>;
959
template class PipelineXLocalState<UnionSharedState>;
960
template class PipelineXLocalState<DataQueueSharedState>;
961
template class PipelineXLocalState<MultiCastSharedState>;
962
template class PipelineXLocalState<PartitionSortNodeSharedState>;
963
template class PipelineXLocalState<SetSharedState>;
964
template class PipelineXLocalState<LocalExchangeSharedState>;
965
template class PipelineXLocalState<BasicSharedState>;
966
template class PipelineXLocalState<RecCTESharedState>;
967
968
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
969
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
970
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
972
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
973
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
977
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
978
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
979
980
#ifdef BE_TEST
981
template class OperatorX<DummyOperatorLocalState>;
982
template class DataSinkOperatorX<DummySinkLocalState>;
983
#endif
984
985
} // namespace doris