Coverage Report

Created: 2026-05-18 07:38

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include "common/status.h"
21
#include "exec/common/util.hpp"
22
#include "exec/exchange/local_exchange_sink_operator.h"
23
#include "exec/exchange/local_exchange_source_operator.h"
24
#include "exec/operator/aggregation_sink_operator.h"
25
#include "exec/operator/aggregation_source_operator.h"
26
#include "exec/operator/analytic_sink_operator.h"
27
#include "exec/operator/analytic_source_operator.h"
28
#include "exec/operator/assert_num_rows_operator.h"
29
#include "exec/operator/blackhole_sink_operator.h"
30
#include "exec/operator/bucketed_aggregation_sink_operator.h"
31
#include "exec/operator/bucketed_aggregation_source_operator.h"
32
#include "exec/operator/cache_sink_operator.h"
33
#include "exec/operator/cache_source_operator.h"
34
#include "exec/operator/datagen_operator.h"
35
#include "exec/operator/dict_sink_operator.h"
36
#include "exec/operator/distinct_streaming_aggregation_operator.h"
37
#include "exec/operator/empty_set_operator.h"
38
#include "exec/operator/exchange_sink_operator.h"
39
#include "exec/operator/exchange_source_operator.h"
40
#include "exec/operator/file_scan_operator.h"
41
#include "exec/operator/group_commit_block_sink_operator.h"
42
#include "exec/operator/group_commit_scan_operator.h"
43
#include "exec/operator/hashjoin_build_sink.h"
44
#include "exec/operator/hashjoin_probe_operator.h"
45
#include "exec/operator/hive_table_sink_operator.h"
46
#include "exec/operator/iceberg_delete_sink_operator.h"
47
#include "exec/operator/iceberg_merge_sink_operator.h"
48
#include "exec/operator/iceberg_table_sink_operator.h"
49
#include "exec/operator/jdbc_scan_operator.h"
50
#include "exec/operator/jdbc_table_sink_operator.h"
51
#include "exec/operator/local_merge_sort_source_operator.h"
52
#include "exec/operator/materialization_opertor.h"
53
#include "exec/operator/maxcompute_table_sink_operator.h"
54
#include "exec/operator/memory_scratch_sink_operator.h"
55
#include "exec/operator/meta_scan_operator.h"
56
#include "exec/operator/mock_operator.h"
57
#include "exec/operator/mock_scan_operator.h"
58
#include "exec/operator/multi_cast_data_stream_sink.h"
59
#include "exec/operator/multi_cast_data_stream_source.h"
60
#include "exec/operator/nested_loop_join_build_operator.h"
61
#include "exec/operator/nested_loop_join_probe_operator.h"
62
#include "exec/operator/olap_scan_operator.h"
63
#include "exec/operator/olap_table_sink_operator.h"
64
#include "exec/operator/olap_table_sink_v2_operator.h"
65
#include "exec/operator/partition_sort_sink_operator.h"
66
#include "exec/operator/partition_sort_source_operator.h"
67
#include "exec/operator/partitioned_aggregation_sink_operator.h"
68
#include "exec/operator/partitioned_aggregation_source_operator.h"
69
#include "exec/operator/partitioned_hash_join_probe_operator.h"
70
#include "exec/operator/partitioned_hash_join_sink_operator.h"
71
#include "exec/operator/rec_cte_anchor_sink_operator.h"
72
#include "exec/operator/rec_cte_scan_operator.h"
73
#include "exec/operator/rec_cte_sink_operator.h"
74
#include "exec/operator/rec_cte_source_operator.h"
75
#include "exec/operator/repeat_operator.h"
76
#include "exec/operator/result_file_sink_operator.h"
77
#include "exec/operator/result_sink_operator.h"
78
#include "exec/operator/schema_scan_operator.h"
79
#include "exec/operator/select_operator.h"
80
#include "exec/operator/set_probe_sink_operator.h"
81
#include "exec/operator/set_sink_operator.h"
82
#include "exec/operator/set_source_operator.h"
83
#include "exec/operator/sort_sink_operator.h"
84
#include "exec/operator/sort_source_operator.h"
85
#include "exec/operator/spill_iceberg_table_sink_operator.h"
86
#include "exec/operator/spill_sort_sink_operator.h"
87
#include "exec/operator/spill_sort_source_operator.h"
88
#include "exec/operator/streaming_aggregation_operator.h"
89
#include "exec/operator/table_function_operator.h"
90
#include "exec/operator/tvf_table_sink_operator.h"
91
#include "exec/operator/union_sink_operator.h"
92
#include "exec/operator/union_source_operator.h"
93
#include "exec/pipeline/dependency.h"
94
#include "exec/pipeline/pipeline.h"
95
#include "exprs/vexpr.h"
96
#include "exprs/vexpr_context.h"
97
#include "runtime/runtime_profile.h"
98
#include "runtime/runtime_profile_counter_names.h"
99
#include "util/debug_util.h"
100
#include "util/string_util.h"
101
102
namespace doris {
103
class RowDescriptor;
104
class RuntimeState;
105
} // namespace doris
106
107
namespace doris {
108
109
0
Status OperatorBase::close(RuntimeState* state) {
110
0
    if (_is_closed) {
111
0
        return Status::OK();
112
0
    }
113
0
    _is_closed = true;
114
0
    return Status::OK();
115
0
}
116
117
template <typename SharedStateArg>
118
360k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
360k
    if (_parent->nereids_id() == -1) {
120
187k
        return fmt::format("(id={})", _parent->node_id());
121
187k
    } else {
122
172k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
172k
    }
124
360k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
30.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
30.2k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
30.2k
    } else {
122
30.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
30.2k
    }
124
30.2k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1
    if (_parent->nereids_id() == -1) {
120
1
        return fmt::format("(id={})", _parent->node_id());
121
1
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
80.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
80.2k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
80.2k
    } else {
122
80.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
80.2k
    }
124
80.2k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
21
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
21
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
21
    } else {
122
21
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
21
    }
124
21
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
3.33k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
3.33k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
3.33k
    } else {
122
3.33k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
3.33k
    }
124
3.33k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
67
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
67
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
58
    } else {
122
58
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
58
    }
124
67
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
42.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
42.3k
    if (_parent->nereids_id() == -1) {
120
27
        return fmt::format("(id={})", _parent->node_id());
121
42.3k
    } else {
122
42.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
42.3k
    }
124
42.3k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
10
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
10
    } else {
122
10
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
10
    }
124
10
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
62.0k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
62.0k
    if (_parent->nereids_id() == -1) {
120
50.7k
        return fmt::format("(id={})", _parent->node_id());
121
50.7k
    } else {
122
11.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
11.3k
    }
124
62.0k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.93k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.93k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
4.92k
    } else {
122
4.92k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.92k
    }
124
4.93k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
3
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
3
    if (_parent->nereids_id() == -1) {
120
3
        return fmt::format("(id={})", _parent->node_id());
121
3
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
3
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.30k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.30k
    if (_parent->nereids_id() == -1) {
120
4.30k
        return fmt::format("(id={})", _parent->node_id());
121
4.30k
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
4.30k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
102
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
102
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
102
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
102
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
12
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
12
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
12
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
12
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
132k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
132k
    if (_parent->nereids_id() == -1) {
120
132k
        return fmt::format("(id={})", _parent->node_id());
121
132k
    } else {
122
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4
    }
124
132k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
125
126
template <typename SharedStateArg>
127
330k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
330k
    if (_parent->nereids_id() == -1) {
129
124k
        return fmt::format("(id={})", _parent->node_id());
130
205k
    } else {
131
205k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
205k
    }
133
330k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
78.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
78.2k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
78.2k
    } else {
131
78.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
78.2k
    }
133
78.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
2
    if (_parent->nereids_id() == -1) {
129
1
        return fmt::format("(id={})", _parent->node_id());
130
1
    } else {
131
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1
    }
133
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
80.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
80.3k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
80.2k
    } else {
131
80.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
80.2k
    }
133
80.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
27
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
27
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
27
    } else {
131
27
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
27
    }
133
27
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
3.33k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
3.33k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
3.33k
    } else {
131
3.33k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
3.33k
    }
133
3.33k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
67
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
67
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
58
    } else {
131
58
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
58
    }
133
67
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
42.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
42.3k
    if (_parent->nereids_id() == -1) {
129
27
        return fmt::format("(id={})", _parent->node_id());
130
42.3k
    } else {
131
42.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
42.3k
    }
133
42.3k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
20
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
20
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
20
    } else {
131
20
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
20
    }
133
20
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
80
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
80
    if (_parent->nereids_id() == -1) {
129
80
        return fmt::format("(id={})", _parent->node_id());
130
80
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
80
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
1.30k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.30k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
1.30k
    } else {
131
1.30k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
1.30k
    }
133
1.30k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
102
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
102
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
102
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
102
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
27
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
27
    if (_parent->nereids_id() == -1) {
129
27
        return fmt::format("(id={})", _parent->node_id());
130
27
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
27
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
37.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
37.1k
    if (_parent->nereids_id() == -1) {
129
37.1k
        return fmt::format("(id={})", _parent->node_id());
130
37.1k
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
37.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
87.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
87.2k
    if (_parent->nereids_id() == -1) {
129
87.1k
        return fmt::format("(id={})", _parent->node_id());
130
87.1k
    } else {
131
168
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
168
    }
133
87.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
3
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
3
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
3
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
3
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
134
135
template <typename SharedStateArg>
136
25.7k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
25.7k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
25.7k
    _terminated = true;
141
25.7k
    return Status::OK();
142
25.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
24.0k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
24.0k
    _terminated = true;
141
24.0k
    return Status::OK();
142
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
162
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
162
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
162
    _terminated = true;
141
162
    return Status::OK();
142
162
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
6
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
6
    _terminated = true;
141
6
    return Status::OK();
142
6
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1.35k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.35k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.35k
    _terminated = true;
141
1.35k
    return Status::OK();
142
1.35k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
88
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
88
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
88
    _terminated = true;
141
88
    return Status::OK();
142
88
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
2
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
2
    _terminated = true;
141
2
    return Status::OK();
142
2
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
128
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
128
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
128
    _terminated = true;
141
128
    return Status::OK();
142
128
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
143
144
197k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
197k
    return _child && _child->is_serial_operator() && !is_source()
146
197k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
197k
                   : DataDistribution(ExchangeType::NOOP);
148
197k
}
149
150
72.8k
const RowDescriptor& OperatorBase::row_desc() const {
151
72.8k
    return _child->row_desc();
152
72.8k
}
153
154
template <typename SharedStateArg>
155
20.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
20.4k
    fmt::memory_buffer debug_string_buffer;
157
20.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
20.4k
    return fmt::to_string(debug_string_buffer);
159
20.4k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
3
    fmt::memory_buffer debug_string_buffer;
157
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
3
    return fmt::to_string(debug_string_buffer);
159
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
155
20.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
20.4k
    fmt::memory_buffer debug_string_buffer;
157
20.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
20.4k
    return fmt::to_string(debug_string_buffer);
159
20.4k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
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
160
161
template <typename SharedStateArg>
162
20.4k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20.4k
    fmt::memory_buffer debug_string_buffer;
164
20.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20.4k
    return fmt::to_string(debug_string_buffer);
166
20.4k
}
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
162
20.4k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
20.4k
    fmt::memory_buffer debug_string_buffer;
164
20.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
20.4k
    return fmt::to_string(debug_string_buffer);
166
20.4k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
167
168
20.4k
std::string OperatorXBase::debug_string(int indentation_level) const {
169
20.4k
    fmt::memory_buffer debug_string_buffer;
170
20.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
171
20.4k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
172
20.4k
                   _is_serial_operator);
173
20.4k
    return fmt::to_string(debug_string_buffer);
174
20.4k
}
175
176
20.4k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
177
20.4k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
178
20.4k
}
179
180
179k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
181
179k
    std::string node_name = print_plan_node_type(tnode.node_type);
182
179k
    _nereids_id = tnode.nereids_id;
183
179k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
184
646
        if (!tnode.__isset.output_tuple_id) {
185
0
            return Status::InternalError("no final output tuple id");
186
0
        }
187
646
        if (tnode.intermediate_output_tuple_id_list.size() !=
188
646
            tnode.intermediate_projections_list.size()) {
189
0
            return Status::InternalError(
190
0
                    "intermediate_output_tuple_id_list size:{} not match "
191
0
                    "intermediate_projections_list size:{}",
192
0
                    tnode.intermediate_output_tuple_id_list.size(),
193
0
                    tnode.intermediate_projections_list.size());
194
0
        }
195
646
    }
196
179k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
197
179k
    _op_name = substr + "_OPERATOR";
198
199
179k
    if (tnode.__isset.vconjunct) {
200
0
        return Status::InternalError("vconjunct is not supported yet");
201
179k
    } else if (tnode.__isset.conjuncts) {
202
186k
        for (const auto& conjunct : tnode.conjuncts) {
203
186k
            VExprContextSPtr context;
204
186k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
205
186k
            _conjuncts.emplace_back(context);
206
186k
        }
207
53.9k
    }
208
209
    // create the projections expr
210
179k
    if (tnode.__isset.projections) {
211
98.0k
        DCHECK(tnode.__isset.output_tuple_id);
212
98.0k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
213
98.0k
    }
214
179k
    if (!tnode.intermediate_projections_list.empty()) {
215
646
        DCHECK(tnode.__isset.projections) << "no final projections";
216
646
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
217
2.94k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
218
2.94k
            VExprContextSPtrs projections;
219
2.94k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
220
2.94k
            _intermediate_projections.push_back(projections);
221
2.94k
        }
222
646
    }
223
179k
    return Status::OK();
224
179k
}
225
226
207k
Status OperatorXBase::prepare(RuntimeState* state) {
227
207k
    for (auto& conjunct : _conjuncts) {
228
186k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
229
186k
    }
230
207k
    if (state->enable_adjust_conjunct_order_by_cost()) {
231
265k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
232
265k
            return a->execute_cost() < b->execute_cost();
233
265k
        });
234
158k
    };
235
236
210k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
237
2.94k
        RETURN_IF_ERROR(
238
2.94k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
239
2.94k
    }
240
207k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
241
242
207k
    if (has_output_row_desc()) {
243
98.0k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
244
98.0k
    }
245
246
207k
    for (auto& conjunct : _conjuncts) {
247
186k
        RETURN_IF_ERROR(conjunct->open(state));
248
186k
    }
249
207k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
250
207k
    for (auto& projections : _intermediate_projections) {
251
2.94k
        RETURN_IF_ERROR(VExpr::open(projections, state));
252
2.94k
    }
253
207k
    if (_child && !is_source()) {
254
32.4k
        RETURN_IF_ERROR(_child->prepare(state));
255
32.4k
    }
256
257
207k
    if (VExpr::contains_blockable_function(_conjuncts) ||
258
207k
        VExpr::contains_blockable_function(_projections)) {
259
0
        _blockable = true;
260
0
    }
261
262
207k
    return Status::OK();
263
207k
}
264
265
1.99k
Status OperatorXBase::terminate(RuntimeState* state) {
266
1.99k
    if (_child && !is_source()) {
267
242
        RETURN_IF_ERROR(_child->terminate(state));
268
242
    }
269
1.99k
    auto result = state->get_local_state_result(operator_id());
270
1.99k
    if (!result) {
271
0
        return result.error();
272
0
    }
273
1.99k
    return result.value()->terminate(state);
274
1.99k
}
275
276
899k
Status OperatorXBase::close(RuntimeState* state) {
277
899k
    if (_child && !is_source()) {
278
62.3k
        RETURN_IF_ERROR(_child->close(state));
279
62.3k
    }
280
899k
    auto result = state->get_local_state_result(operator_id());
281
899k
    if (!result) {
282
0
        return result.error();
283
0
    }
284
899k
    return result.value()->close(state);
285
899k
}
286
287
34.3k
void PipelineXLocalStateBase::clear_origin_block() {
288
34.3k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
289
34.3k
}
290
291
61.3k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
292
61.3k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
293
294
61.3k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
295
61.3k
    return Status::OK();
296
61.3k
}
297
298
0
bool PipelineXLocalStateBase::is_blockable() const {
299
0
    return std::any_of(_projections.begin(), _projections.end(),
300
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
301
0
}
302
303
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
304
34.3k
                                     Block* output_block) const {
305
34.3k
    auto* local_state = state->get_local_state(operator_id());
306
34.3k
    SCOPED_TIMER(local_state->exec_time_counter());
307
34.3k
    SCOPED_TIMER(local_state->_projection_timer);
308
34.3k
    const size_t rows = origin_block->rows();
309
34.3k
    if (rows == 0) {
310
15.1k
        return Status::OK();
311
15.1k
    }
312
19.2k
    Block input_block = *origin_block;
313
314
19.2k
    size_t bytes_usage = 0;
315
19.2k
    ColumnsWithTypeAndName new_columns;
316
19.2k
    for (const auto& projections : local_state->_intermediate_projections) {
317
242
        if (projections.empty()) {
318
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
319
0
                                         node_id());
320
0
        }
321
242
        new_columns.resize(projections.size());
322
2.43k
        for (int i = 0; i < projections.size(); i++) {
323
2.18k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
324
2.18k
            if (new_columns[i].column->size() != rows) {
325
0
                return Status::InternalError(
326
0
                        "intermediate projection result column size {} not equal input rows {}, "
327
0
                        "expr: {}",
328
0
                        new_columns[i].column->size(), rows,
329
0
                        projections[i]->root()->debug_string());
330
0
            }
331
2.18k
        }
332
242
        Block tmp_block {new_columns};
333
242
        bytes_usage += tmp_block.allocated_bytes();
334
242
        input_block.swap(tmp_block);
335
242
    }
336
337
19.2k
    if (input_block.rows() != rows) {
338
0
        return Status::InternalError(
339
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
340
0
                "input_block: {}",
341
0
                input_block.rows(), rows, input_block.dump_structure());
342
0
    }
343
106k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
344
106k
        if (to->is_nullable() && !from->is_nullable()) {
345
0
            if (_keep_origin || !from->is_exclusive()) {
346
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
347
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
348
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
349
0
                bytes_usage += null_column.allocated_bytes();
350
0
            } else {
351
0
                to = make_nullable(from, false)->assume_mutable();
352
0
            }
353
106k
        } else {
354
106k
            if (_keep_origin || !from->is_exclusive()) {
355
104k
                to->insert_range_from(*from, 0, rows);
356
104k
                bytes_usage += from->allocated_bytes();
357
104k
            } else {
358
1.41k
                to = from->assume_mutable();
359
1.41k
            }
360
106k
        }
361
106k
    };
362
363
19.2k
    MutableBlock mutable_block =
364
19.2k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
365
19.2k
    if (rows != 0) {
366
19.2k
        auto& mutable_columns = mutable_block.mutable_columns();
367
19.2k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
368
125k
        for (int i = 0; i < mutable_columns.size(); ++i) {
369
106k
            ColumnPtr column_ptr;
370
106k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
371
106k
            if (column_ptr->size() != rows) {
372
0
                return Status::InternalError(
373
0
                        "projection result column size {} not equal input rows {}, expr: {}",
374
0
                        column_ptr->size(), rows,
375
0
                        local_state->_projections[i]->root()->debug_string());
376
0
            }
377
106k
            column_ptr = column_ptr->convert_to_full_column_if_const();
378
106k
            bytes_usage += column_ptr->allocated_bytes();
379
106k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
380
106k
        }
381
19.2k
        DCHECK(mutable_block.rows() == rows);
382
19.2k
        output_block->set_columns(std::move(mutable_columns));
383
19.2k
    }
384
385
19.1k
    local_state->_estimate_memory_usage += bytes_usage;
386
387
19.1k
    return Status::OK();
388
19.2k
}
389
390
2.14M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
391
2.14M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
392
2.14M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
393
2.14M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
394
2.14M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
395
2.14M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
396
2.14M
            if (_debug_point_count++ % 2 == 0) {
397
2.14M
                return Status::OK();
398
2.14M
            }
399
2.14M
        }
400
2.14M
    });
401
402
2.14M
    Status status;
403
2.14M
    auto* local_state = state->get_local_state(operator_id());
404
2.14M
    Defer defer([&]() {
405
2.14M
        if (status.ok()) {
406
2.14M
            local_state->update_output_block_counters(*block);
407
2.14M
        }
408
2.14M
    });
409
2.14M
    if (_output_row_descriptor) {
410
34.3k
        local_state->clear_origin_block();
411
34.3k
        status = get_block(state, &local_state->_origin_block, eos);
412
34.3k
        if (UNLIKELY(!status.ok())) {
413
6
            return status;
414
6
        }
415
34.3k
        status = do_projections(state, &local_state->_origin_block, block);
416
34.3k
        return status;
417
34.3k
    }
418
2.11M
    status = get_block(state, block, eos);
419
2.11M
    RETURN_IF_ERROR(block->check_type_and_column());
420
2.11M
    return status;
421
2.11M
}
422
423
815k
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
424
815k
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
425
2.98k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
426
2.98k
        *eos = true;
427
2.98k
    }
428
429
815k
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
430
815k
        auto op_name = to_lower(_parent->_op_name);
431
815k
        auto arg_op_name = dp->param<std::string>("op_name");
432
815k
        arg_op_name = to_lower(arg_op_name);
433
434
815k
        if (op_name == arg_op_name) {
435
815k
            *eos = true;
436
815k
        }
437
815k
    });
438
439
815k
    if (auto rows = block->rows()) {
440
182k
        _num_rows_returned += rows;
441
182k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
442
182k
    }
443
815k
}
444
445
25.7k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
446
25.7k
    auto result = state->get_sink_local_state_result();
447
25.7k
    if (!result) {
448
0
        return result.error();
449
0
    }
450
25.7k
    return result.value()->terminate(state);
451
25.7k
}
452
453
20.4k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
454
20.4k
    fmt::memory_buffer debug_string_buffer;
455
456
20.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
457
20.4k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
458
20.4k
    return fmt::to_string(debug_string_buffer);
459
20.4k
}
460
461
20.4k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
462
20.4k
    return state->get_sink_local_state()->debug_string(indentation_level);
463
20.4k
}
464
465
114k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
466
114k
    std::string op_name = "UNKNOWN_SINK";
467
114k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
468
469
114k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
470
114k
        op_name = it->second;
471
114k
    }
472
114k
    _name = op_name + "_OPERATOR";
473
114k
    return Status::OK();
474
114k
}
475
476
109k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
477
109k
    std::string op_name = print_plan_node_type(tnode.node_type);
478
109k
    _nereids_id = tnode.nereids_id;
479
109k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
480
109k
    _name = substr + "_SINK_OPERATOR";
481
109k
    return Status::OK();
482
109k
}
483
484
template <typename LocalStateType>
485
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
486
472k
                                                            LocalSinkStateInfo& info) {
487
472k
    auto local_state = LocalStateType::create_unique(this, state);
488
472k
    RETURN_IF_ERROR(local_state->init(state, info));
489
472k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
472k
    return Status::OK();
491
472k
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
78.2k
                                                            LocalSinkStateInfo& info) {
487
78.2k
    auto local_state = LocalStateType::create_unique(this, state);
488
78.2k
    RETURN_IF_ERROR(local_state->init(state, info));
489
78.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
78.2k
    return Status::OK();
491
78.2k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
70.0k
                                                            LocalSinkStateInfo& info) {
487
70.0k
    auto local_state = LocalStateType::create_unique(this, state);
488
70.0k
    RETURN_IF_ERROR(local_state->init(state, info));
489
70.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
70.0k
    return Status::OK();
491
70.0k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
88
                                                            LocalSinkStateInfo& info) {
487
88
    auto local_state = LocalStateType::create_unique(this, state);
488
88
    RETURN_IF_ERROR(local_state->init(state, info));
489
88
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
88
    return Status::OK();
491
88
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
164
                                                            LocalSinkStateInfo& info) {
487
164
    auto local_state = LocalStateType::create_unique(this, state);
488
164
    RETURN_IF_ERROR(local_state->init(state, info));
489
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
164
    return Status::OK();
491
164
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
1.67k
                                                            LocalSinkStateInfo& info) {
487
1.67k
    auto local_state = LocalStateType::create_unique(this, state);
488
1.67k
    RETURN_IF_ERROR(local_state->init(state, info));
489
1.67k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
1.67k
    return Status::OK();
491
1.67k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
5.61k
                                                            LocalSinkStateInfo& info) {
487
5.61k
    auto local_state = LocalStateType::create_unique(this, state);
488
5.61k
    RETURN_IF_ERROR(local_state->init(state, info));
489
5.61k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
5.61k
    return Status::OK();
491
5.61k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
5.15k
                                                            LocalSinkStateInfo& info) {
487
5.15k
    auto local_state = LocalStateType::create_unique(this, state);
488
5.15k
    RETURN_IF_ERROR(local_state->init(state, info));
489
5.15k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
5.15k
    return Status::OK();
491
5.15k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
156
                                                            LocalSinkStateInfo& info) {
487
156
    auto local_state = LocalStateType::create_unique(this, state);
488
156
    RETURN_IF_ERROR(local_state->init(state, info));
489
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
156
    return Status::OK();
491
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
3.38k
                                                            LocalSinkStateInfo& info) {
487
3.38k
    auto local_state = LocalStateType::create_unique(this, state);
488
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
489
3.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
3.38k
    return Status::OK();
491
3.38k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
160
                                                            LocalSinkStateInfo& info) {
487
160
    auto local_state = LocalStateType::create_unique(this, state);
488
160
    RETURN_IF_ERROR(local_state->init(state, info));
489
160
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
160
    return Status::OK();
491
160
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
640
                                                            LocalSinkStateInfo& info) {
487
640
    auto local_state = LocalStateType::create_unique(this, state);
488
640
    RETURN_IF_ERROR(local_state->init(state, info));
489
640
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
640
    return Status::OK();
491
640
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
58
                                                            LocalSinkStateInfo& info) {
487
58
    auto local_state = LocalStateType::create_unique(this, state);
488
58
    RETURN_IF_ERROR(local_state->init(state, info));
489
58
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
58
    return Status::OK();
491
58
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
80
                                                            LocalSinkStateInfo& info) {
487
80
    auto local_state = LocalStateType::create_unique(this, state);
488
80
    RETURN_IF_ERROR(local_state->init(state, info));
489
80
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
80
    return Status::OK();
491
80
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
80.3k
                                                            LocalSinkStateInfo& info) {
487
80.3k
    auto local_state = LocalStateType::create_unique(this, state);
488
80.3k
    RETURN_IF_ERROR(local_state->init(state, info));
489
80.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
80.3k
    return Status::OK();
491
80.3k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
27
                                                            LocalSinkStateInfo& info) {
487
27
    auto local_state = LocalStateType::create_unique(this, state);
488
27
    RETURN_IF_ERROR(local_state->init(state, info));
489
27
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
27
    return Status::OK();
491
27
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
37.1k
                                                            LocalSinkStateInfo& info) {
487
37.1k
    auto local_state = LocalStateType::create_unique(this, state);
488
37.1k
    RETURN_IF_ERROR(local_state->init(state, info));
489
37.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
37.1k
    return Status::OK();
491
37.1k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
42.3k
                                                            LocalSinkStateInfo& info) {
487
42.3k
    auto local_state = LocalStateType::create_unique(this, state);
488
42.3k
    RETURN_IF_ERROR(local_state->init(state, info));
489
42.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
42.3k
    return Status::OK();
491
42.3k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
20
                                                            LocalSinkStateInfo& info) {
487
20
    auto local_state = LocalStateType::create_unique(this, state);
488
20
    RETURN_IF_ERROR(local_state->init(state, info));
489
20
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
20
    return Status::OK();
491
20
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
141k
                                                            LocalSinkStateInfo& info) {
487
141k
    auto local_state = LocalStateType::create_unique(this, state);
488
141k
    RETURN_IF_ERROR(local_state->init(state, info));
489
141k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
141k
    return Status::OK();
491
141k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
3.33k
                                                            LocalSinkStateInfo& info) {
487
3.33k
    auto local_state = LocalStateType::create_unique(this, state);
488
3.33k
    RETURN_IF_ERROR(local_state->init(state, info));
489
3.33k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
3.33k
    return Status::OK();
491
3.33k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
1.30k
                                                            LocalSinkStateInfo& info) {
487
1.30k
    auto local_state = LocalStateType::create_unique(this, state);
488
1.30k
    RETURN_IF_ERROR(local_state->init(state, info));
489
1.30k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
1.30k
    return Status::OK();
491
1.30k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
1.43k
                                                            LocalSinkStateInfo& info) {
487
1.43k
    auto local_state = LocalStateType::create_unique(this, state);
488
1.43k
    RETURN_IF_ERROR(local_state->init(state, info));
489
1.43k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
1.43k
    return Status::OK();
491
1.43k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
1
                                                            LocalSinkStateInfo& info) {
487
1
    auto local_state = LocalStateType::create_unique(this, state);
488
1
    RETURN_IF_ERROR(local_state->init(state, info));
489
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
1
    return Status::OK();
491
1
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
486
6
                                                            LocalSinkStateInfo& info) {
487
6
    auto local_state = LocalStateType::create_unique(this, state);
488
6
    RETURN_IF_ERROR(local_state->init(state, info));
489
6
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
490
6
    return Status::OK();
491
6
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
492
493
template <typename LocalStateType>
494
427k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
0
                                 LocalExchangeSharedState>) {
497
0
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
0
                                        MultiCastSharedState>) {
500
0
        throw Exception(Status::FatalError("should not reach here!"));
501
427k
    } else {
502
427k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
427k
        ss->id = operator_id();
504
427k
        for (auto& dest : dests_id()) {
505
427k
            ss->related_op_ids.insert(dest);
506
427k
        }
507
427k
        return ss;
508
427k
    }
509
427k
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
72.4k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
72.4k
    } else {
502
72.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
72.4k
        ss->id = operator_id();
504
72.4k
        for (auto& dest : dests_id()) {
505
72.4k
            ss->related_op_ids.insert(dest);
506
72.4k
        }
507
72.4k
        return ss;
508
72.4k
    }
509
72.4k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
70.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
70.1k
    } else {
502
70.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
70.1k
        ss->id = operator_id();
504
70.1k
        for (auto& dest : dests_id()) {
505
70.0k
            ss->related_op_ids.insert(dest);
506
70.0k
        }
507
70.1k
        return ss;
508
70.1k
    }
509
70.1k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
88
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
88
    } else {
502
88
        auto ss = LocalStateType::SharedStateType::create_shared();
503
88
        ss->id = operator_id();
504
88
        for (auto& dest : dests_id()) {
505
88
            ss->related_op_ids.insert(dest);
506
88
        }
507
88
        return ss;
508
88
    }
509
88
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
164
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
164
    } else {
502
164
        auto ss = LocalStateType::SharedStateType::create_shared();
503
164
        ss->id = operator_id();
504
164
        for (auto& dest : dests_id()) {
505
164
            ss->related_op_ids.insert(dest);
506
164
        }
507
164
        return ss;
508
164
    }
509
164
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
1.67k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
1.67k
    } else {
502
1.67k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
1.67k
        ss->id = operator_id();
504
1.67k
        for (auto& dest : dests_id()) {
505
1.67k
            ss->related_op_ids.insert(dest);
506
1.67k
        }
507
1.67k
        return ss;
508
1.67k
    }
509
1.67k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
494
5.61k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
5.61k
    } else {
502
5.61k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
5.61k
        ss->id = operator_id();
504
5.61k
        for (auto& dest : dests_id()) {
505
5.61k
            ss->related_op_ids.insert(dest);
506
5.61k
        }
507
5.61k
        return ss;
508
5.61k
    }
509
5.61k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
5.15k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
5.15k
    } else {
502
5.15k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
5.15k
        ss->id = operator_id();
504
5.15k
        for (auto& dest : dests_id()) {
505
5.15k
            ss->related_op_ids.insert(dest);
506
5.15k
        }
507
5.15k
        return ss;
508
5.15k
    }
509
5.15k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
156
    } else {
502
156
        auto ss = LocalStateType::SharedStateType::create_shared();
503
156
        ss->id = operator_id();
504
156
        for (auto& dest : dests_id()) {
505
156
            ss->related_op_ids.insert(dest);
506
156
        }
507
156
        return ss;
508
156
    }
509
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
3.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
3.38k
    } else {
502
3.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
3.38k
        ss->id = operator_id();
504
3.38k
        for (auto& dest : dests_id()) {
505
3.38k
            ss->related_op_ids.insert(dest);
506
3.38k
        }
507
3.38k
        return ss;
508
3.38k
    }
509
3.38k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
160
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
160
    } else {
502
160
        auto ss = LocalStateType::SharedStateType::create_shared();
503
160
        ss->id = operator_id();
504
160
        for (auto& dest : dests_id()) {
505
160
            ss->related_op_ids.insert(dest);
506
160
        }
507
160
        return ss;
508
160
    }
509
160
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
640
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
640
    } else {
502
640
        auto ss = LocalStateType::SharedStateType::create_shared();
503
640
        ss->id = operator_id();
504
640
        for (auto& dest : dests_id()) {
505
640
            ss->related_op_ids.insert(dest);
506
640
        }
507
640
        return ss;
508
640
    }
509
640
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
67
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
67
    } else {
502
67
        auto ss = LocalStateType::SharedStateType::create_shared();
503
67
        ss->id = operator_id();
504
67
        for (auto& dest : dests_id()) {
505
67
            ss->related_op_ids.insert(dest);
506
67
        }
507
67
        return ss;
508
67
    }
509
67
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
80
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
80
    } else {
502
80
        auto ss = LocalStateType::SharedStateType::create_shared();
503
80
        ss->id = operator_id();
504
80
        for (auto& dest : dests_id()) {
505
80
            ss->related_op_ids.insert(dest);
506
80
        }
507
80
        return ss;
508
80
    }
509
80
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
80.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
80.3k
    } else {
502
80.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
80.3k
        ss->id = operator_id();
504
80.3k
        for (auto& dest : dests_id()) {
505
80.3k
            ss->related_op_ids.insert(dest);
506
80.3k
        }
507
80.3k
        return ss;
508
80.3k
    }
509
80.3k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
29
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
29
    } else {
502
29
        auto ss = LocalStateType::SharedStateType::create_shared();
503
29
        ss->id = operator_id();
504
29
        for (auto& dest : dests_id()) {
505
29
            ss->related_op_ids.insert(dest);
506
29
        }
507
29
        return ss;
508
29
    }
509
29
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
42.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
42.3k
    } else {
502
42.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
42.3k
        ss->id = operator_id();
504
42.3k
        for (auto& dest : dests_id()) {
505
42.3k
            ss->related_op_ids.insert(dest);
506
42.3k
        }
507
42.3k
        return ss;
508
42.3k
    }
509
42.3k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
19
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
19
    } else {
502
19
        auto ss = LocalStateType::SharedStateType::create_shared();
503
19
        ss->id = operator_id();
504
19
        for (auto& dest : dests_id()) {
505
19
            ss->related_op_ids.insert(dest);
506
19
        }
507
19
        return ss;
508
19
    }
509
19
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
141k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
141k
    } else {
502
141k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
141k
        ss->id = operator_id();
504
141k
        for (auto& dest : dests_id()) {
505
141k
            ss->related_op_ids.insert(dest);
506
141k
        }
507
141k
        return ss;
508
141k
    }
509
141k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
3.33k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
3.33k
    } else {
502
3.33k
        auto ss = LocalStateType::SharedStateType::create_shared();
503
3.33k
        ss->id = operator_id();
504
3.33k
        for (auto& dest : dests_id()) {
505
3.33k
            ss->related_op_ids.insert(dest);
506
3.33k
        }
507
3.33k
        return ss;
508
3.33k
    }
509
3.33k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
102
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
102
    } else {
502
102
        auto ss = LocalStateType::SharedStateType::create_shared();
503
102
        ss->id = operator_id();
504
102
        for (auto& dest : dests_id()) {
505
102
            ss->related_op_ids.insert(dest);
506
102
        }
507
102
        return ss;
508
102
    }
509
102
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
494
7
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
7
    } else {
502
7
        auto ss = LocalStateType::SharedStateType::create_shared();
503
7
        ss->id = operator_id();
504
7
        for (auto& dest : dests_id()) {
505
7
            ss->related_op_ids.insert(dest);
506
7
        }
507
7
        return ss;
508
7
    }
509
7
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
494
5
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
5
    } else {
502
5
        auto ss = LocalStateType::SharedStateType::create_shared();
503
5
        ss->id = operator_id();
504
5
        for (auto& dest : dests_id()) {
505
5
            ss->related_op_ids.insert(dest);
506
5
        }
507
5
        return ss;
508
5
    }
509
5
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
494
6
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
495
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
496
                                 LocalExchangeSharedState>) {
497
        return nullptr;
498
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
499
                                        MultiCastSharedState>) {
500
        throw Exception(Status::FatalError("should not reach here!"));
501
6
    } else {
502
6
        auto ss = LocalStateType::SharedStateType::create_shared();
503
6
        ss->id = operator_id();
504
6
        for (auto& dest : dests_id()) {
505
6
            ss->related_op_ids.insert(dest);
506
6
        }
507
6
        return ss;
508
6
    }
509
6
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
510
511
template <typename LocalStateType>
512
444k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
444k
    auto local_state = LocalStateType::create_unique(state, this);
514
444k
    RETURN_IF_ERROR(local_state->init(state, info));
515
444k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
444k
    return Status::OK();
517
444k
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
30.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
30.2k
    auto local_state = LocalStateType::create_unique(state, this);
514
30.2k
    RETURN_IF_ERROR(local_state->init(state, info));
515
30.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
30.2k
    return Status::OK();
517
30.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
54.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
54.9k
    auto local_state = LocalStateType::create_unique(state, this);
514
54.9k
    RETURN_IF_ERROR(local_state->init(state, info));
515
54.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
54.9k
    return Status::OK();
517
54.9k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
28.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
28.8k
    auto local_state = LocalStateType::create_unique(state, this);
514
28.8k
    RETURN_IF_ERROR(local_state->init(state, info));
515
28.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
28.8k
    return Status::OK();
517
28.8k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
58
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
58
    auto local_state = LocalStateType::create_unique(state, this);
514
58
    RETURN_IF_ERROR(local_state->init(state, info));
515
58
    state->emplace_local_state(operator_id(), std::move(local_state));
516
58
    return Status::OK();
517
58
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
507
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
507
    auto local_state = LocalStateType::create_unique(state, this);
514
507
    RETURN_IF_ERROR(local_state->init(state, info));
515
507
    state->emplace_local_state(operator_id(), std::move(local_state));
516
507
    return Status::OK();
517
507
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
21
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
21
    auto local_state = LocalStateType::create_unique(state, this);
514
21
    RETURN_IF_ERROR(local_state->init(state, info));
515
21
    state->emplace_local_state(operator_id(), std::move(local_state));
516
21
    return Status::OK();
517
21
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
79.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
79.7k
    auto local_state = LocalStateType::create_unique(state, this);
514
79.7k
    RETURN_IF_ERROR(local_state->init(state, info));
515
79.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
79.7k
    return Status::OK();
517
79.7k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
42.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
42.3k
    auto local_state = LocalStateType::create_unique(state, this);
514
42.3k
    RETURN_IF_ERROR(local_state->init(state, info));
515
42.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
42.3k
    return Status::OK();
517
42.3k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
10
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
10
    auto local_state = LocalStateType::create_unique(state, this);
514
10
    RETURN_IF_ERROR(local_state->init(state, info));
515
10
    state->emplace_local_state(operator_id(), std::move(local_state));
516
10
    return Status::OK();
517
10
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
37
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
37
    auto local_state = LocalStateType::create_unique(state, this);
514
37
    RETURN_IF_ERROR(local_state->init(state, info));
515
37
    state->emplace_local_state(operator_id(), std::move(local_state));
516
37
    return Status::OK();
517
37
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
49.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
49.7k
    auto local_state = LocalStateType::create_unique(state, this);
514
49.7k
    RETURN_IF_ERROR(local_state->init(state, info));
515
49.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
49.7k
    return Status::OK();
517
49.7k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
3.33k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
3.33k
    auto local_state = LocalStateType::create_unique(state, this);
514
3.33k
    RETURN_IF_ERROR(local_state->init(state, info));
515
3.33k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
3.33k
    return Status::OK();
517
3.33k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
203
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
203
    auto local_state = LocalStateType::create_unique(state, this);
514
203
    RETURN_IF_ERROR(local_state->init(state, info));
515
203
    state->emplace_local_state(operator_id(), std::move(local_state));
516
203
    return Status::OK();
517
203
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
243
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
243
    auto local_state = LocalStateType::create_unique(state, this);
514
243
    RETURN_IF_ERROR(local_state->init(state, info));
515
243
    state->emplace_local_state(operator_id(), std::move(local_state));
516
243
    return Status::OK();
517
243
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
4.93k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
4.93k
    auto local_state = LocalStateType::create_unique(state, this);
514
4.93k
    RETURN_IF_ERROR(local_state->init(state, info));
515
4.93k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
4.93k
    return Status::OK();
517
4.93k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
4.30k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
4.30k
    auto local_state = LocalStateType::create_unique(state, this);
514
4.30k
    RETURN_IF_ERROR(local_state->init(state, info));
515
4.30k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
4.30k
    return Status::OK();
517
4.30k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
200
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
200
    auto local_state = LocalStateType::create_unique(state, this);
514
200
    RETURN_IF_ERROR(local_state->init(state, info));
515
200
    state->emplace_local_state(operator_id(), std::move(local_state));
516
200
    return Status::OK();
517
200
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
500
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
500
    auto local_state = LocalStateType::create_unique(state, this);
514
500
    RETURN_IF_ERROR(local_state->init(state, info));
515
500
    state->emplace_local_state(operator_id(), std::move(local_state));
516
500
    return Status::OK();
517
500
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
1.79k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
1.79k
    auto local_state = LocalStateType::create_unique(state, this);
514
1.79k
    RETURN_IF_ERROR(local_state->init(state, info));
515
1.79k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
1.79k
    return Status::OK();
517
1.79k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
132k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
132k
    auto local_state = LocalStateType::create_unique(state, this);
514
132k
    RETURN_IF_ERROR(local_state->init(state, info));
515
132k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
132k
    return Status::OK();
517
132k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
934
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
934
    auto local_state = LocalStateType::create_unique(state, this);
514
934
    RETURN_IF_ERROR(local_state->init(state, info));
515
934
    state->emplace_local_state(operator_id(), std::move(local_state));
516
934
    return Status::OK();
517
934
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
1.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
1.44k
    auto local_state = LocalStateType::create_unique(state, this);
514
1.44k
    RETURN_IF_ERROR(local_state->init(state, info));
515
1.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
1.44k
    return Status::OK();
517
1.44k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
6.66k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
6.66k
    auto local_state = LocalStateType::create_unique(state, this);
514
6.66k
    RETURN_IF_ERROR(local_state->init(state, info));
515
6.66k
    state->emplace_local_state(operator_id(), std::move(local_state));
516
6.66k
    return Status::OK();
517
6.66k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
512
288
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
513
288
    auto local_state = LocalStateType::create_unique(state, this);
514
288
    RETURN_IF_ERROR(local_state->init(state, info));
515
288
    state->emplace_local_state(operator_id(), std::move(local_state));
516
288
    return Status::OK();
517
288
}
518
519
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
520
                                                         RuntimeState* state)
521
473k
        : _parent(parent), _state(state) {}
522
523
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
524
444k
        : _num_rows_returned(0),
525
444k
          _rows_returned_counter(nullptr),
526
444k
          _parent(parent),
527
444k
          _state(state),
528
444k
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
529
530
template <typename SharedStateArg>
531
444k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
444k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
444k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
444k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
444k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
444k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
444k
    _operator_profile->add_child(_common_profile.get(), true);
540
444k
    _operator_profile->add_child(_custom_profile.get(), true);
541
444k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
444k
    if constexpr (!is_fake_shared) {
543
298k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
138k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
138k
                                    .first.get()
546
138k
                                    ->template cast<SharedStateArg>();
547
548
138k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
138k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
138k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
159k
        } else if (info.shared_state) {
552
155k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
0
                DCHECK(false);
554
0
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
155k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
155k
            _dependency = _shared_state->create_source_dependency(
559
155k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
155k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
155k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
155k
        } else {
563
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
18.4E
                DCHECK(false);
565
18.4E
            }
566
4.30k
        }
567
298k
    }
568
569
444k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
444k
    _rows_returned_counter =
574
444k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
444k
    _blocks_returned_counter =
576
444k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
444k
    _output_block_bytes_counter =
578
444k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
444k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
444k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
444k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
444k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
444k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
444k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
444k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
444k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
444k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
444k
    _memory_used_counter =
589
444k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
444k
    _common_profile->add_info_string("IsColocate",
591
444k
                                     std::to_string(_parent->is_colocated_operator()));
592
444k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
444k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
444k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
444k
    return Status::OK();
596
444k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
30.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
30.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
30.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
30.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
30.2k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
30.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
30.2k
    _operator_profile->add_child(_common_profile.get(), true);
540
30.2k
    _operator_profile->add_child(_custom_profile.get(), true);
541
30.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
30.2k
    if constexpr (!is_fake_shared) {
543
30.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
5.79k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
5.79k
                                    .first.get()
546
5.79k
                                    ->template cast<SharedStateArg>();
547
548
5.79k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
5.79k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
5.79k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
24.4k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
24.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
24.4k
            _dependency = _shared_state->create_source_dependency(
559
24.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
24.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
24.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
24.4k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
30.2k
    }
568
569
30.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
30.2k
    _rows_returned_counter =
574
30.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
30.2k
    _blocks_returned_counter =
576
30.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
30.2k
    _output_block_bytes_counter =
578
30.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
30.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
30.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
30.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
30.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
30.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
30.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
30.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
30.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
30.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
30.2k
    _memory_used_counter =
589
30.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
30.2k
    _common_profile->add_info_string("IsColocate",
591
30.2k
                                     std::to_string(_parent->is_colocated_operator()));
592
30.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
30.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
30.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
30.2k
    return Status::OK();
596
30.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
1
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
1
    _operator_profile->add_child(_common_profile.get(), true);
540
1
    _operator_profile->add_child(_custom_profile.get(), true);
541
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
1
    if constexpr (!is_fake_shared) {
543
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
1
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
1
            _dependency = _shared_state->create_source_dependency(
559
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
1
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
1
    }
568
569
1
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
1
    _rows_returned_counter =
574
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
1
    _blocks_returned_counter =
576
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
1
    _output_block_bytes_counter =
578
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
1
    _memory_used_counter =
589
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
1
    _common_profile->add_info_string("IsColocate",
591
1
                                     std::to_string(_parent->is_colocated_operator()));
592
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
1
    return Status::OK();
596
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
80.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
80.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
80.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
80.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
80.3k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
80.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
80.3k
    _operator_profile->add_child(_common_profile.get(), true);
540
80.3k
    _operator_profile->add_child(_custom_profile.get(), true);
541
80.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
80.3k
    if constexpr (!is_fake_shared) {
543
80.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
80.3k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
80.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
80.2k
            _dependency = _shared_state->create_source_dependency(
559
80.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
80.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
80.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
80.2k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
6
        }
567
80.3k
    }
568
569
80.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
80.3k
    _rows_returned_counter =
574
80.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
80.3k
    _blocks_returned_counter =
576
80.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
80.3k
    _output_block_bytes_counter =
578
80.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
80.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
80.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
80.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
80.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
80.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
80.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
80.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
80.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
80.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
80.3k
    _memory_used_counter =
589
80.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
80.3k
    _common_profile->add_info_string("IsColocate",
591
80.3k
                                     std::to_string(_parent->is_colocated_operator()));
592
80.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
80.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
80.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
80.3k
    return Status::OK();
596
80.3k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
21
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
21
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
21
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
21
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
21
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
21
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
21
    _operator_profile->add_child(_common_profile.get(), true);
540
21
    _operator_profile->add_child(_custom_profile.get(), true);
541
21
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
21
    if constexpr (!is_fake_shared) {
543
21
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
21
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
21
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
21
            _dependency = _shared_state->create_source_dependency(
559
21
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
21
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
21
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
21
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
21
    }
568
569
21
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
21
    _rows_returned_counter =
574
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
21
    _blocks_returned_counter =
576
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
21
    _output_block_bytes_counter =
578
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
21
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
21
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
21
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
21
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
21
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
21
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
21
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
21
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
21
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
21
    _memory_used_counter =
589
21
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
21
    _common_profile->add_info_string("IsColocate",
591
21
                                     std::to_string(_parent->is_colocated_operator()));
592
21
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
21
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
21
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
21
    return Status::OK();
596
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
3.33k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
3.33k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
3.33k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
3.33k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
3.33k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
3.33k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
3.33k
    _operator_profile->add_child(_common_profile.get(), true);
540
3.33k
    _operator_profile->add_child(_custom_profile.get(), true);
541
3.33k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
3.33k
    if constexpr (!is_fake_shared) {
543
3.33k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
3.33k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
3.33k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
3.33k
            _dependency = _shared_state->create_source_dependency(
559
3.33k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
3.33k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
3.33k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
3.33k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
3.33k
    }
568
569
3.33k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
3.33k
    _rows_returned_counter =
574
3.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
3.33k
    _blocks_returned_counter =
576
3.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
3.33k
    _output_block_bytes_counter =
578
3.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
3.33k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
3.33k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
3.33k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
3.33k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
3.33k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
3.33k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
3.33k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
3.33k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
3.33k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
3.33k
    _memory_used_counter =
589
3.33k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
3.33k
    _common_profile->add_info_string("IsColocate",
591
3.33k
                                     std::to_string(_parent->is_colocated_operator()));
592
3.33k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
3.33k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
3.33k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
3.33k
    return Status::OK();
596
3.33k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
67
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
67
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
67
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
67
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
67
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
67
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
67
    _operator_profile->add_child(_common_profile.get(), true);
540
67
    _operator_profile->add_child(_custom_profile.get(), true);
541
67
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
67
    if constexpr (!is_fake_shared) {
543
67
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
67
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
67
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
67
            _dependency = _shared_state->create_source_dependency(
559
67
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
67
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
67
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
67
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
67
    }
568
569
67
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
67
    _rows_returned_counter =
574
67
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
67
    _blocks_returned_counter =
576
67
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
67
    _output_block_bytes_counter =
578
67
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
67
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
67
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
67
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
67
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
67
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
67
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
67
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
67
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
67
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
67
    _memory_used_counter =
589
67
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
67
    _common_profile->add_info_string("IsColocate",
591
67
                                     std::to_string(_parent->is_colocated_operator()));
592
67
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
67
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
67
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
67
    return Status::OK();
596
67
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
42.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
42.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
42.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
42.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
42.3k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
42.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
42.3k
    _operator_profile->add_child(_common_profile.get(), true);
540
42.3k
    _operator_profile->add_child(_custom_profile.get(), true);
541
42.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
42.3k
    if constexpr (!is_fake_shared) {
543
42.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
42.3k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
42.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
42.3k
            _dependency = _shared_state->create_source_dependency(
559
42.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
42.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
42.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
42.3k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
9
        }
567
42.3k
    }
568
569
42.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
42.3k
    _rows_returned_counter =
574
42.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
42.3k
    _blocks_returned_counter =
576
42.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
42.3k
    _output_block_bytes_counter =
578
42.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
42.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
42.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
42.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
42.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
42.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
42.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
42.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
42.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
42.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
42.3k
    _memory_used_counter =
589
42.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
42.3k
    _common_profile->add_info_string("IsColocate",
591
42.3k
                                     std::to_string(_parent->is_colocated_operator()));
592
42.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
42.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
42.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
42.3k
    return Status::OK();
596
42.3k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
10
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
10
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
10
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
10
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
10
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
10
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
10
    _operator_profile->add_child(_common_profile.get(), true);
540
10
    _operator_profile->add_child(_custom_profile.get(), true);
541
10
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
10
    if constexpr (!is_fake_shared) {
543
10
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
10
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
10
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
10
            _dependency = _shared_state->create_source_dependency(
559
10
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
10
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
10
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
10
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
10
    }
568
569
10
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
10
    _rows_returned_counter =
574
10
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
10
    _blocks_returned_counter =
576
10
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
10
    _output_block_bytes_counter =
578
10
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
10
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
10
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
10
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
10
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
10
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
10
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
10
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
10
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
10
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
10
    _memory_used_counter =
589
10
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
10
    _common_profile->add_info_string("IsColocate",
591
10
                                     std::to_string(_parent->is_colocated_operator()));
592
10
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
10
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
10
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
10
    return Status::OK();
596
10
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
145k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
145k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
145k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
145k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
145k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
145k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
145k
    _operator_profile->add_child(_common_profile.get(), true);
540
145k
    _operator_profile->add_child(_custom_profile.get(), true);
541
145k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
    if constexpr (!is_fake_shared) {
543
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
                                    .first.get()
546
                                    ->template cast<SharedStateArg>();
547
548
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
            _dependency = _shared_state->create_source_dependency(
559
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
        }
567
    }
568
569
145k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
145k
    _rows_returned_counter =
574
145k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
145k
    _blocks_returned_counter =
576
145k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
145k
    _output_block_bytes_counter =
578
145k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
145k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
145k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
145k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
145k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
145k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
145k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
145k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
145k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
145k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
145k
    _memory_used_counter =
589
145k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
145k
    _common_profile->add_info_string("IsColocate",
591
145k
                                     std::to_string(_parent->is_colocated_operator()));
592
145k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
145k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
145k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
145k
    return Status::OK();
596
145k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
4.93k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
4.93k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
4.93k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
4.93k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
4.93k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
4.93k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
4.93k
    _operator_profile->add_child(_common_profile.get(), true);
540
4.93k
    _operator_profile->add_child(_custom_profile.get(), true);
541
4.93k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
4.93k
    if constexpr (!is_fake_shared) {
543
4.93k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
4.93k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
635
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
635
            _dependency = _shared_state->create_source_dependency(
559
635
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
635
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
635
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
4.29k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
4.29k
        }
567
4.93k
    }
568
569
4.93k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
4.93k
    _rows_returned_counter =
574
4.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
4.93k
    _blocks_returned_counter =
576
4.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
4.93k
    _output_block_bytes_counter =
578
4.93k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
4.93k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
4.93k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
4.93k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
4.93k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
4.93k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
4.93k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
4.93k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
4.93k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
4.93k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
4.93k
    _memory_used_counter =
589
4.93k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
4.93k
    _common_profile->add_info_string("IsColocate",
591
4.93k
                                     std::to_string(_parent->is_colocated_operator()));
592
4.93k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
4.93k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
4.93k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
4.93k
    return Status::OK();
596
4.93k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
3
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
3
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
3
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
3
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
3
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
3
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
3
    _operator_profile->add_child(_common_profile.get(), true);
540
3
    _operator_profile->add_child(_custom_profile.get(), true);
541
3
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
3
    if constexpr (!is_fake_shared) {
543
3
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
3
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
3
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
3
            _dependency = _shared_state->create_source_dependency(
559
3
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
3
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
3
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
3
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
3
    }
568
569
3
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
3
    _rows_returned_counter =
574
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
3
    _blocks_returned_counter =
576
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
3
    _output_block_bytes_counter =
578
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
3
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
3
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
3
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
3
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
3
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
3
    _memory_used_counter =
589
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
3
    _common_profile->add_info_string("IsColocate",
591
3
                                     std::to_string(_parent->is_colocated_operator()));
592
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
3
    return Status::OK();
596
3
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
4.30k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
4.30k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
4.30k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
4.30k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
4.30k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
4.30k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
4.30k
    _operator_profile->add_child(_common_profile.get(), true);
540
4.30k
    _operator_profile->add_child(_custom_profile.get(), true);
541
4.30k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
4.30k
    if constexpr (!is_fake_shared) {
543
4.30k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
4.30k
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
4.30k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
4.30k
            _dependency = _shared_state->create_source_dependency(
559
4.30k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
4.30k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
4.30k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
4.30k
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
4.30k
    }
568
569
4.30k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
4.30k
    _rows_returned_counter =
574
4.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
4.30k
    _blocks_returned_counter =
576
4.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
4.30k
    _output_block_bytes_counter =
578
4.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
4.30k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
4.30k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
4.30k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
4.30k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
4.30k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
4.30k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
4.30k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
4.30k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
4.30k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
4.30k
    _memory_used_counter =
589
4.30k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
4.30k
    _common_profile->add_info_string("IsColocate",
591
4.30k
                                     std::to_string(_parent->is_colocated_operator()));
592
4.30k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
4.30k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
4.30k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
4.30k
    return Status::OK();
596
4.30k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
102
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
102
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
102
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
102
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
102
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
102
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
102
    _operator_profile->add_child(_common_profile.get(), true);
540
102
    _operator_profile->add_child(_custom_profile.get(), true);
541
102
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
102
    if constexpr (!is_fake_shared) {
543
102
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
102
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
102
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
102
            _dependency = _shared_state->create_source_dependency(
559
102
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
102
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
102
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
102
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
102
    }
568
569
102
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
102
    _rows_returned_counter =
574
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
102
    _blocks_returned_counter =
576
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
102
    _output_block_bytes_counter =
578
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
102
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
102
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
102
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
102
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
102
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
102
    _memory_used_counter =
589
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
102
    _common_profile->add_info_string("IsColocate",
591
102
                                     std::to_string(_parent->is_colocated_operator()));
592
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
102
    return Status::OK();
596
102
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
12
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
12
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
12
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
12
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
12
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
12
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
12
    _operator_profile->add_child(_common_profile.get(), true);
540
12
    _operator_profile->add_child(_custom_profile.get(), true);
541
12
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
12
    if constexpr (!is_fake_shared) {
543
12
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
0
                                    .first.get()
546
0
                                    ->template cast<SharedStateArg>();
547
548
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
12
        } else if (info.shared_state) {
552
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
                DCHECK(false);
554
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
12
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
12
            _dependency = _shared_state->create_source_dependency(
559
12
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
12
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
12
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
12
        } else {
563
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
                DCHECK(false);
565
            }
566
0
        }
567
12
    }
568
569
12
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
12
    _rows_returned_counter =
574
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
12
    _blocks_returned_counter =
576
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
12
    _output_block_bytes_counter =
578
12
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
12
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
12
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
12
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
12
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
12
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
12
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
12
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
12
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
12
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
12
    _memory_used_counter =
589
12
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
12
    _common_profile->add_info_string("IsColocate",
591
12
                                     std::to_string(_parent->is_colocated_operator()));
592
12
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
12
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
12
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
12
    return Status::OK();
596
12
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
531
132k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
532
132k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
533
132k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
534
132k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
535
132k
    _operator_profile->set_metadata(_parent->node_id());
536
    // indent is false so that source operator will have same
537
    // indentation_level with its parent operator.
538
132k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
539
132k
    _operator_profile->add_child(_common_profile.get(), true);
540
132k
    _operator_profile->add_child(_custom_profile.get(), true);
541
132k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
542
132k
    if constexpr (!is_fake_shared) {
543
132k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
544
132k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
545
132k
                                    .first.get()
546
132k
                                    ->template cast<SharedStateArg>();
547
548
132k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
549
132k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
550
132k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
551
18.4E
        } else if (info.shared_state) {
552
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
553
0
                DCHECK(false);
554
0
            }
555
            // For UnionSourceOperator without children, there is no shared state.
556
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
557
558
0
            _dependency = _shared_state->create_source_dependency(
559
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
560
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
561
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
562
18.4E
        } else {
563
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
564
18.4E
                DCHECK(false);
565
18.4E
            }
566
18.4E
        }
567
132k
    }
568
569
132k
    if (must_set_shared_state() && _shared_state == nullptr) {
570
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
571
0
    }
572
573
132k
    _rows_returned_counter =
574
132k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
575
132k
    _blocks_returned_counter =
576
132k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
577
132k
    _output_block_bytes_counter =
578
132k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
579
132k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
580
132k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
581
132k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
582
132k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
583
132k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
584
132k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
585
132k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
586
132k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
587
132k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
588
132k
    _memory_used_counter =
589
132k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
590
132k
    _common_profile->add_info_string("IsColocate",
591
132k
                                     std::to_string(_parent->is_colocated_operator()));
592
132k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
593
132k
    _common_profile->add_info_string("FollowedByShuffledOperator",
594
132k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
595
132k
    return Status::OK();
596
132k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
597
598
template <typename SharedStateArg>
599
443k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
443k
    _conjuncts.resize(_parent->_conjuncts.size());
601
443k
    _projections.resize(_parent->_projections.size());
602
640k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
197k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
197k
    }
605
1.37M
    for (size_t i = 0; i < _projections.size(); i++) {
606
929k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
929k
    }
608
443k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
447k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
3.87k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
29.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
25.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
25.2k
                    state, _intermediate_projections[i][j]));
614
25.2k
        }
615
3.87k
    }
616
443k
    return Status::OK();
617
443k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
30.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
30.2k
    _conjuncts.resize(_parent->_conjuncts.size());
601
30.2k
    _projections.resize(_parent->_projections.size());
602
30.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
112k
    for (size_t i = 0; i < _projections.size(); i++) {
606
82.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
82.7k
    }
608
30.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
31.0k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
800
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
9.90k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
9.10k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
9.10k
                    state, _intermediate_projections[i][j]));
614
9.10k
        }
615
800
    }
616
30.2k
    return Status::OK();
617
30.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
3
    _conjuncts.resize(_parent->_conjuncts.size());
601
3
    _projections.resize(_parent->_projections.size());
602
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
3
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
3
    return Status::OK();
617
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
80.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
80.2k
    _conjuncts.resize(_parent->_conjuncts.size());
601
80.2k
    _projections.resize(_parent->_projections.size());
602
80.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
80.2k
    for (size_t i = 0; i < _projections.size(); i++) {
606
72
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
72
    }
608
80.2k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
80.2k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
80.2k
    return Status::OK();
617
80.2k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
21
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
21
    _conjuncts.resize(_parent->_conjuncts.size());
601
21
    _projections.resize(_parent->_projections.size());
602
21
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
21
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
21
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
21
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
21
    return Status::OK();
617
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
3.33k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
3.33k
    _conjuncts.resize(_parent->_conjuncts.size());
601
3.33k
    _projections.resize(_parent->_projections.size());
602
3.33k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
29.6k
    for (size_t i = 0; i < _projections.size(); i++) {
606
26.2k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
26.2k
    }
608
3.33k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
3.46k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
128
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
760
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
632
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
632
                    state, _intermediate_projections[i][j]));
614
632
        }
615
128
    }
616
3.33k
    return Status::OK();
617
3.33k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
67
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
67
    _conjuncts.resize(_parent->_conjuncts.size());
601
67
    _projections.resize(_parent->_projections.size());
602
67
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
155
    for (size_t i = 0; i < _projections.size(); i++) {
606
88
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
88
    }
608
67
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
67
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
67
    return Status::OK();
617
67
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
42.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
42.3k
    _conjuncts.resize(_parent->_conjuncts.size());
601
42.3k
    _projections.resize(_parent->_projections.size());
602
44.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
2.49k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
2.49k
    }
605
88.1k
    for (size_t i = 0; i < _projections.size(); i++) {
606
45.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
45.7k
    }
608
42.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
42.4k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
114
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
840
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
726
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
726
                    state, _intermediate_projections[i][j]));
614
726
        }
615
114
    }
616
42.3k
    return Status::OK();
617
42.3k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
14
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
14
    _conjuncts.resize(_parent->_conjuncts.size());
601
14
    _projections.resize(_parent->_projections.size());
602
14
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
14
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
14
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
14
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
14
    return Status::OK();
617
14
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
145k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
145k
    _conjuncts.resize(_parent->_conjuncts.size());
601
145k
    _projections.resize(_parent->_projections.size());
602
338k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
192k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
192k
    }
605
911k
    for (size_t i = 0; i < _projections.size(); i++) {
606
765k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
765k
    }
608
145k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
148k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
2.83k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
17.6k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
14.7k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
14.7k
                    state, _intermediate_projections[i][j]));
614
14.7k
        }
615
2.83k
    }
616
145k
    return Status::OK();
617
145k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
4.93k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
4.93k
    _conjuncts.resize(_parent->_conjuncts.size());
601
4.93k
    _projections.resize(_parent->_projections.size());
602
4.93k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
14.0k
    for (size_t i = 0; i < _projections.size(); i++) {
606
9.15k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
9.15k
    }
608
4.93k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
4.93k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
4.93k
    return Status::OK();
617
4.93k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
3
    _conjuncts.resize(_parent->_conjuncts.size());
601
3
    _projections.resize(_parent->_projections.size());
602
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
3
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
3
    return Status::OK();
617
3
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
4.30k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
4.30k
    _conjuncts.resize(_parent->_conjuncts.size());
601
4.30k
    _projections.resize(_parent->_projections.size());
602
6.70k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
2.40k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
2.40k
    }
605
4.30k
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
4.30k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
4.30k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
4.30k
    return Status::OK();
617
4.30k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
102
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
102
    _conjuncts.resize(_parent->_conjuncts.size());
601
102
    _projections.resize(_parent->_projections.size());
602
102
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
102
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
102
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
102
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
102
    return Status::OK();
617
102
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
12
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
12
    _conjuncts.resize(_parent->_conjuncts.size());
601
12
    _projections.resize(_parent->_projections.size());
602
12
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
12
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
12
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
12
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
12
    return Status::OK();
617
12
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
599
132k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
600
132k
    _conjuncts.resize(_parent->_conjuncts.size());
601
132k
    _projections.resize(_parent->_projections.size());
602
132k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
603
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
604
0
    }
605
132k
    for (size_t i = 0; i < _projections.size(); i++) {
606
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
607
0
    }
608
132k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
609
132k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
610
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
611
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
612
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
613
0
                    state, _intermediate_projections[i][j]));
614
0
        }
615
0
    }
616
132k
    return Status::OK();
617
132k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
618
619
template <typename SharedStateArg>
620
2.00k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
2.00k
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
2.00k
    _terminated = true;
625
2.00k
    return Status::OK();
626
2.00k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
62
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
62
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
62
    _terminated = true;
625
62
    return Status::OK();
626
62
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
42
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
42
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
42
    _terminated = true;
625
42
    return Status::OK();
626
42
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
22
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
22
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
22
    _terminated = true;
625
22
    return Status::OK();
626
22
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
1.47k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
1.47k
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
1.47k
    _terminated = true;
625
1.47k
    return Status::OK();
626
1.47k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
620
404
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
621
404
    if (_terminated) {
622
0
        return Status::OK();
623
0
    }
624
404
    _terminated = true;
625
404
    return Status::OK();
626
404
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
627
628
template <typename SharedStateArg>
629
526k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
526k
    if (_closed) {
631
83.3k
        return Status::OK();
632
83.3k
    }
633
443k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
297k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
297k
    }
636
443k
    _closed = true;
637
443k
    return Status::OK();
638
526k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
30.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
30.1k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
30.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
30.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
30.1k
    }
636
30.1k
    _closed = true;
637
30.1k
    return Status::OK();
638
30.1k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
3
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
3
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
3
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
3
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
3
    }
636
3
    _closed = true;
637
3
    return Status::OK();
638
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
159k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
159k
    if (_closed) {
631
79.8k
        return Status::OK();
632
79.8k
    }
633
79.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
79.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
79.7k
    }
636
79.7k
    _closed = true;
637
79.7k
    return Status::OK();
638
159k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
21
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
21
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
21
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
21
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
21
    }
636
21
    _closed = true;
637
21
    return Status::OK();
638
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
3.33k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
3.33k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
3.33k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
3.33k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
3.33k
    }
636
3.33k
    _closed = true;
637
3.33k
    return Status::OK();
638
3.33k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
113
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
113
    if (_closed) {
631
54
        return Status::OK();
632
54
    }
633
59
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
59
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
59
    }
636
59
    _closed = true;
637
59
    return Status::OK();
638
113
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
42.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
42.3k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
42.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
42.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
42.3k
    }
636
42.3k
    _closed = true;
637
42.3k
    return Status::OK();
638
42.3k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
9
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
9
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
9
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
9
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
9
    }
636
9
    _closed = true;
637
9
    return Status::OK();
638
9
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
149k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
149k
    if (_closed) {
631
3.38k
        return Status::OK();
632
3.38k
    }
633
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
    }
636
145k
    _closed = true;
637
145k
    return Status::OK();
638
149k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
4.93k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
4.93k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
4.93k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
4.93k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
4.93k
    }
636
4.93k
    _closed = true;
637
4.93k
    return Status::OK();
638
4.93k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
4.30k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
4.30k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
4.30k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
4.30k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
4.30k
    }
636
4.30k
    _closed = true;
637
4.30k
    return Status::OK();
638
4.30k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
629
132k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
630
132k
    if (_closed) {
631
0
        return Status::OK();
632
0
    }
633
132k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
634
132k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
635
132k
    }
636
132k
    _closed = true;
637
132k
    return Status::OK();
638
132k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
639
640
template <typename SharedState>
641
472k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
472k
    _operator_profile =
644
472k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
472k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
472k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
472k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
472k
    _operator_profile->add_child(_common_profile, true);
653
472k
    _operator_profile->add_child(_custom_profile, true);
654
655
472k
    _operator_profile->set_metadata(_parent->node_id());
656
472k
    _wait_for_finish_dependency_timer =
657
472k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
472k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
472k
    if constexpr (!is_fake_shared) {
660
331k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
331k
            info.shared_state_map.end()) {
662
42.9k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
37.1k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
37.1k
            }
665
42.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
42.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
42.9k
                                                  ? 0
668
42.9k
                                                  : info.task_idx]
669
42.9k
                                  .get();
670
42.9k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
288k
        } else {
672
288k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
2
                DCHECK(false);
674
2
            }
675
288k
            _shared_state = info.shared_state->template cast<SharedState>();
676
288k
            _dependency = _shared_state->create_sink_dependency(
677
288k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
288k
        }
679
331k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
331k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
331k
    }
682
683
472k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
472k
    _rows_input_counter =
688
472k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
472k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
472k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
472k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
472k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
472k
    _memory_used_counter =
694
472k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
472k
    _common_profile->add_info_string("IsColocate",
696
472k
                                     std::to_string(_parent->is_colocated_operator()));
697
472k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
472k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
472k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
472k
    return Status::OK();
701
472k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
78.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
78.2k
    _operator_profile =
644
78.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
78.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
78.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
78.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
78.2k
    _operator_profile->add_child(_common_profile, true);
653
78.2k
    _operator_profile->add_child(_custom_profile, true);
654
655
78.2k
    _operator_profile->set_metadata(_parent->node_id());
656
78.2k
    _wait_for_finish_dependency_timer =
657
78.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
78.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
78.2k
    if constexpr (!is_fake_shared) {
660
78.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
78.2k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
5.79k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
5.79k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
5.79k
                                                  ? 0
668
5.79k
                                                  : info.task_idx]
669
5.79k
                                  .get();
670
5.79k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
72.4k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
72.4k
            _shared_state = info.shared_state->template cast<SharedState>();
676
72.4k
            _dependency = _shared_state->create_sink_dependency(
677
72.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
72.4k
        }
679
78.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
78.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
78.2k
    }
682
683
78.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
78.2k
    _rows_input_counter =
688
78.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
78.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
78.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
78.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
78.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
78.2k
    _memory_used_counter =
694
78.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
78.2k
    _common_profile->add_info_string("IsColocate",
696
78.2k
                                     std::to_string(_parent->is_colocated_operator()));
697
78.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
78.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
78.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
78.2k
    return Status::OK();
701
78.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
2
    _operator_profile =
644
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
2
    _operator_profile->add_child(_common_profile, true);
653
2
    _operator_profile->add_child(_custom_profile, true);
654
655
2
    _operator_profile->set_metadata(_parent->node_id());
656
2
    _wait_for_finish_dependency_timer =
657
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
2
    if constexpr (!is_fake_shared) {
660
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
2
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
2
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
2
            _shared_state = info.shared_state->template cast<SharedState>();
676
2
            _dependency = _shared_state->create_sink_dependency(
677
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
2
        }
679
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
2
    }
682
683
2
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
2
    _rows_input_counter =
688
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
2
    _memory_used_counter =
694
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
2
    _common_profile->add_info_string("IsColocate",
696
2
                                     std::to_string(_parent->is_colocated_operator()));
697
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
2
    return Status::OK();
701
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
80.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
80.3k
    _operator_profile =
644
80.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
80.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
80.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
80.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
80.3k
    _operator_profile->add_child(_common_profile, true);
653
80.3k
    _operator_profile->add_child(_custom_profile, true);
654
655
80.3k
    _operator_profile->set_metadata(_parent->node_id());
656
80.3k
    _wait_for_finish_dependency_timer =
657
80.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
80.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
80.3k
    if constexpr (!is_fake_shared) {
660
80.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
80.3k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
80.3k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
80.3k
            _shared_state = info.shared_state->template cast<SharedState>();
676
80.3k
            _dependency = _shared_state->create_sink_dependency(
677
80.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
80.3k
        }
679
80.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
80.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
80.3k
    }
682
683
80.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
80.3k
    _rows_input_counter =
688
80.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
80.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
80.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
80.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
80.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
80.3k
    _memory_used_counter =
694
80.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
80.3k
    _common_profile->add_info_string("IsColocate",
696
80.3k
                                     std::to_string(_parent->is_colocated_operator()));
697
80.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
80.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
80.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
80.3k
    return Status::OK();
701
80.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
27
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
27
    _operator_profile =
644
27
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
27
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
27
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
27
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
27
    _operator_profile->add_child(_common_profile, true);
653
27
    _operator_profile->add_child(_custom_profile, true);
654
655
27
    _operator_profile->set_metadata(_parent->node_id());
656
27
    _wait_for_finish_dependency_timer =
657
27
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
27
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
27
    if constexpr (!is_fake_shared) {
660
27
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
27
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
27
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
27
            _shared_state = info.shared_state->template cast<SharedState>();
676
27
            _dependency = _shared_state->create_sink_dependency(
677
27
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
27
        }
679
27
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
27
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
27
    }
682
683
27
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
27
    _rows_input_counter =
688
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
27
    _memory_used_counter =
694
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
27
    _common_profile->add_info_string("IsColocate",
696
27
                                     std::to_string(_parent->is_colocated_operator()));
697
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
27
    return Status::OK();
701
27
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
3.33k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
3.33k
    _operator_profile =
644
3.33k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
3.33k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
3.33k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
3.33k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
3.33k
    _operator_profile->add_child(_common_profile, true);
653
3.33k
    _operator_profile->add_child(_custom_profile, true);
654
655
3.33k
    _operator_profile->set_metadata(_parent->node_id());
656
3.33k
    _wait_for_finish_dependency_timer =
657
3.33k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
3.33k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
3.33k
    if constexpr (!is_fake_shared) {
660
3.33k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
3.33k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
3.33k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
3.33k
            _shared_state = info.shared_state->template cast<SharedState>();
676
3.33k
            _dependency = _shared_state->create_sink_dependency(
677
3.33k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
3.33k
        }
679
3.33k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
3.33k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
3.33k
    }
682
683
3.33k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
3.33k
    _rows_input_counter =
688
3.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
3.33k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
3.33k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
3.33k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
3.33k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
3.33k
    _memory_used_counter =
694
3.33k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
3.33k
    _common_profile->add_info_string("IsColocate",
696
3.33k
                                     std::to_string(_parent->is_colocated_operator()));
697
3.33k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
3.33k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
3.33k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
3.33k
    return Status::OK();
701
3.33k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
67
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
67
    _operator_profile =
644
67
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
67
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
67
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
67
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
67
    _operator_profile->add_child(_common_profile, true);
653
67
    _operator_profile->add_child(_custom_profile, true);
654
655
67
    _operator_profile->set_metadata(_parent->node_id());
656
67
    _wait_for_finish_dependency_timer =
657
67
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
67
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
67
    if constexpr (!is_fake_shared) {
660
67
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
67
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
67
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
67
            _shared_state = info.shared_state->template cast<SharedState>();
676
67
            _dependency = _shared_state->create_sink_dependency(
677
67
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
67
        }
679
67
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
67
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
67
    }
682
683
67
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
67
    _rows_input_counter =
688
67
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
67
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
67
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
67
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
67
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
67
    _memory_used_counter =
694
67
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
67
    _common_profile->add_info_string("IsColocate",
696
67
                                     std::to_string(_parent->is_colocated_operator()));
697
67
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
67
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
67
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
67
    return Status::OK();
701
67
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
42.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
42.3k
    _operator_profile =
644
42.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
42.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
42.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
42.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
42.3k
    _operator_profile->add_child(_common_profile, true);
653
42.3k
    _operator_profile->add_child(_custom_profile, true);
654
655
42.3k
    _operator_profile->set_metadata(_parent->node_id());
656
42.3k
    _wait_for_finish_dependency_timer =
657
42.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
42.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
42.3k
    if constexpr (!is_fake_shared) {
660
42.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
42.3k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
42.3k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
42.3k
            _shared_state = info.shared_state->template cast<SharedState>();
676
42.3k
            _dependency = _shared_state->create_sink_dependency(
677
42.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
42.3k
        }
679
42.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
42.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
42.3k
    }
682
683
42.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
42.3k
    _rows_input_counter =
688
42.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
42.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
42.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
42.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
42.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
42.3k
    _memory_used_counter =
694
42.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
42.3k
    _common_profile->add_info_string("IsColocate",
696
42.3k
                                     std::to_string(_parent->is_colocated_operator()));
697
42.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
42.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
42.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
42.3k
    return Status::OK();
701
42.3k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
20
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
20
    _operator_profile =
644
20
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
20
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
20
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
20
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
20
    _operator_profile->add_child(_common_profile, true);
653
20
    _operator_profile->add_child(_custom_profile, true);
654
655
20
    _operator_profile->set_metadata(_parent->node_id());
656
20
    _wait_for_finish_dependency_timer =
657
20
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
20
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
20
    if constexpr (!is_fake_shared) {
660
20
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
20
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
20
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
20
            _shared_state = info.shared_state->template cast<SharedState>();
676
20
            _dependency = _shared_state->create_sink_dependency(
677
20
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
20
        }
679
20
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
20
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
20
    }
682
683
20
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
20
    _rows_input_counter =
688
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
20
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
20
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
20
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
20
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
20
    _memory_used_counter =
694
20
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
20
    _common_profile->add_info_string("IsColocate",
696
20
                                     std::to_string(_parent->is_colocated_operator()));
697
20
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
20
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
20
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
20
    return Status::OK();
701
20
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
141k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
141k
    _operator_profile =
644
141k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
141k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
141k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
141k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
141k
    _operator_profile->add_child(_common_profile, true);
653
141k
    _operator_profile->add_child(_custom_profile, true);
654
655
141k
    _operator_profile->set_metadata(_parent->node_id());
656
141k
    _wait_for_finish_dependency_timer =
657
141k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
141k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
    if constexpr (!is_fake_shared) {
660
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
                                                  ? 0
668
                                                  : info.task_idx]
669
                                  .get();
670
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
            _shared_state = info.shared_state->template cast<SharedState>();
676
            _dependency = _shared_state->create_sink_dependency(
677
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
        }
679
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
    }
682
683
141k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
141k
    _rows_input_counter =
688
141k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
141k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
141k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
141k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
141k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
141k
    _memory_used_counter =
694
141k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
141k
    _common_profile->add_info_string("IsColocate",
696
141k
                                     std::to_string(_parent->is_colocated_operator()));
697
141k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
141k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
141k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
141k
    return Status::OK();
701
141k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
1.30k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
1.30k
    _operator_profile =
644
1.30k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
1.30k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
1.30k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
1.30k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
1.30k
    _operator_profile->add_child(_common_profile, true);
653
1.30k
    _operator_profile->add_child(_custom_profile, true);
654
655
1.30k
    _operator_profile->set_metadata(_parent->node_id());
656
1.30k
    _wait_for_finish_dependency_timer =
657
1.30k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
1.30k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
1.30k
    if constexpr (!is_fake_shared) {
660
1.30k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
1.30k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
1.30k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
1.30k
            _shared_state = info.shared_state->template cast<SharedState>();
676
1.30k
            _dependency = _shared_state->create_sink_dependency(
677
1.30k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
1.30k
        }
679
1.30k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
1.30k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
1.30k
    }
682
683
1.30k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
1.30k
    _rows_input_counter =
688
1.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
1.30k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
1.30k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
1.30k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
1.30k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
1.30k
    _memory_used_counter =
694
1.30k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
1.30k
    _common_profile->add_info_string("IsColocate",
696
1.30k
                                     std::to_string(_parent->is_colocated_operator()));
697
1.30k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
1.30k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
1.30k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
1.30k
    return Status::OK();
701
1.30k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
102
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
102
    _operator_profile =
644
102
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
102
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
102
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
102
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
102
    _operator_profile->add_child(_common_profile, true);
653
102
    _operator_profile->add_child(_custom_profile, true);
654
655
102
    _operator_profile->set_metadata(_parent->node_id());
656
102
    _wait_for_finish_dependency_timer =
657
102
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
102
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
102
    if constexpr (!is_fake_shared) {
660
102
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
102
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
102
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
102
            _shared_state = info.shared_state->template cast<SharedState>();
676
102
            _dependency = _shared_state->create_sink_dependency(
677
102
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
102
        }
679
102
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
102
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
102
    }
682
683
102
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
102
    _rows_input_counter =
688
102
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
102
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
102
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
102
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
102
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
102
    _memory_used_counter =
694
102
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
102
    _common_profile->add_info_string("IsColocate",
696
102
                                     std::to_string(_parent->is_colocated_operator()));
697
102
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
102
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
102
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
102
    return Status::OK();
701
102
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
1.43k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
1.43k
    _operator_profile =
644
1.43k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
1.43k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
1.43k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
1.43k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
1.43k
    _operator_profile->add_child(_common_profile, true);
653
1.43k
    _operator_profile->add_child(_custom_profile, true);
654
655
1.43k
    _operator_profile->set_metadata(_parent->node_id());
656
1.43k
    _wait_for_finish_dependency_timer =
657
1.43k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
1.43k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
1.43k
    if constexpr (!is_fake_shared) {
660
1.43k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
1.43k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
1.43k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
1.43k
            _shared_state = info.shared_state->template cast<SharedState>();
676
1.43k
            _dependency = _shared_state->create_sink_dependency(
677
1.43k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
1.43k
        }
679
1.43k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
1.43k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
1.43k
    }
682
683
1.43k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
1.43k
    _rows_input_counter =
688
1.43k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
1.43k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
1.43k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
1.43k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
1.43k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
1.43k
    _memory_used_counter =
694
1.43k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
1.43k
    _common_profile->add_info_string("IsColocate",
696
1.43k
                                     std::to_string(_parent->is_colocated_operator()));
697
1.43k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
1.43k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
1.43k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
1.43k
    return Status::OK();
701
1.43k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
27
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
27
    _operator_profile =
644
27
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
27
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
27
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
27
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
27
    _operator_profile->add_child(_common_profile, true);
653
27
    _operator_profile->add_child(_custom_profile, true);
654
655
27
    _operator_profile->set_metadata(_parent->node_id());
656
27
    _wait_for_finish_dependency_timer =
657
27
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
27
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
27
    if constexpr (!is_fake_shared) {
660
27
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
27
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
27
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
27
            _shared_state = info.shared_state->template cast<SharedState>();
676
27
            _dependency = _shared_state->create_sink_dependency(
677
27
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
27
        }
679
27
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
27
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
27
    }
682
683
27
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
27
    _rows_input_counter =
688
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
27
    _memory_used_counter =
694
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
27
    _common_profile->add_info_string("IsColocate",
696
27
                                     std::to_string(_parent->is_colocated_operator()));
697
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
27
    return Status::OK();
701
27
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
37.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
37.1k
    _operator_profile =
644
37.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
37.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
37.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
37.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
37.1k
    _operator_profile->add_child(_common_profile, true);
653
37.1k
    _operator_profile->add_child(_custom_profile, true);
654
655
37.1k
    _operator_profile->set_metadata(_parent->node_id());
656
37.1k
    _wait_for_finish_dependency_timer =
657
37.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
37.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
37.1k
    if constexpr (!is_fake_shared) {
660
37.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
37.1k
            info.shared_state_map.end()) {
662
37.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
37.1k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
37.1k
            }
665
37.1k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
37.1k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
37.1k
                                                  ? 0
668
18.4E
                                                  : info.task_idx]
669
37.1k
                                  .get();
670
37.1k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
37.1k
        } else {
672
2
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
2
                DCHECK(false);
674
2
            }
675
2
            _shared_state = info.shared_state->template cast<SharedState>();
676
2
            _dependency = _shared_state->create_sink_dependency(
677
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
2
        }
679
37.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
37.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
37.1k
    }
682
683
37.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
37.1k
    _rows_input_counter =
688
37.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
37.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
37.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
37.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
37.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
37.1k
    _memory_used_counter =
694
37.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
37.1k
    _common_profile->add_info_string("IsColocate",
696
37.1k
                                     std::to_string(_parent->is_colocated_operator()));
697
37.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
37.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
37.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
37.1k
    return Status::OK();
701
37.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
87.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
87.0k
    _operator_profile =
644
87.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
87.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
87.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
87.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
87.0k
    _operator_profile->add_child(_common_profile, true);
653
87.0k
    _operator_profile->add_child(_custom_profile, true);
654
655
87.0k
    _operator_profile->set_metadata(_parent->node_id());
656
87.0k
    _wait_for_finish_dependency_timer =
657
87.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
87.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
87.0k
    if constexpr (!is_fake_shared) {
660
87.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
87.0k
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
87.0k
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
87.0k
            _shared_state = info.shared_state->template cast<SharedState>();
676
87.0k
            _dependency = _shared_state->create_sink_dependency(
677
87.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
87.0k
        }
679
87.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
87.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
87.0k
    }
682
683
87.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
87.0k
    _rows_input_counter =
688
87.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
87.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
87.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
87.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
87.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
87.0k
    _memory_used_counter =
694
87.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
87.0k
    _common_profile->add_info_string("IsColocate",
696
87.0k
                                     std::to_string(_parent->is_colocated_operator()));
697
87.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
87.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
87.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
87.0k
    return Status::OK();
701
87.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
641
3
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
642
    // create profile
643
3
    _operator_profile =
644
3
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
645
3
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
646
3
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
647
648
    // indentation is true
649
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
650
    // So we should set the indentation to true.
651
3
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
652
3
    _operator_profile->add_child(_common_profile, true);
653
3
    _operator_profile->add_child(_custom_profile, true);
654
655
3
    _operator_profile->set_metadata(_parent->node_id());
656
3
    _wait_for_finish_dependency_timer =
657
3
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
658
3
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
659
3
    if constexpr (!is_fake_shared) {
660
3
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
661
3
            info.shared_state_map.end()) {
662
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
663
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
664
            }
665
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
666
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
667
0
                                                  ? 0
668
0
                                                  : info.task_idx]
669
0
                                  .get();
670
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
671
3
        } else {
672
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
673
                DCHECK(false);
674
            }
675
3
            _shared_state = info.shared_state->template cast<SharedState>();
676
3
            _dependency = _shared_state->create_sink_dependency(
677
3
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
678
3
        }
679
3
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
680
3
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
681
3
    }
682
683
3
    if (must_set_shared_state() && _shared_state == nullptr) {
684
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
685
0
    }
686
687
3
    _rows_input_counter =
688
3
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
689
3
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
690
3
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
691
3
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
692
3
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
693
3
    _memory_used_counter =
694
3
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
695
3
    _common_profile->add_info_string("IsColocate",
696
3
                                     std::to_string(_parent->is_colocated_operator()));
697
3
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
698
3
    _common_profile->add_info_string("FollowedByShuffledOperator",
699
3
                                     std::to_string(_parent->followed_by_shuffled_operator()));
700
3
    return Status::OK();
701
3
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
702
703
template <typename SharedState>
704
472k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
472k
    if (_closed) {
706
2
        return Status::OK();
707
2
    }
708
472k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
331k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
331k
    }
711
472k
    _closed = true;
712
472k
    return Status::OK();
713
472k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
78.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
78.2k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
78.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
78.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
78.2k
    }
711
78.2k
    _closed = true;
712
78.2k
    return Status::OK();
713
78.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
1
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
1
    }
711
1
    _closed = true;
712
1
    return Status::OK();
713
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
80.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
80.1k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
80.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
80.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
80.1k
    }
711
80.1k
    _closed = true;
712
80.1k
    return Status::OK();
713
80.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
19
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
19
    if (_closed) {
706
2
        return Status::OK();
707
2
    }
708
17
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
17
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
17
    }
711
17
    _closed = true;
712
17
    return Status::OK();
713
19
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
3.33k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
3.33k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
3.33k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
3.33k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
3.33k
    }
711
3.33k
    _closed = true;
712
3.33k
    return Status::OK();
713
3.33k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
59
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
59
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
59
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
59
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
59
    }
711
59
    _closed = true;
712
59
    return Status::OK();
713
59
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
42.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
42.2k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
42.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
42.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
42.2k
    }
711
42.2k
    _closed = true;
712
42.2k
    return Status::OK();
713
42.2k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
9
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
9
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
9
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
9
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
9
    }
711
9
    _closed = true;
712
9
    return Status::OK();
713
9
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
141k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
141k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
    }
711
141k
    _closed = true;
712
141k
    return Status::OK();
713
141k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
1.30k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
1.30k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
1.30k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
1.30k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
1.30k
    }
711
1.30k
    _closed = true;
712
1.30k
    return Status::OK();
713
1.30k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
1.43k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
1.43k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
1.43k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
1.43k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
1.43k
    }
711
1.43k
    _closed = true;
712
1.43k
    return Status::OK();
713
1.43k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
37.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
37.1k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
37.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
37.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
37.1k
    }
711
37.1k
    _closed = true;
712
37.1k
    return Status::OK();
713
37.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
704
87.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
705
87.1k
    if (_closed) {
706
0
        return Status::OK();
707
0
    }
708
87.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
709
87.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
710
87.1k
    }
711
87.1k
    _closed = true;
712
87.1k
    return Status::OK();
713
87.1k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
714
715
template <typename LocalStateType>
716
4.09k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
4.09k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
718
4.09k
    return pull(state, block, eos);
719
4.09k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
404
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
404
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
718
404
    return pull(state, block, eos);
719
404
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
716
3.69k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
717
3.69k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
718
3.69k
    return pull(state, block, eos);
719
3.69k
}
720
721
template <typename LocalStateType>
722
37.9k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
37.9k
    auto& local_state = get_local_state(state);
724
37.9k
    if (need_more_input_data(state)) {
725
37.7k
        local_state._child_block->clear_column_data(
726
37.7k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
37.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
37.7k
                state, local_state._child_block.get(), &local_state._child_eos));
729
37.7k
        *eos = local_state._child_eos;
730
37.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
4.28k
            return Status::OK();
732
4.28k
        }
733
33.4k
        {
734
33.4k
            SCOPED_TIMER(local_state.exec_time_counter());
735
33.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
33.4k
        }
737
33.4k
    }
738
739
33.6k
    if (!need_more_input_data(state)) {
740
22.7k
        SCOPED_TIMER(local_state.exec_time_counter());
741
22.7k
        bool new_eos = false;
742
22.7k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
22.7k
        if (new_eos) {
744
17.3k
            *eos = true;
745
17.3k
        } else if (!need_more_input_data(state)) {
746
90
            *eos = false;
747
90
        }
748
22.7k
    }
749
33.6k
    return Status::OK();
750
33.6k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
10.2k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
10.2k
    auto& local_state = get_local_state(state);
724
10.2k
    if (need_more_input_data(state)) {
725
10.0k
        local_state._child_block->clear_column_data(
726
10.0k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
10.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
10.0k
                state, local_state._child_block.get(), &local_state._child_eos));
729
10.0k
        *eos = local_state._child_eos;
730
10.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
1.01k
            return Status::OK();
732
1.01k
        }
733
9.07k
        {
734
9.07k
            SCOPED_TIMER(local_state.exec_time_counter());
735
9.07k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
9.07k
        }
737
9.07k
    }
738
739
9.26k
    if (!need_more_input_data(state)) {
740
9.26k
        SCOPED_TIMER(local_state.exec_time_counter());
741
9.26k
        bool new_eos = false;
742
9.26k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
9.26k
        if (new_eos) {
744
6.21k
            *eos = true;
745
6.21k
        } else if (!need_more_input_data(state)) {
746
90
            *eos = false;
747
90
        }
748
9.26k
    }
749
9.26k
    return Status::OK();
750
9.26k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
2.92k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
2.92k
    auto& local_state = get_local_state(state);
724
2.92k
    if (need_more_input_data(state)) {
725
2.92k
        local_state._child_block->clear_column_data(
726
2.92k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
2.92k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
2.92k
                state, local_state._child_block.get(), &local_state._child_eos));
729
2.92k
        *eos = local_state._child_eos;
730
2.92k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
932
            return Status::OK();
732
932
        }
733
1.99k
        {
734
1.99k
            SCOPED_TIMER(local_state.exec_time_counter());
735
1.99k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
1.99k
        }
737
1.99k
    }
738
739
1.99k
    if (!need_more_input_data(state)) {
740
1.99k
        SCOPED_TIMER(local_state.exec_time_counter());
741
1.99k
        bool new_eos = false;
742
1.99k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
1.99k
        if (new_eos) {
744
934
            *eos = true;
745
1.05k
        } else if (!need_more_input_data(state)) {
746
0
            *eos = false;
747
0
        }
748
1.99k
    }
749
1.99k
    return Status::OK();
750
1.99k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
18.1k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
18.1k
    auto& local_state = get_local_state(state);
724
18.1k
    if (need_more_input_data(state)) {
725
18.1k
        local_state._child_block->clear_column_data(
726
18.1k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
18.1k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
18.1k
                state, local_state._child_block.get(), &local_state._child_eos));
729
18.1k
        *eos = local_state._child_eos;
730
18.1k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
862
            return Status::OK();
732
862
        }
733
17.3k
        {
734
17.3k
            SCOPED_TIMER(local_state.exec_time_counter());
735
17.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
17.3k
        }
737
17.3k
    }
738
739
17.3k
    if (!need_more_input_data(state)) {
740
6.63k
        SCOPED_TIMER(local_state.exec_time_counter());
741
6.63k
        bool new_eos = false;
742
6.63k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
6.63k
        if (new_eos) {
744
6.60k
            *eos = true;
745
6.60k
        } else if (!need_more_input_data(state)) {
746
0
            *eos = false;
747
0
        }
748
6.63k
    }
749
17.3k
    return Status::OK();
750
17.3k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
466
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
466
    auto& local_state = get_local_state(state);
724
470
    if (need_more_input_data(state)) {
725
470
        local_state._child_block->clear_column_data(
726
470
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
470
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
470
                state, local_state._child_block.get(), &local_state._child_eos));
729
470
        *eos = local_state._child_eos;
730
470
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
40
            return Status::OK();
732
40
        }
733
430
        {
734
430
            SCOPED_TIMER(local_state.exec_time_counter());
735
430
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
430
        }
737
430
    }
738
739
426
    if (!need_more_input_data(state)) {
740
288
        SCOPED_TIMER(local_state.exec_time_counter());
741
288
        bool new_eos = false;
742
288
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
288
        if (new_eos) {
744
284
            *eos = true;
745
284
        } else if (!need_more_input_data(state)) {
746
0
            *eos = false;
747
0
        }
748
288
    }
749
426
    return Status::OK();
750
426
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
6.01k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
6.01k
    auto& local_state = get_local_state(state);
724
6.01k
    if (need_more_input_data(state)) {
725
6.01k
        local_state._child_block->clear_column_data(
726
6.01k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
6.01k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
6.01k
                state, local_state._child_block.get(), &local_state._child_eos));
729
6.01k
        *eos = local_state._child_eos;
730
6.01k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
1.43k
            return Status::OK();
732
1.43k
        }
733
4.58k
        {
734
4.58k
            SCOPED_TIMER(local_state.exec_time_counter());
735
4.58k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
4.58k
        }
737
4.58k
    }
738
739
4.58k
    if (!need_more_input_data(state)) {
740
4.58k
        SCOPED_TIMER(local_state.exec_time_counter());
741
4.58k
        bool new_eos = false;
742
4.58k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
4.58k
        if (new_eos) {
744
3.33k
            *eos = true;
745
3.33k
        } else if (!need_more_input_data(state)) {
746
0
            *eos = false;
747
0
        }
748
4.58k
    }
749
4.58k
    return Status::OK();
750
4.58k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
722
36
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
723
36
    auto& local_state = get_local_state(state);
724
36
    if (need_more_input_data(state)) {
725
36
        local_state._child_block->clear_column_data(
726
36
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
727
36
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
728
36
                state, local_state._child_block.get(), &local_state._child_eos));
729
36
        *eos = local_state._child_eos;
730
36
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
731
0
            return Status::OK();
732
0
        }
733
36
        {
734
36
            SCOPED_TIMER(local_state.exec_time_counter());
735
36
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
736
36
        }
737
36
    }
738
739
36
    if (!need_more_input_data(state)) {
740
36
        SCOPED_TIMER(local_state.exec_time_counter());
741
36
        bool new_eos = false;
742
36
        RETURN_IF_ERROR(pull(state, block, &new_eos));
743
36
        if (new_eos) {
744
32
            *eos = true;
745
32
        } else if (!need_more_input_data(state)) {
746
0
            *eos = false;
747
0
        }
748
36
    }
749
36
    return Status::OK();
750
36
}
751
752
template <typename Writer, typename Parent>
753
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
754
17.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
17.0k
    RETURN_IF_ERROR(Base::init(state, info));
756
17.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
17.0k
                                                         "AsyncWriterDependency", true);
758
17.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
17.0k
                             _finish_dependency));
760
761
17.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
17.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
17.0k
    return Status::OK();
764
17.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
164
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
164
    RETURN_IF_ERROR(Base::init(state, info));
756
164
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
164
                                                         "AsyncWriterDependency", true);
758
164
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
164
                             _finish_dependency));
760
761
164
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
164
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
164
    return Status::OK();
764
164
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
88
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
88
    RETURN_IF_ERROR(Base::init(state, info));
756
88
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
88
                                                         "AsyncWriterDependency", true);
758
88
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
88
                             _finish_dependency));
760
761
88
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
88
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
88
    return Status::OK();
764
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
1.67k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
1.67k
    RETURN_IF_ERROR(Base::init(state, info));
756
1.67k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
1.67k
                                                         "AsyncWriterDependency", true);
758
1.67k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
1.67k
                             _finish_dependency));
760
761
1.67k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
1.67k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
1.67k
    return Status::OK();
764
1.67k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
5.61k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
5.61k
    RETURN_IF_ERROR(Base::init(state, info));
756
5.61k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
5.61k
                                                         "AsyncWriterDependency", true);
758
5.61k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
5.61k
                             _finish_dependency));
760
761
5.61k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
5.61k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
5.61k
    return Status::OK();
764
5.61k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
5.15k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
5.15k
    RETURN_IF_ERROR(Base::init(state, info));
756
5.15k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
5.15k
                                                         "AsyncWriterDependency", true);
758
5.15k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
5.15k
                             _finish_dependency));
760
761
5.15k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
5.15k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
5.15k
    return Status::OK();
764
5.15k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
3.38k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
3.38k
    RETURN_IF_ERROR(Base::init(state, info));
756
3.38k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
3.38k
                                                         "AsyncWriterDependency", true);
758
3.38k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
3.38k
                             _finish_dependency));
760
761
3.38k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
3.38k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
3.38k
    return Status::OK();
764
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
160
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
160
    RETURN_IF_ERROR(Base::init(state, info));
756
160
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
160
                                                         "AsyncWriterDependency", true);
758
160
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
160
                             _finish_dependency));
760
761
160
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
160
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
160
    return Status::OK();
764
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
640
    RETURN_IF_ERROR(Base::init(state, info));
756
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
640
                                                         "AsyncWriterDependency", true);
758
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
640
                             _finish_dependency));
760
761
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
640
    return Status::OK();
764
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
754
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
755
156
    RETURN_IF_ERROR(Base::init(state, info));
756
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
757
156
                                                         "AsyncWriterDependency", true);
758
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
759
156
                             _finish_dependency));
760
761
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
762
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
763
156
    return Status::OK();
764
156
}
765
766
template <typename Writer, typename Parent>
767
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
768
17.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
17.0k
    RETURN_IF_ERROR(Base::open(state));
770
17.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
228k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
211k
        RETURN_IF_ERROR(
773
211k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
211k
    }
775
17.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
17.0k
    return Status::OK();
777
17.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
164
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
164
    RETURN_IF_ERROR(Base::open(state));
770
164
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
942
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
778
        RETURN_IF_ERROR(
773
778
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
778
    }
775
164
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
164
    return Status::OK();
777
164
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
88
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
88
    RETURN_IF_ERROR(Base::open(state));
770
88
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
412
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
324
        RETURN_IF_ERROR(
773
324
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
324
    }
775
88
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
88
    return Status::OK();
777
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
1.67k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
1.67k
    RETURN_IF_ERROR(Base::open(state));
770
1.67k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
6.08k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
4.40k
        RETURN_IF_ERROR(
773
4.40k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
4.40k
    }
775
1.67k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
1.67k
    return Status::OK();
777
1.67k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
5.61k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
5.61k
    RETURN_IF_ERROR(Base::open(state));
770
5.61k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
39.1k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
33.5k
        RETURN_IF_ERROR(
773
33.5k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
33.5k
    }
775
5.61k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
5.61k
    return Status::OK();
777
5.61k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
5.14k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
5.14k
    RETURN_IF_ERROR(Base::open(state));
770
5.14k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
134k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
129k
        RETURN_IF_ERROR(
773
129k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
129k
    }
775
5.14k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
5.14k
    return Status::OK();
777
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
3.38k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
3.38k
    RETURN_IF_ERROR(Base::open(state));
770
3.38k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
41.7k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
38.3k
        RETURN_IF_ERROR(
773
38.3k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
38.3k
    }
775
3.38k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
3.38k
    return Status::OK();
777
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
160
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
160
    RETURN_IF_ERROR(Base::open(state));
770
160
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
480
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
320
        RETURN_IF_ERROR(
773
320
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
320
    }
775
160
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
160
    return Status::OK();
777
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
638
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
638
    RETURN_IF_ERROR(Base::open(state));
770
638
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
4.37k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
3.73k
        RETURN_IF_ERROR(
773
3.73k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
3.73k
    }
775
638
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
638
    return Status::OK();
777
638
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
768
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
769
156
    RETURN_IF_ERROR(Base::open(state));
770
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
771
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
772
630
        RETURN_IF_ERROR(
773
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
774
630
    }
775
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
776
156
    return Status::OK();
777
156
}
778
779
template <typename Writer, typename Parent>
780
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
781
23.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
23.9k
    return _writer->sink(block, eos);
783
23.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
824
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
824
    return _writer->sink(block, eos);
783
824
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
112
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
112
    return _writer->sink(block, eos);
783
112
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
2.20k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
2.20k
    return _writer->sink(block, eos);
783
2.20k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
6.64k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
6.64k
    return _writer->sink(block, eos);
783
6.64k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
7.50k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
7.50k
    return _writer->sink(block, eos);
783
7.50k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
5.35k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
5.35k
    return _writer->sink(block, eos);
783
5.35k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
180
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
180
    return _writer->sink(block, eos);
783
180
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
786
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
786
    return _writer->sink(block, eos);
783
786
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
781
310
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
782
310
    return _writer->sink(block, eos);
783
310
}
784
785
template <typename Writer, typename Parent>
786
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
787
17.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
17.0k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
17.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
17.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
17.0k
    if (_writer) {
795
17.0k
        Status st = _writer->get_writer_status();
796
17.0k
        if (exec_status.ok()) {
797
16.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
16.9k
                                                       : Status::Cancelled("force close"));
799
16.9k
        } else {
800
95
            _writer->force_close(exec_status);
801
95
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
17.0k
        RETURN_IF_ERROR(st);
806
17.0k
    }
807
17.0k
    return Base::close(state, exec_status);
808
17.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
164
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
164
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
164
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
164
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
164
    if (_writer) {
795
164
        Status st = _writer->get_writer_status();
796
164
        if (exec_status.ok()) {
797
164
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
164
                                                       : Status::Cancelled("force close"));
799
164
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
164
        RETURN_IF_ERROR(st);
806
164
    }
807
164
    return Base::close(state, exec_status);
808
164
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
88
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
88
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
88
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
88
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
88
    if (_writer) {
795
88
        Status st = _writer->get_writer_status();
796
88
        if (exec_status.ok()) {
797
88
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
88
                                                       : Status::Cancelled("force close"));
799
88
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
88
        RETURN_IF_ERROR(st);
806
88
    }
807
80
    return Base::close(state, exec_status);
808
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
1.67k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
1.67k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
1.67k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
1.67k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
1.67k
    if (_writer) {
795
1.67k
        Status st = _writer->get_writer_status();
796
1.67k
        if (exec_status.ok()) {
797
1.63k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
1.63k
                                                       : Status::Cancelled("force close"));
799
1.63k
        } else {
800
41
            _writer->force_close(exec_status);
801
41
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
1.67k
        RETURN_IF_ERROR(st);
806
1.67k
    }
807
1.67k
    return Base::close(state, exec_status);
808
1.67k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
5.61k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
5.61k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
5.61k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
5.61k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
5.61k
    if (_writer) {
795
5.61k
        Status st = _writer->get_writer_status();
796
5.61k
        if (exec_status.ok()) {
797
5.56k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
5.56k
                                                       : Status::Cancelled("force close"));
799
5.56k
        } else {
800
50
            _writer->force_close(exec_status);
801
50
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
5.61k
        RETURN_IF_ERROR(st);
806
5.61k
    }
807
5.61k
    return Base::close(state, exec_status);
808
5.61k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
5.14k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
5.14k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
5.14k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
5.14k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
5.15k
    if (_writer) {
795
5.15k
        Status st = _writer->get_writer_status();
796
5.15k
        if (exec_status.ok()) {
797
5.14k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
5.14k
                                                       : Status::Cancelled("force close"));
799
5.14k
        } else {
800
4
            _writer->force_close(exec_status);
801
4
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
5.15k
        RETURN_IF_ERROR(st);
806
5.15k
    }
807
5.14k
    return Base::close(state, exec_status);
808
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
3.38k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
3.38k
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
3.38k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
3.38k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
3.38k
    if (_writer) {
795
3.38k
        Status st = _writer->get_writer_status();
796
3.38k
        if (exec_status.ok()) {
797
3.38k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
3.38k
                                                       : Status::Cancelled("force close"));
799
3.38k
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
3.38k
        RETURN_IF_ERROR(st);
806
3.38k
    }
807
3.38k
    return Base::close(state, exec_status);
808
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
160
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
160
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
160
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
160
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
160
    if (_writer) {
795
160
        Status st = _writer->get_writer_status();
796
160
        if (exec_status.ok()) {
797
160
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
160
                                                       : Status::Cancelled("force close"));
799
160
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
160
        RETURN_IF_ERROR(st);
806
160
    }
807
160
    return Base::close(state, exec_status);
808
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
640
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
640
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
640
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
640
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
640
    if (_writer) {
795
640
        Status st = _writer->get_writer_status();
796
640
        if (exec_status.ok()) {
797
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
640
                                                       : Status::Cancelled("force close"));
799
640
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
640
        RETURN_IF_ERROR(st);
806
640
    }
807
640
    return Base::close(state, exec_status);
808
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
787
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
788
156
    if (_closed) {
789
0
        return Status::OK();
790
0
    }
791
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
792
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
793
    // if the init failed, the _writer may be nullptr. so here need check
794
156
    if (_writer) {
795
156
        Status st = _writer->get_writer_status();
796
156
        if (exec_status.ok()) {
797
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
798
156
                                                       : Status::Cancelled("force close"));
799
156
        } else {
800
0
            _writer->force_close(exec_status);
801
0
        }
802
        // If there is an error in process_block thread, then we should get the writer
803
        // status before call force_close. For example, the thread may failed in commit
804
        // transaction.
805
156
        RETURN_IF_ERROR(st);
806
156
    }
807
156
    return Base::close(state, exec_status);
808
156
}
809
810
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
811
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
812
DECLARE_OPERATOR(ResultSinkLocalState)
813
DECLARE_OPERATOR(JdbcTableSinkLocalState)
814
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
815
DECLARE_OPERATOR(ResultFileSinkLocalState)
816
DECLARE_OPERATOR(OlapTableSinkLocalState)
817
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
818
DECLARE_OPERATOR(HiveTableSinkLocalState)
819
DECLARE_OPERATOR(TVFTableSinkLocalState)
820
DECLARE_OPERATOR(IcebergTableSinkLocalState)
821
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
822
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
823
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
824
DECLARE_OPERATOR(MCTableSinkLocalState)
825
DECLARE_OPERATOR(AnalyticSinkLocalState)
826
DECLARE_OPERATOR(BlackholeSinkLocalState)
827
DECLARE_OPERATOR(SortSinkLocalState)
828
DECLARE_OPERATOR(SpillSortSinkLocalState)
829
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
830
DECLARE_OPERATOR(AggSinkLocalState)
831
DECLARE_OPERATOR(BucketedAggSinkLocalState)
832
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
833
DECLARE_OPERATOR(ExchangeSinkLocalState)
834
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
835
DECLARE_OPERATOR(UnionSinkLocalState)
836
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
837
DECLARE_OPERATOR(PartitionSortSinkLocalState)
838
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
839
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
840
DECLARE_OPERATOR(SetSinkLocalState<true>)
841
DECLARE_OPERATOR(SetSinkLocalState<false>)
842
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
843
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
844
DECLARE_OPERATOR(CacheSinkLocalState)
845
DECLARE_OPERATOR(DictSinkLocalState)
846
DECLARE_OPERATOR(RecCTESinkLocalState)
847
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
848
849
#undef DECLARE_OPERATOR
850
851
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
852
DECLARE_OPERATOR(HashJoinProbeLocalState)
853
DECLARE_OPERATOR(OlapScanLocalState)
854
DECLARE_OPERATOR(GroupCommitLocalState)
855
DECLARE_OPERATOR(JDBCScanLocalState)
856
DECLARE_OPERATOR(FileScanLocalState)
857
DECLARE_OPERATOR(AnalyticLocalState)
858
DECLARE_OPERATOR(SortLocalState)
859
DECLARE_OPERATOR(SpillSortLocalState)
860
DECLARE_OPERATOR(LocalMergeSortLocalState)
861
DECLARE_OPERATOR(AggLocalState)
862
DECLARE_OPERATOR(BucketedAggLocalState)
863
DECLARE_OPERATOR(PartitionedAggLocalState)
864
DECLARE_OPERATOR(TableFunctionLocalState)
865
DECLARE_OPERATOR(ExchangeLocalState)
866
DECLARE_OPERATOR(RepeatLocalState)
867
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
868
DECLARE_OPERATOR(AssertNumRowsLocalState)
869
DECLARE_OPERATOR(EmptySetLocalState)
870
DECLARE_OPERATOR(UnionSourceLocalState)
871
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
872
DECLARE_OPERATOR(PartitionSortSourceLocalState)
873
DECLARE_OPERATOR(SetSourceLocalState<true>)
874
DECLARE_OPERATOR(SetSourceLocalState<false>)
875
DECLARE_OPERATOR(DataGenLocalState)
876
DECLARE_OPERATOR(SchemaScanLocalState)
877
DECLARE_OPERATOR(MetaScanLocalState)
878
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
879
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
880
DECLARE_OPERATOR(CacheSourceLocalState)
881
DECLARE_OPERATOR(RecCTESourceLocalState)
882
DECLARE_OPERATOR(RecCTEScanLocalState)
883
884
#ifdef BE_TEST
885
DECLARE_OPERATOR(MockLocalState)
886
DECLARE_OPERATOR(MockScanLocalState)
887
#endif
888
#undef DECLARE_OPERATOR
889
890
template class StreamingOperatorX<AssertNumRowsLocalState>;
891
template class StreamingOperatorX<SelectLocalState>;
892
893
template class StatefulOperatorX<HashJoinProbeLocalState>;
894
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
895
template class StatefulOperatorX<RepeatLocalState>;
896
template class StatefulOperatorX<MaterializationLocalState>;
897
template class StatefulOperatorX<StreamingAggLocalState>;
898
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
899
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
900
template class StatefulOperatorX<TableFunctionLocalState>;
901
902
template class PipelineXSinkLocalState<HashJoinSharedState>;
903
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
904
template class PipelineXSinkLocalState<SortSharedState>;
905
template class PipelineXSinkLocalState<SpillSortSharedState>;
906
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
907
template class PipelineXSinkLocalState<AnalyticSharedState>;
908
template class PipelineXSinkLocalState<AggSharedState>;
909
template class PipelineXSinkLocalState<BucketedAggSharedState>;
910
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
911
template class PipelineXSinkLocalState<FakeSharedState>;
912
template class PipelineXSinkLocalState<UnionSharedState>;
913
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
914
template class PipelineXSinkLocalState<MultiCastSharedState>;
915
template class PipelineXSinkLocalState<SetSharedState>;
916
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
917
template class PipelineXSinkLocalState<BasicSharedState>;
918
template class PipelineXSinkLocalState<DataQueueSharedState>;
919
template class PipelineXSinkLocalState<RecCTESharedState>;
920
921
template class PipelineXLocalState<HashJoinSharedState>;
922
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
923
template class PipelineXLocalState<SortSharedState>;
924
template class PipelineXLocalState<SpillSortSharedState>;
925
template class PipelineXLocalState<NestedLoopJoinSharedState>;
926
template class PipelineXLocalState<AnalyticSharedState>;
927
template class PipelineXLocalState<AggSharedState>;
928
template class PipelineXLocalState<BucketedAggSharedState>;
929
template class PipelineXLocalState<PartitionedAggSharedState>;
930
template class PipelineXLocalState<FakeSharedState>;
931
template class PipelineXLocalState<UnionSharedState>;
932
template class PipelineXLocalState<DataQueueSharedState>;
933
template class PipelineXLocalState<MultiCastSharedState>;
934
template class PipelineXLocalState<PartitionSortNodeSharedState>;
935
template class PipelineXLocalState<SetSharedState>;
936
template class PipelineXLocalState<LocalExchangeSharedState>;
937
template class PipelineXLocalState<BasicSharedState>;
938
template class PipelineXLocalState<RecCTESharedState>;
939
940
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
941
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
942
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
943
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
944
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
945
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
946
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
947
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
948
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
949
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
950
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
951
952
#ifdef BE_TEST
953
template class OperatorX<DummyOperatorLocalState>;
954
template class DataSinkOperatorX<DummySinkLocalState>;
955
#endif
956
957
} // namespace doris