Coverage Report

Created: 2026-06-03 15:43

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
1.95M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
1.95M
    if (_parent->nereids_id() == -1) {
120
1.03M
        return fmt::format("(id={})", _parent->node_id());
121
1.03M
    } else {
122
917k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
917k
    }
124
1.95M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
61.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
61.6k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
61.6k
    } else {
122
61.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
61.6k
    }
124
61.6k
}
_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
163k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
163k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
163k
    } else {
122
163k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
163k
    }
124
163k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
25
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
25
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
25
    } else {
122
25
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
25
    }
124
25
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
5.48k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
5.48k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
5.48k
    } else {
122
5.48k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
5.48k
    }
124
5.48k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
6.25k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
6.25k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
6.24k
    } else {
122
6.24k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
6.24k
    }
124
6.25k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
79.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
79.1k
    if (_parent->nereids_id() == -1) {
120
29
        return fmt::format("(id={})", _parent->node_id());
121
79.1k
    } else {
122
79.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
79.1k
    }
124
79.1k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
349
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
349
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
349
    } else {
122
349
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
349
    }
124
349
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
71
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
71
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
71
    } else {
122
71
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
71
    }
124
71
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
909k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
909k
    if (_parent->nereids_id() == -1) {
120
365k
        return fmt::format("(id={})", _parent->node_id());
121
544k
    } else {
122
544k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
544k
    }
124
909k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
50.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
50.2k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
50.2k
    } else {
122
50.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
50.2k
    }
124
50.2k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
17
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
17
    if (_parent->nereids_id() == -1) {
120
17
        return fmt::format("(id={})", _parent->node_id());
121
17
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
17
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.04k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.04k
    if (_parent->nereids_id() == -1) {
120
4.04k
        return fmt::format("(id={})", _parent->node_id());
121
4.04k
    } else {
122
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
0
    }
124
4.04k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
391
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
391
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
289
    } else {
122
289
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
289
    }
124
391
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
4.95k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
4.95k
    if (_parent->nereids_id() == -1) {
120
13
        return fmt::format("(id={})", _parent->node_id());
121
4.94k
    } else {
122
4.94k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4.94k
    }
124
4.95k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
669k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
669k
    if (_parent->nereids_id() == -1) {
120
668k
        return fmt::format("(id={})", _parent->node_id());
121
668k
    } else {
122
389
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
389
    }
124
669k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
151
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
151
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
151
    } else {
122
151
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
151
    }
124
151
}
125
126
template <typename SharedStateArg>
127
1.10M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.10M
    if (_parent->nereids_id() == -1) {
129
734k
        return fmt::format("(id={})", _parent->node_id());
130
734k
    } else {
131
371k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
371k
    }
133
1.10M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
109k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
109k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
109k
    } else {
131
109k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
109k
    }
133
109k
}
_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
164k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
164k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
164k
    } else {
131
164k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
164k
    }
133
164k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
31
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
31
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
31
    } else {
131
31
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
31
    }
133
31
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
5.49k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
5.49k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
5.49k
    } else {
131
5.49k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
5.49k
    }
133
5.49k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
6.25k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
6.25k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
6.24k
    } else {
131
6.24k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6.24k
    }
133
6.25k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
79.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
79.3k
    if (_parent->nereids_id() == -1) {
129
29
        return fmt::format("(id={})", _parent->node_id());
130
79.2k
    } else {
131
79.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
79.2k
    }
133
79.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
323
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
323
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
323
    } else {
131
323
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
323
    }
133
323
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
81
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
81
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
81
    } else {
131
81
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
81
    }
133
81
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
18
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
18
    if (_parent->nereids_id() == -1) {
129
18
        return fmt::format("(id={})", _parent->node_id());
130
18
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
18
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
4.45k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
4.45k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
4.44k
    } else {
131
4.44k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
4.44k
    }
133
4.45k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
391
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
391
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
289
    } else {
131
289
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
289
    }
133
391
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.2k
    if (_parent->nereids_id() == -1) {
129
12.1k
        return fmt::format("(id={})", _parent->node_id());
130
12.1k
    } else {
131
6
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
6
    }
133
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
282k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
283k
    if (_parent->nereids_id() == -1) {
129
283k
        return fmt::format("(id={})", _parent->node_id());
130
18.4E
    } else {
131
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
18.4E
    }
133
282k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
438k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
438k
    if (_parent->nereids_id() == -1) {
129
438k
        return fmt::format("(id={})", _parent->node_id());
130
438k
    } else {
131
170
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
170
    }
133
438k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
17
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
17
    if (_parent->nereids_id() == -1) {
129
17
        return fmt::format("(id={})", _parent->node_id());
130
17
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
302
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
302
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
302
    } else {
131
302
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
302
    }
133
302
}
134
135
template <typename SharedStateArg>
136
27.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
27.0k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
27.0k
    _terminated = true;
141
27.0k
    return Status::OK();
142
27.0k
}
_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
739
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
739
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
739
    _terminated = true;
141
739
    return Status::OK();
142
739
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
8
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
8
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
8
    _terminated = true;
141
8
    return Status::OK();
142
8
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1
    _terminated = true;
141
1
    return Status::OK();
142
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1.04k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.04k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.04k
    _terminated = true;
141
1.04k
    return Status::OK();
142
1.04k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4
    _terminated = true;
141
4
    return Status::OK();
142
4
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
749
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
749
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
749
    _terminated = true;
141
749
    return Status::OK();
142
749
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4
    _terminated = true;
141
4
    return Status::OK();
142
4
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1
    _terminated = true;
141
1
    return Status::OK();
142
1
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
53
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
53
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
53
    _terminated = true;
141
53
    return Status::OK();
142
53
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4
    _terminated = true;
141
4
    return Status::OK();
142
4
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
205
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
205
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
205
    _terminated = true;
141
205
    return Status::OK();
142
205
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
142
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
142
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
142
    _terminated = true;
141
142
    return Status::OK();
142
142
}
143
144
582k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
582k
    return _child && _child->is_serial_operator() && !is_source()
146
582k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
582k
                   : DataDistribution(ExchangeType::NOOP);
148
582k
}
149
150
8.46k
bool OperatorBase::is_hash_shuffle(ExchangeType exchange_type) {
151
8.46k
    return exchange_type == ExchangeType::HASH_SHUFFLE ||
152
8.46k
           exchange_type == ExchangeType::BUCKET_HASH_SHUFFLE;
153
8.46k
}
154
155
99.7k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
156
99.7k
    if (!_child) {
157
33.7k
        return false;
158
33.7k
    }
159
66.0k
    if (_child->is_serial_operator()) {
160
56.6k
        return true;
161
56.6k
    }
162
9.32k
    const auto child_distribution = _child->required_data_distribution(state);
163
9.32k
    return child_distribution.need_local_exchange() &&
164
9.32k
           !is_hash_shuffle(child_distribution.distribution_type);
165
66.0k
}
166
167
80.7k
const RowDescriptor& OperatorBase::row_desc() const {
168
80.7k
    return _child->row_desc();
169
80.7k
}
170
171
template <typename SharedStateArg>
172
20.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.7k
    fmt::memory_buffer debug_string_buffer;
174
20.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.7k
    return fmt::to_string(debug_string_buffer);
176
20.7k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
28
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
28
    fmt::memory_buffer debug_string_buffer;
174
28
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
28
    return fmt::to_string(debug_string_buffer);
176
28
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
3
    fmt::memory_buffer debug_string_buffer;
174
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
3
    return fmt::to_string(debug_string_buffer);
176
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
23
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
23
    fmt::memory_buffer debug_string_buffer;
174
23
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
23
    return fmt::to_string(debug_string_buffer);
176
23
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
11
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
11
    fmt::memory_buffer debug_string_buffer;
174
11
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
11
    return fmt::to_string(debug_string_buffer);
176
11
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
19
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19
    fmt::memory_buffer debug_string_buffer;
174
19
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19
    return fmt::to_string(debug_string_buffer);
176
19
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
20.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
20.1k
    fmt::memory_buffer debug_string_buffer;
174
20.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
20.1k
    return fmt::to_string(debug_string_buffer);
176
20.1k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
1
    fmt::memory_buffer debug_string_buffer;
174
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
1
    return fmt::to_string(debug_string_buffer);
176
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
547
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
547
    fmt::memory_buffer debug_string_buffer;
174
547
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
547
    return fmt::to_string(debug_string_buffer);
176
547
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
template <typename SharedStateArg>
179
20.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
20.7k
    fmt::memory_buffer debug_string_buffer;
181
20.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
20.7k
    return fmt::to_string(debug_string_buffer);
183
20.7k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
6
    fmt::memory_buffer debug_string_buffer;
181
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
6
    return fmt::to_string(debug_string_buffer);
183
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
23
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
23
    fmt::memory_buffer debug_string_buffer;
181
23
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
23
    return fmt::to_string(debug_string_buffer);
183
23
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
6
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
6
    fmt::memory_buffer debug_string_buffer;
181
6
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
6
    return fmt::to_string(debug_string_buffer);
183
6
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
19
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
19
    fmt::memory_buffer debug_string_buffer;
181
19
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
19
    return fmt::to_string(debug_string_buffer);
183
19
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
520
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
520
    fmt::memory_buffer debug_string_buffer;
181
520
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
520
    return fmt::to_string(debug_string_buffer);
183
520
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
45
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
45
    fmt::memory_buffer debug_string_buffer;
181
45
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
45
    return fmt::to_string(debug_string_buffer);
183
45
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
179
20.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
180
20.1k
    fmt::memory_buffer debug_string_buffer;
181
20.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
182
20.1k
    return fmt::to_string(debug_string_buffer);
183
20.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
184
185
21.0k
std::string OperatorXBase::debug_string(int indentation_level) const {
186
21.0k
    fmt::memory_buffer debug_string_buffer;
187
21.0k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
188
21.0k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
189
21.0k
                   _is_serial_operator);
190
21.0k
    return fmt::to_string(debug_string_buffer);
191
21.0k
}
192
193
20.7k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
194
20.7k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
195
20.7k
}
196
197
526k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
198
526k
    std::string node_name = print_plan_node_type(tnode.node_type);
199
526k
    _nereids_id = tnode.nereids_id;
200
526k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
201
2.92k
        if (!tnode.__isset.output_tuple_id) {
202
0
            return Status::InternalError("no final output tuple id");
203
0
        }
204
2.92k
        if (tnode.intermediate_output_tuple_id_list.size() !=
205
2.92k
            tnode.intermediate_projections_list.size()) {
206
0
            return Status::InternalError(
207
0
                    "intermediate_output_tuple_id_list size:{} not match "
208
0
                    "intermediate_projections_list size:{}",
209
0
                    tnode.intermediate_output_tuple_id_list.size(),
210
0
                    tnode.intermediate_projections_list.size());
211
0
        }
212
2.92k
    }
213
526k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
214
526k
    _op_name = substr + "_OPERATOR";
215
216
526k
    if (tnode.__isset.vconjunct) {
217
0
        return Status::InternalError("vconjunct is not supported yet");
218
526k
    } else if (tnode.__isset.conjuncts) {
219
248k
        for (const auto& conjunct : tnode.conjuncts) {
220
248k
            VExprContextSPtr context;
221
248k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
222
248k
            _conjuncts.emplace_back(context);
223
248k
        }
224
85.4k
    }
225
226
    // create the projections expr
227
526k
    if (tnode.__isset.projections) {
228
230k
        DCHECK(tnode.__isset.output_tuple_id);
229
230k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
230
230k
    }
231
526k
    if (!tnode.intermediate_projections_list.empty()) {
232
2.92k
        DCHECK(tnode.__isset.projections) << "no final projections";
233
2.92k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
234
3.88k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
235
3.88k
            VExprContextSPtrs projections;
236
3.88k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
237
3.88k
            _intermediate_projections.push_back(projections);
238
3.88k
        }
239
2.92k
    }
240
526k
    return Status::OK();
241
526k
}
242
243
552k
Status OperatorXBase::prepare(RuntimeState* state) {
244
552k
    for (auto& conjunct : _conjuncts) {
245
248k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
246
248k
    }
247
552k
    if (state->enable_adjust_conjunct_order_by_cost()) {
248
502k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
249
326k
            return a->execute_cost() < b->execute_cost();
250
326k
        });
251
502k
    };
252
253
556k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
254
3.88k
        RETURN_IF_ERROR(
255
3.88k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
256
3.88k
    }
257
552k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
258
259
552k
    if (has_output_row_desc()) {
260
230k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
261
230k
    }
262
263
552k
    for (auto& conjunct : _conjuncts) {
264
248k
        RETURN_IF_ERROR(conjunct->open(state));
265
248k
    }
266
552k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
267
552k
    for (auto& projections : _intermediate_projections) {
268
3.88k
        RETURN_IF_ERROR(VExpr::open(projections, state));
269
3.88k
    }
270
552k
    if (_child && !is_source()) {
271
125k
        RETURN_IF_ERROR(_child->prepare(state));
272
125k
    }
273
274
552k
    if (VExpr::contains_blockable_function(_conjuncts) ||
275
552k
        VExpr::contains_blockable_function(_projections)) {
276
0
        _blockable = true;
277
0
    }
278
279
552k
    return Status::OK();
280
552k
}
281
282
3.71k
Status OperatorXBase::terminate(RuntimeState* state) {
283
3.71k
    if (_child && !is_source()) {
284
712
        RETURN_IF_ERROR(_child->terminate(state));
285
712
    }
286
3.71k
    auto result = state->get_local_state_result(operator_id());
287
3.71k
    if (!result) {
288
0
        return result.error();
289
0
    }
290
3.71k
    return result.value()->terminate(state);
291
3.71k
}
292
293
5.51M
Status OperatorXBase::close(RuntimeState* state) {
294
5.51M
    if (_child && !is_source()) {
295
1.20M
        RETURN_IF_ERROR(_child->close(state));
296
1.20M
    }
297
5.51M
    auto result = state->get_local_state_result(operator_id());
298
5.51M
    if (!result) {
299
0
        return result.error();
300
0
    }
301
5.51M
    return result.value()->close(state);
302
5.51M
}
303
304
247k
void PipelineXLocalStateBase::clear_origin_block() {
305
247k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
306
247k
}
307
308
558k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
309
558k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
310
311
558k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
312
558k
    return Status::OK();
313
558k
}
314
315
0
bool PipelineXLocalStateBase::is_blockable() const {
316
0
    return std::any_of(_projections.begin(), _projections.end(),
317
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
318
0
}
319
320
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
321
247k
                                     Block* output_block) const {
322
247k
    auto* local_state = state->get_local_state(operator_id());
323
247k
    SCOPED_TIMER(local_state->exec_time_counter());
324
247k
    SCOPED_TIMER(local_state->_projection_timer);
325
247k
    const size_t rows = origin_block->rows();
326
247k
    if (rows == 0) {
327
129k
        return Status::OK();
328
129k
    }
329
117k
    Block input_block = *origin_block;
330
331
117k
    size_t bytes_usage = 0;
332
117k
    ColumnsWithTypeAndName new_columns;
333
117k
    for (const auto& projections : local_state->_intermediate_projections) {
334
1.01k
        if (projections.empty()) {
335
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
336
0
                                         node_id());
337
0
        }
338
1.01k
        new_columns.resize(projections.size());
339
6.55k
        for (int i = 0; i < projections.size(); i++) {
340
5.54k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
341
5.54k
            if (new_columns[i].column->size() != rows) {
342
0
                return Status::InternalError(
343
0
                        "intermediate projection result column size {} not equal input rows {}, "
344
0
                        "expr: {}",
345
0
                        new_columns[i].column->size(), rows,
346
0
                        projections[i]->root()->debug_string());
347
0
            }
348
5.54k
        }
349
1.01k
        Block tmp_block {new_columns};
350
1.01k
        bytes_usage += tmp_block.allocated_bytes();
351
1.01k
        input_block.swap(tmp_block);
352
1.01k
    }
353
354
117k
    if (input_block.rows() != rows) {
355
0
        return Status::InternalError(
356
0
                "after intermediate projections input block rows {} not equal origin rows {}, "
357
0
                "input_block: {}",
358
0
                input_block.rows(), rows, input_block.dump_structure());
359
0
    }
360
531k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
361
531k
        if (to->is_nullable() && !from->is_nullable()) {
362
0
            if (_keep_origin || !from->is_exclusive()) {
363
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
364
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
365
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
366
0
                bytes_usage += null_column.allocated_bytes();
367
0
            } else {
368
0
                to = make_nullable(from, false)->assert_mutable();
369
0
            }
370
531k
        } else {
371
531k
            if (_keep_origin || !from->is_exclusive()) {
372
522k
                to->insert_range_from(*from, 0, rows);
373
522k
                bytes_usage += from->allocated_bytes();
374
522k
            } else {
375
9.76k
                to = from->assert_mutable();
376
9.76k
            }
377
531k
        }
378
531k
    };
379
380
117k
    auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
381
117k
            output_block, *_output_row_descriptor);
382
117k
    auto& mutable_block = scoped_mutable_block.mutable_block();
383
117k
    auto& mutable_columns = mutable_block.mutable_columns();
384
117k
    if (rows != 0) {
385
117k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
386
649k
        for (int i = 0; i < mutable_columns.size(); ++i) {
387
531k
            ColumnPtr column_ptr;
388
531k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
389
531k
            if (column_ptr->size() != rows) {
390
0
                return Status::InternalError(
391
0
                        "projection result column size {} not equal input rows {}, expr: {}",
392
0
                        column_ptr->size(), rows,
393
0
                        local_state->_projections[i]->root()->debug_string());
394
0
            }
395
531k
            column_ptr = column_ptr->convert_to_full_column_if_const();
396
531k
            bytes_usage += column_ptr->allocated_bytes();
397
531k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
398
531k
        }
399
117k
        DCHECK(mutable_block.rows() == rows);
400
117k
    }
401
117k
    local_state->_estimate_memory_usage += bytes_usage;
402
403
117k
    return Status::OK();
404
117k
}
405
406
4.30M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
407
4.30M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
408
4.30M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
409
4.30M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
410
4.30M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
411
4.30M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
412
4.30M
            if (_debug_point_count++ % 2 == 0) {
413
4.30M
                return Status::OK();
414
4.30M
            }
415
4.30M
        }
416
4.30M
    });
417
418
4.30M
    Status status;
419
4.30M
    auto* local_state = state->get_local_state(operator_id());
420
4.30M
    Defer defer([&]() {
421
4.30M
        if (status.ok()) {
422
4.30M
            local_state->update_output_block_counters(*block);
423
4.30M
        }
424
4.30M
    });
425
4.30M
    if (_output_row_descriptor) {
426
247k
        local_state->clear_origin_block();
427
247k
        status = get_block(state, &local_state->_origin_block, eos);
428
247k
        if (UNLIKELY(!status.ok())) {
429
20
            return status;
430
20
        }
431
247k
        status = do_projections(state, &local_state->_origin_block, block);
432
247k
        return status;
433
247k
    }
434
4.05M
    status = get_block(state, block, eos);
435
4.05M
    RETURN_IF_ERROR(block->check_type_and_column());
436
4.05M
    return status;
437
4.05M
}
438
439
2.28M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
440
2.28M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
441
3.93k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
442
3.93k
        *eos = true;
443
3.93k
    }
444
445
2.28M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
446
2.28M
        auto op_name = to_lower(_parent->_op_name);
447
2.28M
        auto arg_op_name = dp->param<std::string>("op_name");
448
2.28M
        arg_op_name = to_lower(arg_op_name);
449
450
2.28M
        if (op_name == arg_op_name) {
451
2.28M
            *eos = true;
452
2.28M
        }
453
2.28M
    });
454
455
2.28M
    if (auto rows = block->rows()) {
456
648k
        _num_rows_returned += rows;
457
648k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
458
648k
    }
459
2.28M
}
460
461
27.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
462
27.0k
    auto result = state->get_sink_local_state_result();
463
27.0k
    if (!result) {
464
0
        return result.error();
465
0
    }
466
27.0k
    return result.value()->terminate(state);
467
27.0k
}
468
469
20.9k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
470
20.9k
    fmt::memory_buffer debug_string_buffer;
471
472
20.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
473
20.9k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
474
20.9k
    return fmt::to_string(debug_string_buffer);
475
20.9k
}
476
477
20.7k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
478
20.7k
    return state->get_sink_local_state()->debug_string(indentation_level);
479
20.7k
}
480
481
325k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
482
325k
    std::string op_name = "UNKNOWN_SINK";
483
325k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
484
485
325k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
486
325k
        op_name = it->second;
487
325k
    }
488
325k
    _name = op_name + "_OPERATOR";
489
325k
    return Status::OK();
490
325k
}
491
492
148k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
493
148k
    std::string op_name = print_plan_node_type(tnode.node_type);
494
148k
    _nereids_id = tnode.nereids_id;
495
148k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
496
148k
    _name = substr + "_SINK_OPERATOR";
497
148k
    return Status::OK();
498
148k
}
499
500
template <typename LocalStateType>
501
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
502
1.65M
                                                            LocalSinkStateInfo& info) {
503
1.65M
    auto local_state = LocalStateType::create_unique(this, state);
504
1.65M
    RETURN_IF_ERROR(local_state->init(state, info));
505
1.65M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
1.65M
    return Status::OK();
507
1.65M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
109k
                                                            LocalSinkStateInfo& info) {
503
109k
    auto local_state = LocalStateType::create_unique(this, state);
504
109k
    RETURN_IF_ERROR(local_state->init(state, info));
505
109k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
109k
    return Status::OK();
507
109k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
396k
                                                            LocalSinkStateInfo& info) {
503
396k
    auto local_state = LocalStateType::create_unique(this, state);
504
396k
    RETURN_IF_ERROR(local_state->init(state, info));
505
396k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
396k
    return Status::OK();
507
396k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
3
                                                            LocalSinkStateInfo& info) {
503
3
    auto local_state = LocalStateType::create_unique(this, state);
504
3
    RETURN_IF_ERROR(local_state->init(state, info));
505
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
3
    return Status::OK();
507
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
358
                                                            LocalSinkStateInfo& info) {
503
358
    auto local_state = LocalStateType::create_unique(this, state);
504
358
    RETURN_IF_ERROR(local_state->init(state, info));
505
358
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
358
    return Status::OK();
507
358
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
41.7k
                                                            LocalSinkStateInfo& info) {
503
41.7k
    auto local_state = LocalStateType::create_unique(this, state);
504
41.7k
    RETURN_IF_ERROR(local_state->init(state, info));
505
41.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
41.7k
    return Status::OK();
507
41.7k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
26
                                                            LocalSinkStateInfo& info) {
503
26
    auto local_state = LocalStateType::create_unique(this, state);
504
26
    RETURN_IF_ERROR(local_state->init(state, info));
505
26
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
26
    return Status::OK();
507
26
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
6.24k
                                                            LocalSinkStateInfo& info) {
503
6.24k
    auto local_state = LocalStateType::create_unique(this, state);
504
6.24k
    RETURN_IF_ERROR(local_state->init(state, info));
505
6.24k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
6.24k
    return Status::OK();
507
6.24k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
15
                                                            LocalSinkStateInfo& info) {
503
15
    auto local_state = LocalStateType::create_unique(this, state);
504
15
    RETURN_IF_ERROR(local_state->init(state, info));
505
15
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
15
    return Status::OK();
507
15
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
164k
                                                            LocalSinkStateInfo& info) {
503
164k
    auto local_state = LocalStateType::create_unique(this, state);
504
164k
    RETURN_IF_ERROR(local_state->init(state, info));
505
164k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
164k
    return Status::OK();
507
164k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
31
                                                            LocalSinkStateInfo& info) {
503
31
    auto local_state = LocalStateType::create_unique(this, state);
504
31
    RETURN_IF_ERROR(local_state->init(state, info));
505
31
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
31
    return Status::OK();
507
31
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
282k
                                                            LocalSinkStateInfo& info) {
503
282k
    auto local_state = LocalStateType::create_unique(this, state);
504
282k
    RETURN_IF_ERROR(local_state->init(state, info));
505
282k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
282k
    return Status::OK();
507
282k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
79.3k
                                                            LocalSinkStateInfo& info) {
503
79.3k
    auto local_state = LocalStateType::create_unique(this, state);
504
79.3k
    RETURN_IF_ERROR(local_state->init(state, info));
505
79.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
79.3k
    return Status::OK();
507
79.3k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
323
                                                            LocalSinkStateInfo& info) {
503
323
    auto local_state = LocalStateType::create_unique(this, state);
504
323
    RETURN_IF_ERROR(local_state->init(state, info));
505
323
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
323
    return Status::OK();
507
323
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
81
                                                            LocalSinkStateInfo& info) {
503
81
    auto local_state = LocalStateType::create_unique(this, state);
504
81
    RETURN_IF_ERROR(local_state->init(state, info));
505
81
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
81
    return Status::OK();
507
81
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
544k
                                                            LocalSinkStateInfo& info) {
503
544k
    auto local_state = LocalStateType::create_unique(this, state);
504
544k
    RETURN_IF_ERROR(local_state->init(state, info));
505
544k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
544k
    return Status::OK();
507
544k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
5.49k
                                                            LocalSinkStateInfo& info) {
503
5.49k
    auto local_state = LocalStateType::create_unique(this, state);
504
5.49k
    RETURN_IF_ERROR(local_state->init(state, info));
505
5.49k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
5.49k
    return Status::OK();
507
5.49k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
4.44k
                                                            LocalSinkStateInfo& info) {
503
4.44k
    auto local_state = LocalStateType::create_unique(this, state);
504
4.44k
    RETURN_IF_ERROR(local_state->init(state, info));
505
4.44k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
4.44k
    return Status::OK();
507
4.44k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
1.58k
                                                            LocalSinkStateInfo& info) {
503
1.58k
    auto local_state = LocalStateType::create_unique(this, state);
504
1.58k
    RETURN_IF_ERROR(local_state->init(state, info));
505
1.58k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
1.58k
    return Status::OK();
507
1.58k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
289
                                                            LocalSinkStateInfo& info) {
503
289
    auto local_state = LocalStateType::create_unique(this, state);
504
289
    RETURN_IF_ERROR(local_state->init(state, info));
505
289
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
289
    return Status::OK();
507
289
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
4.69k
                                                            LocalSinkStateInfo& info) {
503
4.69k
    auto local_state = LocalStateType::create_unique(this, state);
504
4.69k
    RETURN_IF_ERROR(local_state->init(state, info));
505
4.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
4.69k
    return Status::OK();
507
4.69k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.52k
                                                            LocalSinkStateInfo& info) {
503
2.52k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.52k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.52k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.52k
    return Status::OK();
507
2.52k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.47k
                                                            LocalSinkStateInfo& info) {
503
2.47k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.47k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.47k
    return Status::OK();
507
2.47k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
2.45k
                                                            LocalSinkStateInfo& info) {
503
2.45k
    auto local_state = LocalStateType::create_unique(this, state);
504
2.45k
    RETURN_IF_ERROR(local_state->init(state, info));
505
2.45k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
2.45k
    return Status::OK();
507
2.45k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
1
                                                            LocalSinkStateInfo& info) {
503
1
    auto local_state = LocalStateType::create_unique(this, state);
504
1
    RETURN_IF_ERROR(local_state->init(state, info));
505
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
1
    return Status::OK();
507
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
166
                                                            LocalSinkStateInfo& info) {
503
166
    auto local_state = LocalStateType::create_unique(this, state);
504
166
    RETURN_IF_ERROR(local_state->init(state, info));
505
166
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
166
    return Status::OK();
507
166
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
14
                                                            LocalSinkStateInfo& info) {
503
14
    auto local_state = LocalStateType::create_unique(this, state);
504
14
    RETURN_IF_ERROR(local_state->init(state, info));
505
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
14
    return Status::OK();
507
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
77
                                                            LocalSinkStateInfo& info) {
503
77
    auto local_state = LocalStateType::create_unique(this, state);
504
77
    RETURN_IF_ERROR(local_state->init(state, info));
505
77
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
77
    return Status::OK();
507
77
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
151
                                                            LocalSinkStateInfo& info) {
503
151
    auto local_state = LocalStateType::create_unique(this, state);
504
151
    RETURN_IF_ERROR(local_state->init(state, info));
505
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
151
    return Status::OK();
507
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
502
151
                                                            LocalSinkStateInfo& info) {
503
151
    auto local_state = LocalStateType::create_unique(this, state);
504
151
    RETURN_IF_ERROR(local_state->init(state, info));
505
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
506
151
    return Status::OK();
507
151
}
508
509
template <typename LocalStateType>
510
1.34M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
0
                                 LocalExchangeSharedState>) {
513
0
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
0
                                        MultiCastSharedState>) {
516
0
        throw Exception(Status::FatalError("should not reach here!"));
517
1.34M
    } else {
518
1.34M
        auto ss = LocalStateType::SharedStateType::create_shared();
519
1.34M
        ss->id = operator_id();
520
1.34M
        for (auto& dest : dests_id()) {
521
1.34M
            ss->related_op_ids.insert(dest);
522
1.34M
        }
523
1.34M
        return ss;
524
1.34M
    }
525
1.34M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
97.6k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
97.6k
    } else {
518
97.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
97.6k
        ss->id = operator_id();
520
97.6k
        for (auto& dest : dests_id()) {
521
97.6k
            ss->related_op_ids.insert(dest);
522
97.6k
        }
523
97.6k
        return ss;
524
97.6k
    }
525
97.6k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
397k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
397k
    } else {
518
397k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
397k
        ss->id = operator_id();
520
397k
        for (auto& dest : dests_id()) {
521
396k
            ss->related_op_ids.insert(dest);
522
396k
        }
523
397k
        return ss;
524
397k
    }
525
397k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
3
    } else {
518
3
        auto ss = LocalStateType::SharedStateType::create_shared();
519
3
        ss->id = operator_id();
520
3
        for (auto& dest : dests_id()) {
521
3
            ss->related_op_ids.insert(dest);
522
3
        }
523
3
        return ss;
524
3
    }
525
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
358
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
358
    } else {
518
358
        auto ss = LocalStateType::SharedStateType::create_shared();
519
358
        ss->id = operator_id();
520
358
        for (auto& dest : dests_id()) {
521
358
            ss->related_op_ids.insert(dest);
522
358
        }
523
358
        return ss;
524
358
    }
525
358
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
41.6k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
41.6k
    } else {
518
41.6k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
41.6k
        ss->id = operator_id();
520
41.6k
        for (auto& dest : dests_id()) {
521
41.6k
            ss->related_op_ids.insert(dest);
522
41.6k
        }
523
41.6k
        return ss;
524
41.6k
    }
525
41.6k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
510
26
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
26
    } else {
518
26
        auto ss = LocalStateType::SharedStateType::create_shared();
519
26
        ss->id = operator_id();
520
26
        for (auto& dest : dests_id()) {
521
26
            ss->related_op_ids.insert(dest);
522
26
        }
523
26
        return ss;
524
26
    }
525
26
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
6.26k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
6.26k
    } else {
518
6.26k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
6.26k
        ss->id = operator_id();
520
6.26k
        for (auto& dest : dests_id()) {
521
6.25k
            ss->related_op_ids.insert(dest);
522
6.25k
        }
523
6.26k
        return ss;
524
6.26k
    }
525
6.26k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
15
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
15
    } else {
518
15
        auto ss = LocalStateType::SharedStateType::create_shared();
519
15
        ss->id = operator_id();
520
15
        for (auto& dest : dests_id()) {
521
15
            ss->related_op_ids.insert(dest);
522
15
        }
523
15
        return ss;
524
15
    }
525
15
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
165k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
165k
    } else {
518
165k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
165k
        ss->id = operator_id();
520
165k
        for (auto& dest : dests_id()) {
521
164k
            ss->related_op_ids.insert(dest);
522
164k
        }
523
165k
        return ss;
524
165k
    }
525
165k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
33
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
33
    } else {
518
33
        auto ss = LocalStateType::SharedStateType::create_shared();
519
33
        ss->id = operator_id();
520
33
        for (auto& dest : dests_id()) {
521
33
            ss->related_op_ids.insert(dest);
522
33
        }
523
33
        return ss;
524
33
    }
525
33
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
79.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
79.3k
    } else {
518
79.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
79.3k
        ss->id = operator_id();
520
79.4k
        for (auto& dest : dests_id()) {
521
79.4k
            ss->related_op_ids.insert(dest);
522
79.4k
        }
523
79.3k
        return ss;
524
79.3k
    }
525
79.3k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
80
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
80
    } else {
518
80
        auto ss = LocalStateType::SharedStateType::create_shared();
519
80
        ss->id = operator_id();
520
80
        for (auto& dest : dests_id()) {
521
80
            ss->related_op_ids.insert(dest);
522
80
        }
523
80
        return ss;
524
80
    }
525
80
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
543k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
543k
    } else {
518
543k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
543k
        ss->id = operator_id();
520
543k
        for (auto& dest : dests_id()) {
521
542k
            ss->related_op_ids.insert(dest);
522
542k
        }
523
543k
        return ss;
524
543k
    }
525
543k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
5.50k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
5.50k
    } else {
518
5.50k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
5.50k
        ss->id = operator_id();
520
5.50k
        for (auto& dest : dests_id()) {
521
5.49k
            ss->related_op_ids.insert(dest);
522
5.49k
        }
523
5.50k
        return ss;
524
5.50k
    }
525
5.50k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
390
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
390
    } else {
518
390
        auto ss = LocalStateType::SharedStateType::create_shared();
519
390
        ss->id = operator_id();
520
390
        for (auto& dest : dests_id()) {
521
389
            ss->related_op_ids.insert(dest);
522
389
        }
523
390
        return ss;
524
390
    }
525
390
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
510
2.45k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
2.45k
    } else {
518
2.45k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.45k
        ss->id = operator_id();
520
2.45k
        for (auto& dest : dests_id()) {
521
2.44k
            ss->related_op_ids.insert(dest);
522
2.44k
        }
523
2.45k
        return ss;
524
2.45k
    }
525
2.45k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
510
2.46k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
2.46k
    } else {
518
2.46k
        auto ss = LocalStateType::SharedStateType::create_shared();
519
2.46k
        ss->id = operator_id();
520
2.46k
        for (auto& dest : dests_id()) {
521
2.45k
            ss->related_op_ids.insert(dest);
522
2.45k
        }
523
2.46k
        return ss;
524
2.46k
    }
525
2.46k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
166
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
166
    } else {
518
166
        auto ss = LocalStateType::SharedStateType::create_shared();
519
166
        ss->id = operator_id();
520
166
        for (auto& dest : dests_id()) {
521
166
            ss->related_op_ids.insert(dest);
522
166
        }
523
166
        return ss;
524
166
    }
525
166
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
510
77
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
511
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
512
                                 LocalExchangeSharedState>) {
513
        return nullptr;
514
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
515
                                        MultiCastSharedState>) {
516
        throw Exception(Status::FatalError("should not reach here!"));
517
77
    } else {
518
77
        auto ss = LocalStateType::SharedStateType::create_shared();
519
77
        ss->id = operator_id();
520
77
        for (auto& dest : dests_id()) {
521
76
            ss->related_op_ids.insert(dest);
522
76
        }
523
77
        return ss;
524
77
    }
525
77
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
526
527
template <typename LocalStateType>
528
2.18M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.18M
    auto local_state = LocalStateType::create_unique(state, this);
530
2.18M
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.18M
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.18M
    return Status::OK();
533
2.18M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
61.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
61.6k
    auto local_state = LocalStateType::create_unique(state, this);
530
61.6k
    RETURN_IF_ERROR(local_state->init(state, info));
531
61.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
61.6k
    return Status::OK();
533
61.6k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
219k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
219k
    auto local_state = LocalStateType::create_unique(state, this);
530
219k
    RETURN_IF_ERROR(local_state->init(state, info));
531
219k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
219k
    return Status::OK();
533
219k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
80
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
80
    auto local_state = LocalStateType::create_unique(state, this);
530
80
    RETURN_IF_ERROR(local_state->init(state, info));
531
80
    state->emplace_local_state(operator_id(), std::move(local_state));
532
80
    return Status::OK();
533
80
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.67k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.67k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.67k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.67k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.67k
    return Status::OK();
533
2.67k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
6.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
6.24k
    auto local_state = LocalStateType::create_unique(state, this);
530
6.24k
    RETURN_IF_ERROR(local_state->init(state, info));
531
6.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
6.24k
    return Status::OK();
533
6.24k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
6.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
6.44k
    auto local_state = LocalStateType::create_unique(state, this);
530
6.44k
    RETURN_IF_ERROR(local_state->init(state, info));
531
6.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
6.44k
    return Status::OK();
533
6.44k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
25
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
25
    auto local_state = LocalStateType::create_unique(state, this);
530
25
    RETURN_IF_ERROR(local_state->init(state, info));
531
25
    state->emplace_local_state(operator_id(), std::move(local_state));
532
25
    return Status::OK();
533
25
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
158k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
158k
    auto local_state = LocalStateType::create_unique(state, this);
530
158k
    RETURN_IF_ERROR(local_state->init(state, info));
531
158k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
158k
    return Status::OK();
533
158k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
79.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
79.2k
    auto local_state = LocalStateType::create_unique(state, this);
530
79.2k
    RETURN_IF_ERROR(local_state->init(state, info));
531
79.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
79.2k
    return Status::OK();
533
79.2k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
348
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
348
    auto local_state = LocalStateType::create_unique(state, this);
530
348
    RETURN_IF_ERROR(local_state->init(state, info));
531
348
    state->emplace_local_state(operator_id(), std::move(local_state));
532
348
    return Status::OK();
533
348
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
71
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
71
    auto local_state = LocalStateType::create_unique(state, this);
530
71
    RETURN_IF_ERROR(local_state->init(state, info));
531
71
    state->emplace_local_state(operator_id(), std::move(local_state));
532
71
    return Status::OK();
533
71
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
4.93k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.93k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.93k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.93k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.93k
    return Status::OK();
533
4.93k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
365k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
365k
    auto local_state = LocalStateType::create_unique(state, this);
530
365k
    RETURN_IF_ERROR(local_state->init(state, info));
531
365k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
365k
    return Status::OK();
533
365k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.00k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.00k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.00k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.00k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.00k
    return Status::OK();
533
1.00k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
5.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
5.48k
    auto local_state = LocalStateType::create_unique(state, this);
530
5.48k
    RETURN_IF_ERROR(local_state->init(state, info));
531
5.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
5.48k
    return Status::OK();
533
5.48k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
21
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
21
    auto local_state = LocalStateType::create_unique(state, this);
530
21
    RETURN_IF_ERROR(local_state->init(state, info));
531
21
    state->emplace_local_state(operator_id(), std::move(local_state));
532
21
    return Status::OK();
533
21
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.45k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.45k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.45k
    return Status::OK();
533
1.45k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
50.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
50.2k
    auto local_state = LocalStateType::create_unique(state, this);
530
50.2k
    RETURN_IF_ERROR(local_state->init(state, info));
531
50.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
50.2k
    return Status::OK();
533
50.2k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
4.04k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.04k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.04k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.04k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.04k
    return Status::OK();
533
4.04k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
288
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
288
    auto local_state = LocalStateType::create_unique(state, this);
530
288
    RETURN_IF_ERROR(local_state->init(state, info));
531
288
    state->emplace_local_state(operator_id(), std::move(local_state));
532
288
    return Status::OK();
533
288
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.48k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.48k
    return Status::OK();
533
2.48k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
2.47k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
2.47k
    auto local_state = LocalStateType::create_unique(state, this);
530
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
531
2.47k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
2.47k
    return Status::OK();
533
2.47k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
275
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
275
    auto local_state = LocalStateType::create_unique(state, this);
530
275
    RETURN_IF_ERROR(local_state->init(state, info));
531
275
    state->emplace_local_state(operator_id(), std::move(local_state));
532
275
    return Status::OK();
533
275
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.54k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.54k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.54k
    return Status::OK();
533
1.54k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
4.92k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.92k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.92k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.92k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.92k
    return Status::OK();
533
4.92k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
670k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
670k
    auto local_state = LocalStateType::create_unique(state, this);
530
670k
    RETURN_IF_ERROR(local_state->init(state, info));
531
670k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
670k
    return Status::OK();
533
670k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
14
    auto local_state = LocalStateType::create_unique(state, this);
530
14
    RETURN_IF_ERROR(local_state->init(state, info));
531
14
    state->emplace_local_state(operator_id(), std::move(local_state));
532
14
    return Status::OK();
533
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
151
    auto local_state = LocalStateType::create_unique(state, this);
530
151
    RETURN_IF_ERROR(local_state->init(state, info));
531
151
    state->emplace_local_state(operator_id(), std::move(local_state));
532
151
    return Status::OK();
533
151
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
530
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
531
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
1.95k
    return Status::OK();
533
1.95k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
655
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
655
    auto local_state = LocalStateType::create_unique(state, this);
530
655
    RETURN_IF_ERROR(local_state->init(state, info));
531
655
    state->emplace_local_state(operator_id(), std::move(local_state));
532
655
    return Status::OK();
533
655
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
769
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
769
    auto local_state = LocalStateType::create_unique(state, this);
530
769
    RETURN_IF_ERROR(local_state->init(state, info));
531
769
    state->emplace_local_state(operator_id(), std::move(local_state));
532
769
    return Status::OK();
533
769
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
4.67k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
4.67k
    auto local_state = LocalStateType::create_unique(state, this);
530
4.67k
    RETURN_IF_ERROR(local_state->init(state, info));
531
4.67k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
4.67k
    return Status::OK();
533
4.67k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
528
523k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
529
523k
    auto local_state = LocalStateType::create_unique(state, this);
530
523k
    RETURN_IF_ERROR(local_state->init(state, info));
531
523k
    state->emplace_local_state(operator_id(), std::move(local_state));
532
523k
    return Status::OK();
533
523k
}
534
535
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
536
                                                         RuntimeState* state)
537
1.65M
        : _parent(parent), _state(state) {}
538
539
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
540
2.18M
        : _num_rows_returned(0),
541
2.18M
          _rows_returned_counter(nullptr),
542
2.18M
          _parent(parent),
543
2.18M
          _state(state),
544
2.18M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
545
546
template <typename SharedStateArg>
547
2.18M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
2.18M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
2.18M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
2.18M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
2.18M
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
2.18M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
2.18M
    _operator_profile->add_child(_common_profile.get(), true);
556
2.18M
    _operator_profile->add_child(_custom_profile.get(), true);
557
2.18M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
2.18M
    if constexpr (!is_fake_shared) {
559
1.05M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
683k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
683k
                                    .first.get()
562
683k
                                    ->template cast<SharedStateArg>();
563
564
683k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
683k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
683k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
683k
        } else if (info.shared_state) {
568
314k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
0
                DCHECK(false);
570
0
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
314k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
314k
            _dependency = _shared_state->create_source_dependency(
575
314k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
314k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
314k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
314k
        } else {
579
54.0k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
2.14k
                DCHECK(false);
581
2.14k
            }
582
54.0k
        }
583
1.05M
    }
584
585
2.18M
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
2.18M
    _rows_returned_counter =
590
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
2.18M
    _blocks_returned_counter =
592
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
2.18M
    _output_block_bytes_counter =
594
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
2.18M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
2.18M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
2.18M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
2.18M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
2.18M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
2.18M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
2.18M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
2.18M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
2.18M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
2.18M
    _memory_used_counter =
605
2.18M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
2.18M
    _common_profile->add_info_string("IsColocate",
607
2.18M
                                     std::to_string(_parent->is_colocated_operator()));
608
2.18M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
2.18M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
2.18M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
2.18M
    return Status::OK();
612
2.18M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
61.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
61.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
61.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
61.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
61.8k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
61.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
61.8k
    _operator_profile->add_child(_common_profile.get(), true);
556
61.8k
    _operator_profile->add_child(_custom_profile.get(), true);
557
61.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
61.8k
    if constexpr (!is_fake_shared) {
559
61.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
12.0k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
12.0k
                                    .first.get()
562
12.0k
                                    ->template cast<SharedStateArg>();
563
564
12.0k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
12.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
12.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
49.7k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
49.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
49.3k
            _dependency = _shared_state->create_source_dependency(
575
49.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
49.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
49.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
49.3k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
343
        }
583
61.8k
    }
584
585
61.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
61.8k
    _rows_returned_counter =
590
61.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
61.8k
    _blocks_returned_counter =
592
61.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
61.8k
    _output_block_bytes_counter =
594
61.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
61.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
61.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
61.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
61.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
61.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
61.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
61.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
61.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
61.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
61.8k
    _memory_used_counter =
605
61.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
61.8k
    _common_profile->add_info_string("IsColocate",
607
61.8k
                                     std::to_string(_parent->is_colocated_operator()));
608
61.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
61.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
61.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
61.8k
    return Status::OK();
612
61.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
1
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
1
    _operator_profile->add_child(_common_profile.get(), true);
556
1
    _operator_profile->add_child(_custom_profile.get(), true);
557
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
1
    if constexpr (!is_fake_shared) {
559
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
1
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
1
            _dependency = _shared_state->create_source_dependency(
575
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
1
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
1
    }
584
585
1
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
1
    _rows_returned_counter =
590
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
1
    _blocks_returned_counter =
592
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
1
    _output_block_bytes_counter =
594
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
1
    _memory_used_counter =
605
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
1
    _common_profile->add_info_string("IsColocate",
607
1
                                     std::to_string(_parent->is_colocated_operator()));
608
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
1
    return Status::OK();
612
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
165k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
165k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
165k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
165k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
165k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
165k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
165k
    _operator_profile->add_child(_common_profile.get(), true);
556
165k
    _operator_profile->add_child(_custom_profile.get(), true);
557
165k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
165k
    if constexpr (!is_fake_shared) {
559
165k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
165k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
162k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
162k
            _dependency = _shared_state->create_source_dependency(
575
162k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
162k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
162k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
162k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
2.71k
        }
583
165k
    }
584
585
165k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
165k
    _rows_returned_counter =
590
165k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
165k
    _blocks_returned_counter =
592
165k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
165k
    _output_block_bytes_counter =
594
165k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
165k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
165k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
165k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
165k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
165k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
165k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
165k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
165k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
165k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
165k
    _memory_used_counter =
605
165k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
165k
    _common_profile->add_info_string("IsColocate",
607
165k
                                     std::to_string(_parent->is_colocated_operator()));
608
165k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
165k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
165k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
165k
    return Status::OK();
612
165k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
25
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
25
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
25
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
25
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
25
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
25
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
25
    _operator_profile->add_child(_common_profile.get(), true);
556
25
    _operator_profile->add_child(_custom_profile.get(), true);
557
25
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
25
    if constexpr (!is_fake_shared) {
559
25
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
25
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
25
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
25
            _dependency = _shared_state->create_source_dependency(
575
25
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
25
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
25
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
25
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
25
    }
584
585
25
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
25
    _rows_returned_counter =
590
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
25
    _blocks_returned_counter =
592
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
25
    _output_block_bytes_counter =
594
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
25
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
25
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
25
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
25
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
25
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
25
    _memory_used_counter =
605
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
25
    _common_profile->add_info_string("IsColocate",
607
25
                                     std::to_string(_parent->is_colocated_operator()));
608
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
25
    return Status::OK();
612
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
5.50k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
5.50k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
5.50k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
5.50k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
5.50k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
5.50k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
5.50k
    _operator_profile->add_child(_common_profile.get(), true);
556
5.50k
    _operator_profile->add_child(_custom_profile.get(), true);
557
5.50k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
5.50k
    if constexpr (!is_fake_shared) {
559
5.50k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
5.50k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
5.46k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
5.46k
            _dependency = _shared_state->create_source_dependency(
575
5.46k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
5.46k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
5.46k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
5.46k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
38
        }
583
5.50k
    }
584
585
5.50k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
5.50k
    _rows_returned_counter =
590
5.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
5.50k
    _blocks_returned_counter =
592
5.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
5.50k
    _output_block_bytes_counter =
594
5.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
5.50k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
5.50k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
5.50k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
5.50k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
5.50k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
5.50k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
5.50k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
5.50k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
5.50k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
5.50k
    _memory_used_counter =
605
5.50k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
5.50k
    _common_profile->add_info_string("IsColocate",
607
5.50k
                                     std::to_string(_parent->is_colocated_operator()));
608
5.50k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
5.50k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
5.50k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
5.50k
    return Status::OK();
612
5.50k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
6.26k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
6.26k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
6.26k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
6.26k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
6.26k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
6.26k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
6.26k
    _operator_profile->add_child(_common_profile.get(), true);
556
6.26k
    _operator_profile->add_child(_custom_profile.get(), true);
557
6.26k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
6.26k
    if constexpr (!is_fake_shared) {
559
6.26k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
6.26k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
6.23k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
6.23k
            _dependency = _shared_state->create_source_dependency(
575
6.23k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
6.23k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
6.23k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
6.23k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
37
        }
583
6.26k
    }
584
585
6.26k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
6.26k
    _rows_returned_counter =
590
6.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
6.26k
    _blocks_returned_counter =
592
6.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
6.26k
    _output_block_bytes_counter =
594
6.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
6.26k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
6.26k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
6.26k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
6.26k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
6.26k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
6.26k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
6.26k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
6.26k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
6.26k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
6.26k
    _memory_used_counter =
605
6.26k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
6.26k
    _common_profile->add_info_string("IsColocate",
607
6.26k
                                     std::to_string(_parent->is_colocated_operator()));
608
6.26k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
6.26k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
6.26k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
6.26k
    return Status::OK();
612
6.26k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
79.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
79.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
79.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
79.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
79.3k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
79.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
79.3k
    _operator_profile->add_child(_common_profile.get(), true);
556
79.3k
    _operator_profile->add_child(_custom_profile.get(), true);
557
79.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
79.3k
    if constexpr (!is_fake_shared) {
559
79.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
79.3k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
78.7k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
78.7k
            _dependency = _shared_state->create_source_dependency(
575
78.7k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
78.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
78.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
78.7k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
613
        }
583
79.3k
    }
584
585
79.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
79.3k
    _rows_returned_counter =
590
79.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
79.3k
    _blocks_returned_counter =
592
79.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
79.3k
    _output_block_bytes_counter =
594
79.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
79.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
79.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
79.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
79.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
79.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
79.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
79.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
79.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
79.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
79.3k
    _memory_used_counter =
605
79.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
79.3k
    _common_profile->add_info_string("IsColocate",
607
79.3k
                                     std::to_string(_parent->is_colocated_operator()));
608
79.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
79.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
79.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
79.3k
    return Status::OK();
612
79.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
351
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
351
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
351
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
351
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
351
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
351
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
351
    _operator_profile->add_child(_common_profile.get(), true);
556
351
    _operator_profile->add_child(_custom_profile.get(), true);
557
351
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
351
    if constexpr (!is_fake_shared) {
559
352
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
352
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
352
                                    .first.get()
562
352
                                    ->template cast<SharedStateArg>();
563
564
352
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
352
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
352
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
18.4E
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
0
            _dependency = _shared_state->create_source_dependency(
575
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
18.4E
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
18.4E
        }
583
351
    }
584
585
351
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
351
    _rows_returned_counter =
590
351
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
351
    _blocks_returned_counter =
592
351
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
351
    _output_block_bytes_counter =
594
351
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
351
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
351
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
351
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
351
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
351
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
351
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
351
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
351
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
351
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
351
    _memory_used_counter =
605
351
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
351
    _common_profile->add_info_string("IsColocate",
607
351
                                     std::to_string(_parent->is_colocated_operator()));
608
351
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
351
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
351
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
351
    return Status::OK();
612
351
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
71
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
71
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
71
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
71
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
71
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
71
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
71
    _operator_profile->add_child(_common_profile.get(), true);
556
71
    _operator_profile->add_child(_custom_profile.get(), true);
557
71
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
71
    if constexpr (!is_fake_shared) {
559
71
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
71
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
71
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
71
            _dependency = _shared_state->create_source_dependency(
575
71
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
71
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
71
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
71
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
71
    }
584
585
71
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
71
    _rows_returned_counter =
590
71
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
71
    _blocks_returned_counter =
592
71
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
71
    _output_block_bytes_counter =
594
71
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
71
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
71
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
71
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
71
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
71
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
71
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
71
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
71
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
71
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
71
    _memory_used_counter =
605
71
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
71
    _common_profile->add_info_string("IsColocate",
607
71
                                     std::to_string(_parent->is_colocated_operator()));
608
71
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
71
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
71
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
71
    return Status::OK();
612
71
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
1.13M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
1.13M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
1.13M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
1.13M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
1.13M
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
1.13M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
1.13M
    _operator_profile->add_child(_common_profile.get(), true);
556
1.13M
    _operator_profile->add_child(_custom_profile.get(), true);
557
1.13M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
    if constexpr (!is_fake_shared) {
559
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
                                    .first.get()
562
                                    ->template cast<SharedStateArg>();
563
564
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
            _dependency = _shared_state->create_source_dependency(
575
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
        }
583
    }
584
585
1.13M
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
1.13M
    _rows_returned_counter =
590
1.13M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
1.13M
    _blocks_returned_counter =
592
1.13M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
1.13M
    _output_block_bytes_counter =
594
1.13M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
1.13M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
1.13M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1.13M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1.13M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1.13M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
1.13M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
1.13M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
1.13M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
1.13M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
1.13M
    _memory_used_counter =
605
1.13M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
1.13M
    _common_profile->add_info_string("IsColocate",
607
1.13M
                                     std::to_string(_parent->is_colocated_operator()));
608
1.13M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
1.13M
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
1.13M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
1.13M
    return Status::OK();
612
1.13M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
50.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
50.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
50.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
50.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
50.2k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
50.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
50.2k
    _operator_profile->add_child(_common_profile.get(), true);
556
50.2k
    _operator_profile->add_child(_custom_profile.get(), true);
557
50.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
50.2k
    if constexpr (!is_fake_shared) {
559
50.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
50.2k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
2.10k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
2.10k
            _dependency = _shared_state->create_source_dependency(
575
2.10k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
2.10k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
2.10k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
48.1k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
48.1k
        }
583
50.2k
    }
584
585
50.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
50.2k
    _rows_returned_counter =
590
50.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
50.2k
    _blocks_returned_counter =
592
50.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
50.2k
    _output_block_bytes_counter =
594
50.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
50.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
50.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
50.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
50.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
50.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
50.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
50.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
50.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
50.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
50.2k
    _memory_used_counter =
605
50.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
50.2k
    _common_profile->add_info_string("IsColocate",
607
50.2k
                                     std::to_string(_parent->is_colocated_operator()));
608
50.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
50.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
50.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
50.2k
    return Status::OK();
612
50.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
17
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
17
    _operator_profile->add_child(_common_profile.get(), true);
556
17
    _operator_profile->add_child(_custom_profile.get(), true);
557
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
17
    if constexpr (!is_fake_shared) {
559
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
17
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
17
            _dependency = _shared_state->create_source_dependency(
575
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
17
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
17
    }
584
585
17
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
17
    _rows_returned_counter =
590
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
17
    _blocks_returned_counter =
592
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
17
    _output_block_bytes_counter =
594
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
17
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
17
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
17
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
17
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
17
    _memory_used_counter =
605
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
17
    _common_profile->add_info_string("IsColocate",
607
17
                                     std::to_string(_parent->is_colocated_operator()));
608
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
17
    return Status::OK();
612
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
4.04k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
4.04k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
4.04k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
4.04k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
4.04k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
4.04k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
4.04k
    _operator_profile->add_child(_common_profile.get(), true);
556
4.04k
    _operator_profile->add_child(_custom_profile.get(), true);
557
4.04k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
4.04k
    if constexpr (!is_fake_shared) {
559
4.04k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
4.04k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
4.04k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
4.04k
            _dependency = _shared_state->create_source_dependency(
575
4.04k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
4.04k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
4.04k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
4.04k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
1
        }
583
4.04k
    }
584
585
4.04k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
4.04k
    _rows_returned_counter =
590
4.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
4.04k
    _blocks_returned_counter =
592
4.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
4.04k
    _output_block_bytes_counter =
594
4.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
4.04k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
4.04k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
4.04k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
4.04k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
4.04k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
4.04k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
4.04k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
4.04k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
4.04k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
4.04k
    _memory_used_counter =
605
4.04k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
4.04k
    _common_profile->add_info_string("IsColocate",
607
4.04k
                                     std::to_string(_parent->is_colocated_operator()));
608
4.04k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
4.04k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
4.04k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
4.04k
    return Status::OK();
612
4.04k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
391
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
391
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
391
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
391
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
391
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
391
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
391
    _operator_profile->add_child(_common_profile.get(), true);
556
391
    _operator_profile->add_child(_custom_profile.get(), true);
557
391
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
391
    if constexpr (!is_fake_shared) {
559
391
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
391
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
390
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
390
            _dependency = _shared_state->create_source_dependency(
575
390
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
390
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
390
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
390
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
1
        }
583
391
    }
584
585
391
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
391
    _rows_returned_counter =
590
391
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
391
    _blocks_returned_counter =
592
391
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
391
    _output_block_bytes_counter =
594
391
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
391
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
391
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
391
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
391
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
391
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
391
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
391
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
391
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
391
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
391
    _memory_used_counter =
605
391
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
391
    _common_profile->add_info_string("IsColocate",
607
391
                                     std::to_string(_parent->is_colocated_operator()));
608
391
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
391
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
391
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
391
    return Status::OK();
612
391
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
4.97k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
4.97k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
4.97k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
4.97k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
4.97k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
4.97k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
4.97k
    _operator_profile->add_child(_common_profile.get(), true);
556
4.97k
    _operator_profile->add_child(_custom_profile.get(), true);
557
4.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
4.97k
    if constexpr (!is_fake_shared) {
559
4.97k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
4.97k
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
4.94k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
4.94k
            _dependency = _shared_state->create_source_dependency(
575
4.94k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
4.94k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
4.94k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
4.94k
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
26
        }
583
4.97k
    }
584
585
4.97k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
4.97k
    _rows_returned_counter =
590
4.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
4.97k
    _blocks_returned_counter =
592
4.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
4.97k
    _output_block_bytes_counter =
594
4.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
4.97k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
4.97k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
4.97k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
4.97k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
4.97k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
4.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
4.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
4.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
4.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
4.97k
    _memory_used_counter =
605
4.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
4.97k
    _common_profile->add_info_string("IsColocate",
607
4.97k
                                     std::to_string(_parent->is_colocated_operator()));
608
4.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
4.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
4.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
4.97k
    return Status::OK();
612
4.97k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
672k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
672k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
672k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
672k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
672k
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
672k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
672k
    _operator_profile->add_child(_common_profile.get(), true);
556
672k
    _operator_profile->add_child(_custom_profile.get(), true);
557
672k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
672k
    if constexpr (!is_fake_shared) {
559
672k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
670k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
670k
                                    .first.get()
562
670k
                                    ->template cast<SharedStateArg>();
563
564
670k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
670k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
670k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
670k
        } else if (info.shared_state) {
568
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
0
                DCHECK(false);
570
0
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
0
            _dependency = _shared_state->create_source_dependency(
575
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
2.14k
        } else {
579
2.14k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
2.14k
                DCHECK(false);
581
2.14k
            }
582
2.14k
        }
583
672k
    }
584
585
672k
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
672k
    _rows_returned_counter =
590
672k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
672k
    _blocks_returned_counter =
592
672k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
672k
    _output_block_bytes_counter =
594
672k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
672k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
672k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
672k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
672k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
672k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
672k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
672k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
672k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
672k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
672k
    _memory_used_counter =
605
672k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
672k
    _common_profile->add_info_string("IsColocate",
607
672k
                                     std::to_string(_parent->is_colocated_operator()));
608
672k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
672k
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
672k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
672k
    return Status::OK();
612
672k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
547
151
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
548
151
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
549
151
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
550
151
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
551
151
    _operator_profile->set_metadata(_parent->node_id());
552
    // indent is false so that source operator will have same
553
    // indentation_level with its parent operator.
554
151
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
555
151
    _operator_profile->add_child(_common_profile.get(), true);
556
151
    _operator_profile->add_child(_custom_profile.get(), true);
557
151
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
558
151
    if constexpr (!is_fake_shared) {
559
151
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
560
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
561
0
                                    .first.get()
562
0
                                    ->template cast<SharedStateArg>();
563
564
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
565
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
566
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
567
151
        } else if (info.shared_state) {
568
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
569
                DCHECK(false);
570
            }
571
            // For UnionSourceOperator without children, there is no shared state.
572
151
            _shared_state = info.shared_state->template cast<SharedStateArg>();
573
574
151
            _dependency = _shared_state->create_source_dependency(
575
151
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
576
151
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
577
151
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
578
151
        } else {
579
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
580
                DCHECK(false);
581
            }
582
0
        }
583
151
    }
584
585
151
    if (must_set_shared_state() && _shared_state == nullptr) {
586
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
587
0
    }
588
589
151
    _rows_returned_counter =
590
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
591
151
    _blocks_returned_counter =
592
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
593
151
    _output_block_bytes_counter =
594
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
595
151
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
596
151
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
151
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
151
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
151
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
600
151
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
601
151
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
602
151
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
603
151
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
604
151
    _memory_used_counter =
605
151
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
606
151
    _common_profile->add_info_string("IsColocate",
607
151
                                     std::to_string(_parent->is_colocated_operator()));
608
151
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
609
151
    _common_profile->add_info_string("FollowedByShuffledOperator",
610
151
                                     std::to_string(_parent->followed_by_shuffled_operator()));
611
151
    return Status::OK();
612
151
}
613
614
template <typename SharedStateArg>
615
2.18M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
2.18M
    _conjuncts.resize(_parent->_conjuncts.size());
617
2.18M
    _projections.resize(_parent->_projections.size());
618
2.46M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
276k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
276k
    }
621
3.96M
    for (size_t i = 0; i < _projections.size(); i++) {
622
1.77M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
1.77M
    }
624
2.18M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
2.19M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
7.87k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
48.1k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
40.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
40.2k
                    state, _intermediate_projections[i][j]));
630
40.2k
        }
631
7.87k
    }
632
2.18M
    return Status::OK();
633
2.18M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
61.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
61.8k
    _conjuncts.resize(_parent->_conjuncts.size());
617
61.8k
    _projections.resize(_parent->_projections.size());
618
62.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
979
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
979
    }
621
333k
    for (size_t i = 0; i < _projections.size(); i++) {
622
271k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
271k
    }
624
61.8k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
62.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
523
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
4.52k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
4.00k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
4.00k
                    state, _intermediate_projections[i][j]));
630
4.00k
        }
631
523
    }
632
61.8k
    return Status::OK();
633
61.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
3
    _conjuncts.resize(_parent->_conjuncts.size());
617
3
    _projections.resize(_parent->_projections.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
3
    return Status::OK();
633
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
165k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
165k
    _conjuncts.resize(_parent->_conjuncts.size());
617
165k
    _projections.resize(_parent->_projections.size());
618
165k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
165k
    for (size_t i = 0; i < _projections.size(); i++) {
622
283
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
283
    }
624
165k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
165k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
165k
    return Status::OK();
633
165k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
25
    _conjuncts.resize(_parent->_conjuncts.size());
617
25
    _projections.resize(_parent->_projections.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
25
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
25
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
25
    return Status::OK();
633
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
5.49k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
5.49k
    _conjuncts.resize(_parent->_conjuncts.size());
617
5.49k
    _projections.resize(_parent->_projections.size());
618
5.55k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
59
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
59
    }
621
26.7k
    for (size_t i = 0; i < _projections.size(); i++) {
622
21.2k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
21.2k
    }
624
5.49k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
5.53k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
38
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
371
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
333
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
333
                    state, _intermediate_projections[i][j]));
630
333
        }
631
38
    }
632
5.49k
    return Status::OK();
633
5.49k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
6.27k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
6.27k
    _conjuncts.resize(_parent->_conjuncts.size());
617
6.27k
    _projections.resize(_parent->_projections.size());
618
6.92k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
645
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
645
    }
621
17.0k
    for (size_t i = 0; i < _projections.size(); i++) {
622
10.7k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
10.7k
    }
624
6.27k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
6.37k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
94
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
722
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
628
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
628
                    state, _intermediate_projections[i][j]));
630
628
        }
631
94
    }
632
6.27k
    return Status::OK();
633
6.27k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
79.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
79.4k
    _conjuncts.resize(_parent->_conjuncts.size());
617
79.4k
    _projections.resize(_parent->_projections.size());
618
81.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.72k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.72k
    }
621
289k
    for (size_t i = 0; i < _projections.size(); i++) {
622
209k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
209k
    }
624
79.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
79.5k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
164
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
1.20k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
1.03k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
1.03k
                    state, _intermediate_projections[i][j]));
630
1.03k
        }
631
164
    }
632
79.4k
    return Status::OK();
633
79.4k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
352
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
352
    _conjuncts.resize(_parent->_conjuncts.size());
617
352
    _projections.resize(_parent->_projections.size());
618
354
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
2
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
2
    }
621
1.32k
    for (size_t i = 0; i < _projections.size(); i++) {
622
976
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
976
    }
624
352
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
352
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
352
    return Status::OK();
633
352
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
75
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
75
    _conjuncts.resize(_parent->_conjuncts.size());
617
75
    _projections.resize(_parent->_projections.size());
618
75
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
173
    for (size_t i = 0; i < _projections.size(); i++) {
622
98
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
98
    }
624
75
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
75
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
75
    return Status::OK();
633
75
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
1.13M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
1.13M
    _conjuncts.resize(_parent->_conjuncts.size());
617
1.13M
    _projections.resize(_parent->_projections.size());
618
1.40M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
272k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
272k
    }
621
2.31M
    for (size_t i = 0; i < _projections.size(); i++) {
622
1.17M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
1.17M
    }
624
1.13M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
1.14M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
7.05k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
41.3k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
34.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
34.2k
                    state, _intermediate_projections[i][j]));
630
34.2k
        }
631
7.05k
    }
632
1.13M
    return Status::OK();
633
1.13M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
50.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
50.3k
    _conjuncts.resize(_parent->_conjuncts.size());
617
50.3k
    _projections.resize(_parent->_projections.size());
618
50.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
134k
    for (size_t i = 0; i < _projections.size(); i++) {
622
83.8k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
83.8k
    }
624
50.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
50.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
50.3k
    return Status::OK();
633
50.3k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
17
    _conjuncts.resize(_parent->_conjuncts.size());
617
17
    _projections.resize(_parent->_projections.size());
618
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
17
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
17
    return Status::OK();
633
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
4.03k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
4.03k
    _conjuncts.resize(_parent->_conjuncts.size());
617
4.03k
    _projections.resize(_parent->_projections.size());
618
4.54k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
510
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
510
    }
621
4.03k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
4.03k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
4.03k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
4.03k
    return Status::OK();
633
4.03k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
390
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
390
    _conjuncts.resize(_parent->_conjuncts.size());
617
390
    _projections.resize(_parent->_projections.size());
618
390
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
390
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
390
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
390
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
390
    return Status::OK();
633
390
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
4.96k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
4.96k
    _conjuncts.resize(_parent->_conjuncts.size());
617
4.96k
    _projections.resize(_parent->_projections.size());
618
4.96k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
4.96k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
4.96k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
4.96k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
4.96k
    return Status::OK();
633
4.96k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
673k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
673k
    _conjuncts.resize(_parent->_conjuncts.size());
617
673k
    _projections.resize(_parent->_projections.size());
618
673k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
673k
    for (size_t i = 0; i < _projections.size(); i++) {
622
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
0
    }
624
673k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
673k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
0
                    state, _intermediate_projections[i][j]));
630
0
        }
631
0
    }
632
673k
    return Status::OK();
633
673k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
615
151
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
616
151
    _conjuncts.resize(_parent->_conjuncts.size());
617
151
    _projections.resize(_parent->_projections.size());
618
158
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
447
    for (size_t i = 0; i < _projections.size(); i++) {
622
296
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
623
296
    }
624
151
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
625
152
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
626
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
627
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
628
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
629
2
                    state, _intermediate_projections[i][j]));
630
2
        }
631
1
    }
632
151
    return Status::OK();
633
151
}
634
635
template <typename SharedStateArg>
636
3.71k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
3.71k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
3.71k
    _terminated = true;
641
3.71k
    return Status::OK();
642
3.71k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
203
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
203
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
203
    _terminated = true;
641
203
    return Status::OK();
642
203
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
44
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
44
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
44
    _terminated = true;
641
44
    return Status::OK();
642
44
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
26
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
26
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
26
    _terminated = true;
641
26
    return Status::OK();
642
26
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
1
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
1
    _terminated = true;
641
1
    return Status::OK();
642
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
84
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
84
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
84
    _terminated = true;
641
84
    return Status::OK();
642
84
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
2.39k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
2.39k
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
2.39k
    _terminated = true;
641
2.39k
    return Status::OK();
642
2.39k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
5
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
5
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
5
    _terminated = true;
641
5
    return Status::OK();
642
5
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
6
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
6
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
6
    _terminated = true;
641
6
    return Status::OK();
642
6
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
17
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
17
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
17
    _terminated = true;
641
17
    return Status::OK();
642
17
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
918
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
918
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
918
    _terminated = true;
641
918
    return Status::OK();
642
918
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
636
15
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
637
15
    if (_terminated) {
638
0
        return Status::OK();
639
0
    }
640
15
    _terminated = true;
641
15
    return Status::OK();
642
15
}
643
644
template <typename SharedStateArg>
645
2.38M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
2.38M
    if (_closed) {
647
190k
        return Status::OK();
648
190k
    }
649
2.19M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
1.05M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
1.05M
    }
652
2.19M
    _closed = true;
653
2.19M
    return Status::OK();
654
2.38M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
61.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
61.7k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
61.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
61.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
61.7k
    }
652
61.7k
    _closed = true;
653
61.7k
    return Status::OK();
654
61.7k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
4
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4
    }
652
4
    _closed = true;
653
4
    return Status::OK();
654
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
329k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
329k
    if (_closed) {
647
164k
        return Status::OK();
648
164k
    }
649
164k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
164k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
164k
    }
652
164k
    _closed = true;
653
164k
    return Status::OK();
654
329k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
25
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
25
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
25
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
25
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
25
    }
652
25
    _closed = true;
653
25
    return Status::OK();
654
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
5.49k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
5.49k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
5.49k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
5.49k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
5.49k
    }
652
5.49k
    _closed = true;
653
5.49k
    return Status::OK();
654
5.49k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
12.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
12.6k
    if (_closed) {
647
6.33k
        return Status::OK();
648
6.33k
    }
649
6.26k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
6.26k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
6.26k
    }
652
6.26k
    _closed = true;
653
6.26k
    return Status::OK();
654
12.6k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
79.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
79.3k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
79.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
79.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
79.3k
    }
652
79.3k
    _closed = true;
653
79.3k
    return Status::OK();
654
79.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
353
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
353
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
353
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
353
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
353
    }
652
353
    _closed = true;
653
353
    return Status::OK();
654
353
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
70
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
70
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
70
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
70
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
70
    }
652
70
    _closed = true;
653
70
    return Status::OK();
654
70
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
1.15M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
1.15M
    if (_closed) {
647
14.0k
        return Status::OK();
648
14.0k
    }
649
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
    }
652
1.13M
    _closed = true;
653
1.13M
    return Status::OK();
654
1.15M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
50.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
50.3k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
50.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
50.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
50.3k
    }
652
50.3k
    _closed = true;
653
50.3k
    return Status::OK();
654
50.3k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
28
    if (_closed) {
647
14
        return Status::OK();
648
14
    }
649
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
14
    }
652
14
    _closed = true;
653
14
    return Status::OK();
654
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
4.02k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
4.02k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
4.02k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4.02k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4.02k
    }
652
4.02k
    _closed = true;
653
4.02k
    return Status::OK();
654
4.02k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
574
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
574
    if (_closed) {
647
286
        return Status::OK();
648
286
    }
649
288
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
288
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
288
    }
652
288
    _closed = true;
653
288
    return Status::OK();
654
574
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
10.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
10.0k
    if (_closed) {
647
5.08k
        return Status::OK();
648
5.08k
    }
649
4.95k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
4.95k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
4.95k
    }
652
4.95k
    _closed = true;
653
4.95k
    return Status::OK();
654
10.0k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
675k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
675k
    if (_closed) {
647
0
        return Status::OK();
648
0
    }
649
675k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
675k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
675k
    }
652
675k
    _closed = true;
653
675k
    return Status::OK();
654
675k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
645
304
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
646
304
    if (_closed) {
647
162
        return Status::OK();
648
162
    }
649
142
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
650
142
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
651
142
    }
652
142
    _closed = true;
653
142
    return Status::OK();
654
304
}
655
656
template <typename SharedState>
657
1.65M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
1.65M
    _operator_profile =
660
1.65M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
1.65M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
1.65M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
1.65M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
1.65M
    _operator_profile->add_child(_common_profile, true);
669
1.65M
    _operator_profile->add_child(_custom_profile, true);
670
671
1.65M
    _operator_profile->set_metadata(_parent->node_id());
672
1.65M
    _wait_for_finish_dependency_timer =
673
1.65M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
1.65M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
1.65M
    if constexpr (!is_fake_shared) {
676
1.10M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
1.10M
            info.shared_state_map.end()) {
678
295k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
283k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
283k
            }
681
295k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
295k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
295k
                                                  ? 0
684
295k
                                                  : info.task_idx]
685
295k
                                  .get();
686
295k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
812k
        } else {
688
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
18.4E
                DCHECK(false);
690
18.4E
            }
691
812k
            _shared_state = info.shared_state->template cast<SharedState>();
692
812k
            _dependency = _shared_state->create_sink_dependency(
693
812k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
812k
        }
695
1.10M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
1.10M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
1.10M
    }
698
699
1.65M
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
1.65M
    _rows_input_counter =
704
1.65M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
1.65M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
1.65M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
1.65M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
1.65M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
1.65M
    _memory_used_counter =
710
1.65M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
1.65M
    _common_profile->add_info_string("IsColocate",
712
1.65M
                                     std::to_string(_parent->is_colocated_operator()));
713
1.65M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
1.65M
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
1.65M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
1.65M
    return Status::OK();
717
1.65M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
109k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
109k
    _operator_profile =
660
109k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
109k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
109k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
109k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
109k
    _operator_profile->add_child(_common_profile, true);
669
109k
    _operator_profile->add_child(_custom_profile, true);
670
671
109k
    _operator_profile->set_metadata(_parent->node_id());
672
109k
    _wait_for_finish_dependency_timer =
673
109k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
109k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
109k
    if constexpr (!is_fake_shared) {
676
109k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
109k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
12.1k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
12.1k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
12.1k
                                                  ? 0
684
12.1k
                                                  : info.task_idx]
685
12.1k
                                  .get();
686
12.1k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
97.6k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
97.6k
            _shared_state = info.shared_state->template cast<SharedState>();
692
97.6k
            _dependency = _shared_state->create_sink_dependency(
693
97.6k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
97.6k
        }
695
109k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
109k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
109k
    }
698
699
109k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
109k
    _rows_input_counter =
704
109k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
109k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
109k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
109k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
109k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
109k
    _memory_used_counter =
710
109k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
109k
    _common_profile->add_info_string("IsColocate",
712
109k
                                     std::to_string(_parent->is_colocated_operator()));
713
109k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
109k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
109k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
109k
    return Status::OK();
717
109k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
2
    _operator_profile =
660
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
2
    _operator_profile->add_child(_common_profile, true);
669
2
    _operator_profile->add_child(_custom_profile, true);
670
671
2
    _operator_profile->set_metadata(_parent->node_id());
672
2
    _wait_for_finish_dependency_timer =
673
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
2
    if constexpr (!is_fake_shared) {
676
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
2
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
2
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
2
            _shared_state = info.shared_state->template cast<SharedState>();
692
2
            _dependency = _shared_state->create_sink_dependency(
693
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
2
        }
695
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
2
    }
698
699
2
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
2
    _rows_input_counter =
704
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
2
    _memory_used_counter =
710
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
2
    _common_profile->add_info_string("IsColocate",
712
2
                                     std::to_string(_parent->is_colocated_operator()));
713
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
2
    return Status::OK();
717
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
165k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
165k
    _operator_profile =
660
165k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
165k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
165k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
165k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
165k
    _operator_profile->add_child(_common_profile, true);
669
165k
    _operator_profile->add_child(_custom_profile, true);
670
671
165k
    _operator_profile->set_metadata(_parent->node_id());
672
165k
    _wait_for_finish_dependency_timer =
673
165k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
165k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
165k
    if constexpr (!is_fake_shared) {
676
165k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
165k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
165k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
165k
            _shared_state = info.shared_state->template cast<SharedState>();
692
165k
            _dependency = _shared_state->create_sink_dependency(
693
165k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
165k
        }
695
165k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
165k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
165k
    }
698
699
165k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
165k
    _rows_input_counter =
704
165k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
165k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
165k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
165k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
165k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
165k
    _memory_used_counter =
710
165k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
165k
    _common_profile->add_info_string("IsColocate",
712
165k
                                     std::to_string(_parent->is_colocated_operator()));
713
165k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
165k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
165k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
165k
    return Status::OK();
717
165k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
31
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
31
    _operator_profile =
660
31
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
31
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
31
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
31
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
31
    _operator_profile->add_child(_common_profile, true);
669
31
    _operator_profile->add_child(_custom_profile, true);
670
671
31
    _operator_profile->set_metadata(_parent->node_id());
672
31
    _wait_for_finish_dependency_timer =
673
31
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
31
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
31
    if constexpr (!is_fake_shared) {
676
31
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
31
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
31
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
31
            _shared_state = info.shared_state->template cast<SharedState>();
692
31
            _dependency = _shared_state->create_sink_dependency(
693
31
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
31
        }
695
31
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
31
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
31
    }
698
699
31
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
31
    _rows_input_counter =
704
31
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
31
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
31
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
31
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
31
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
31
    _memory_used_counter =
710
31
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
31
    _common_profile->add_info_string("IsColocate",
712
31
                                     std::to_string(_parent->is_colocated_operator()));
713
31
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
31
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
31
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
31
    return Status::OK();
717
31
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
5.49k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
5.49k
    _operator_profile =
660
5.49k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
5.49k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
5.49k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
5.49k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
5.49k
    _operator_profile->add_child(_common_profile, true);
669
5.49k
    _operator_profile->add_child(_custom_profile, true);
670
671
5.49k
    _operator_profile->set_metadata(_parent->node_id());
672
5.49k
    _wait_for_finish_dependency_timer =
673
5.49k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
5.49k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
5.49k
    if constexpr (!is_fake_shared) {
676
5.49k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
5.49k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
5.49k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
5.49k
            _shared_state = info.shared_state->template cast<SharedState>();
692
5.49k
            _dependency = _shared_state->create_sink_dependency(
693
5.49k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
5.49k
        }
695
5.49k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
5.49k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
5.49k
    }
698
699
5.49k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
5.49k
    _rows_input_counter =
704
5.49k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
5.49k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
5.49k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
5.49k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
5.49k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
5.49k
    _memory_used_counter =
710
5.49k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
5.49k
    _common_profile->add_info_string("IsColocate",
712
5.49k
                                     std::to_string(_parent->is_colocated_operator()));
713
5.49k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
5.49k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
5.49k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
5.49k
    return Status::OK();
717
5.49k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
6.27k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
6.27k
    _operator_profile =
660
6.27k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
6.27k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
6.27k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
6.27k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
6.27k
    _operator_profile->add_child(_common_profile, true);
669
6.27k
    _operator_profile->add_child(_custom_profile, true);
670
671
6.27k
    _operator_profile->set_metadata(_parent->node_id());
672
6.27k
    _wait_for_finish_dependency_timer =
673
6.27k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
6.27k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
6.27k
    if constexpr (!is_fake_shared) {
676
6.27k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
6.27k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
6.27k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
6.27k
            _shared_state = info.shared_state->template cast<SharedState>();
692
6.27k
            _dependency = _shared_state->create_sink_dependency(
693
6.27k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
6.27k
        }
695
6.27k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
6.27k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
6.27k
    }
698
699
6.27k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
6.27k
    _rows_input_counter =
704
6.27k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
6.27k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
6.27k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
6.27k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
6.27k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
6.27k
    _memory_used_counter =
710
6.27k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
6.27k
    _common_profile->add_info_string("IsColocate",
712
6.27k
                                     std::to_string(_parent->is_colocated_operator()));
713
6.27k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
6.27k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
6.27k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
6.27k
    return Status::OK();
717
6.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
79.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
79.4k
    _operator_profile =
660
79.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
79.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
79.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
79.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
79.4k
    _operator_profile->add_child(_common_profile, true);
669
79.4k
    _operator_profile->add_child(_custom_profile, true);
670
671
79.4k
    _operator_profile->set_metadata(_parent->node_id());
672
79.4k
    _wait_for_finish_dependency_timer =
673
79.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
79.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
79.4k
    if constexpr (!is_fake_shared) {
676
79.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
79.4k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
79.4k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
79.4k
            _shared_state = info.shared_state->template cast<SharedState>();
692
79.4k
            _dependency = _shared_state->create_sink_dependency(
693
79.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
79.4k
        }
695
79.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
79.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
79.4k
    }
698
699
79.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
79.4k
    _rows_input_counter =
704
79.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
79.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
79.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
79.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
79.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
79.4k
    _memory_used_counter =
710
79.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
79.4k
    _common_profile->add_info_string("IsColocate",
712
79.4k
                                     std::to_string(_parent->is_colocated_operator()));
713
79.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
79.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
79.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
79.4k
    return Status::OK();
717
79.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
323
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
323
    _operator_profile =
660
323
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
323
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
323
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
323
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
323
    _operator_profile->add_child(_common_profile, true);
669
323
    _operator_profile->add_child(_custom_profile, true);
670
671
323
    _operator_profile->set_metadata(_parent->node_id());
672
323
    _wait_for_finish_dependency_timer =
673
323
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
323
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
323
    if constexpr (!is_fake_shared) {
676
323
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
324
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
324
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
324
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
324
                                                  ? 0
684
324
                                                  : info.task_idx]
685
324
                                  .get();
686
324
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
18.4E
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
692
18.4E
            _dependency = _shared_state->create_sink_dependency(
693
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
18.4E
        }
695
323
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
323
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
323
    }
698
699
323
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
323
    _rows_input_counter =
704
323
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
323
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
323
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
323
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
323
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
323
    _memory_used_counter =
710
323
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
323
    _common_profile->add_info_string("IsColocate",
712
323
                                     std::to_string(_parent->is_colocated_operator()));
713
323
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
323
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
323
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
323
    return Status::OK();
717
323
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
81
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
81
    _operator_profile =
660
81
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
81
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
81
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
81
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
81
    _operator_profile->add_child(_common_profile, true);
669
81
    _operator_profile->add_child(_custom_profile, true);
670
671
81
    _operator_profile->set_metadata(_parent->node_id());
672
81
    _wait_for_finish_dependency_timer =
673
81
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
81
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
81
    if constexpr (!is_fake_shared) {
676
81
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
81
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
81
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
81
            _shared_state = info.shared_state->template cast<SharedState>();
692
81
            _dependency = _shared_state->create_sink_dependency(
693
81
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
81
        }
695
81
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
81
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
81
    }
698
699
81
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
81
    _rows_input_counter =
704
81
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
81
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
81
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
81
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
81
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
81
    _memory_used_counter =
710
81
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
81
    _common_profile->add_info_string("IsColocate",
712
81
                                     std::to_string(_parent->is_colocated_operator()));
713
81
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
81
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
81
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
81
    return Status::OK();
717
81
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
546k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
546k
    _operator_profile =
660
546k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
546k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
546k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
546k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
546k
    _operator_profile->add_child(_common_profile, true);
669
546k
    _operator_profile->add_child(_custom_profile, true);
670
671
546k
    _operator_profile->set_metadata(_parent->node_id());
672
546k
    _wait_for_finish_dependency_timer =
673
546k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
546k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
    if constexpr (!is_fake_shared) {
676
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
                                                  ? 0
684
                                                  : info.task_idx]
685
                                  .get();
686
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
            _shared_state = info.shared_state->template cast<SharedState>();
692
            _dependency = _shared_state->create_sink_dependency(
693
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
        }
695
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
    }
698
699
546k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
546k
    _rows_input_counter =
704
546k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
546k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
546k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
546k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
546k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
546k
    _memory_used_counter =
710
546k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
546k
    _common_profile->add_info_string("IsColocate",
712
546k
                                     std::to_string(_parent->is_colocated_operator()));
713
546k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
546k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
546k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
546k
    return Status::OK();
717
546k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
4.45k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
4.45k
    _operator_profile =
660
4.45k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
4.45k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
4.45k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
4.45k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
4.45k
    _operator_profile->add_child(_common_profile, true);
669
4.45k
    _operator_profile->add_child(_custom_profile, true);
670
671
4.45k
    _operator_profile->set_metadata(_parent->node_id());
672
4.45k
    _wait_for_finish_dependency_timer =
673
4.45k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
4.45k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
4.45k
    if constexpr (!is_fake_shared) {
676
4.45k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
4.45k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
4.45k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
4.45k
            _shared_state = info.shared_state->template cast<SharedState>();
692
4.45k
            _dependency = _shared_state->create_sink_dependency(
693
4.45k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
4.45k
        }
695
4.45k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
4.45k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
4.45k
    }
698
699
4.45k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
4.45k
    _rows_input_counter =
704
4.45k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
4.45k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
4.45k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
4.45k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
4.45k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
4.45k
    _memory_used_counter =
710
4.45k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
4.45k
    _common_profile->add_info_string("IsColocate",
712
4.45k
                                     std::to_string(_parent->is_colocated_operator()));
713
4.45k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
4.45k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
4.45k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
4.45k
    return Status::OK();
717
4.45k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
391
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
391
    _operator_profile =
660
391
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
391
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
391
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
391
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
391
    _operator_profile->add_child(_common_profile, true);
669
391
    _operator_profile->add_child(_custom_profile, true);
670
671
391
    _operator_profile->set_metadata(_parent->node_id());
672
391
    _wait_for_finish_dependency_timer =
673
391
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
391
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
391
    if constexpr (!is_fake_shared) {
676
391
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
391
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
391
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
391
            _shared_state = info.shared_state->template cast<SharedState>();
692
391
            _dependency = _shared_state->create_sink_dependency(
693
391
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
391
        }
695
391
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
391
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
391
    }
698
699
391
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
391
    _rows_input_counter =
704
391
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
391
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
391
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
391
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
391
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
391
    _memory_used_counter =
710
391
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
391
    _common_profile->add_info_string("IsColocate",
712
391
                                     std::to_string(_parent->is_colocated_operator()));
713
391
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
391
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
391
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
391
    return Status::OK();
717
391
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
1.58k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
1.58k
    _operator_profile =
660
1.58k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
1.58k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
1.58k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
1.58k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
1.58k
    _operator_profile->add_child(_common_profile, true);
669
1.58k
    _operator_profile->add_child(_custom_profile, true);
670
671
1.58k
    _operator_profile->set_metadata(_parent->node_id());
672
1.58k
    _wait_for_finish_dependency_timer =
673
1.58k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
1.58k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
1.58k
    if constexpr (!is_fake_shared) {
676
1.58k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
1.58k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
1.58k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
1.58k
            _shared_state = info.shared_state->template cast<SharedState>();
692
1.58k
            _dependency = _shared_state->create_sink_dependency(
693
1.58k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
1.58k
        }
695
1.58k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
1.58k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
1.58k
    }
698
699
1.58k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
1.58k
    _rows_input_counter =
704
1.58k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
1.58k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
1.58k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
1.58k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
1.58k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
1.58k
    _memory_used_counter =
710
1.58k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
1.58k
    _common_profile->add_info_string("IsColocate",
712
1.58k
                                     std::to_string(_parent->is_colocated_operator()));
713
1.58k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
1.58k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
1.58k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
1.58k
    return Status::OK();
717
1.58k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
12.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
12.2k
    _operator_profile =
660
12.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
12.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
12.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
12.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
12.2k
    _operator_profile->add_child(_common_profile, true);
669
12.2k
    _operator_profile->add_child(_custom_profile, true);
670
671
12.2k
    _operator_profile->set_metadata(_parent->node_id());
672
12.2k
    _wait_for_finish_dependency_timer =
673
12.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
12.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
12.2k
    if constexpr (!is_fake_shared) {
676
12.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
12.2k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
12.2k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
12.2k
            _shared_state = info.shared_state->template cast<SharedState>();
692
12.2k
            _dependency = _shared_state->create_sink_dependency(
693
12.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
12.2k
        }
695
12.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
12.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
12.2k
    }
698
699
12.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
12.2k
    _rows_input_counter =
704
12.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
12.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
12.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
12.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
12.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
12.2k
    _memory_used_counter =
710
12.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
12.2k
    _common_profile->add_info_string("IsColocate",
712
12.2k
                                     std::to_string(_parent->is_colocated_operator()));
713
12.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
12.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
12.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
12.2k
    return Status::OK();
717
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
283k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
283k
    _operator_profile =
660
283k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
283k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
283k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
283k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
283k
    _operator_profile->add_child(_common_profile, true);
669
283k
    _operator_profile->add_child(_custom_profile, true);
670
671
283k
    _operator_profile->set_metadata(_parent->node_id());
672
283k
    _wait_for_finish_dependency_timer =
673
283k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
283k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
283k
    if constexpr (!is_fake_shared) {
676
283k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
283k
            info.shared_state_map.end()) {
678
283k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
283k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
283k
            }
681
283k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
283k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
283k
                                                  ? 0
684
283k
                                                  : info.task_idx]
685
283k
                                  .get();
686
283k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
18.4E
        } else {
688
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
18.4E
                DCHECK(false);
690
18.4E
            }
691
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
692
18.4E
            _dependency = _shared_state->create_sink_dependency(
693
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
18.4E
        }
695
283k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
283k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
283k
    }
698
699
283k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
283k
    _rows_input_counter =
704
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
283k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
283k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
283k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
283k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
283k
    _memory_used_counter =
710
283k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
283k
    _common_profile->add_info_string("IsColocate",
712
283k
                                     std::to_string(_parent->is_colocated_operator()));
713
283k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
283k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
283k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
283k
    return Status::OK();
717
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
439k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
439k
    _operator_profile =
660
439k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
439k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
439k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
439k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
439k
    _operator_profile->add_child(_common_profile, true);
669
439k
    _operator_profile->add_child(_custom_profile, true);
670
671
439k
    _operator_profile->set_metadata(_parent->node_id());
672
439k
    _wait_for_finish_dependency_timer =
673
439k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
439k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
439k
    if constexpr (!is_fake_shared) {
676
439k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
439k
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
439k
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
439k
            _shared_state = info.shared_state->template cast<SharedState>();
692
439k
            _dependency = _shared_state->create_sink_dependency(
693
439k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
439k
        }
695
439k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
439k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
439k
    }
698
699
439k
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
439k
    _rows_input_counter =
704
439k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
439k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
439k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
439k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
439k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
439k
    _memory_used_counter =
710
439k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
439k
    _common_profile->add_info_string("IsColocate",
712
439k
                                     std::to_string(_parent->is_colocated_operator()));
713
439k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
439k
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
439k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
439k
    return Status::OK();
717
439k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
17
    _operator_profile =
660
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
17
    _operator_profile->add_child(_common_profile, true);
669
17
    _operator_profile->add_child(_custom_profile, true);
670
671
17
    _operator_profile->set_metadata(_parent->node_id());
672
17
    _wait_for_finish_dependency_timer =
673
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
17
    if constexpr (!is_fake_shared) {
676
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
17
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
17
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
17
            _shared_state = info.shared_state->template cast<SharedState>();
692
17
            _dependency = _shared_state->create_sink_dependency(
693
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
17
        }
695
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
17
    }
698
699
17
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
17
    _rows_input_counter =
704
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
17
    _memory_used_counter =
710
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
17
    _common_profile->add_info_string("IsColocate",
712
17
                                     std::to_string(_parent->is_colocated_operator()));
713
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
17
    return Status::OK();
717
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
657
302
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
658
    // create profile
659
302
    _operator_profile =
660
302
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
661
302
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
662
302
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
663
664
    // indentation is true
665
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
666
    // So we should set the indentation to true.
667
302
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
668
302
    _operator_profile->add_child(_common_profile, true);
669
302
    _operator_profile->add_child(_custom_profile, true);
670
671
302
    _operator_profile->set_metadata(_parent->node_id());
672
302
    _wait_for_finish_dependency_timer =
673
302
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
674
302
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
675
302
    if constexpr (!is_fake_shared) {
676
302
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
677
302
            info.shared_state_map.end()) {
678
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
679
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
680
            }
681
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
682
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
683
0
                                                  ? 0
684
0
                                                  : info.task_idx]
685
0
                                  .get();
686
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
687
302
        } else {
688
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
689
                DCHECK(false);
690
            }
691
302
            _shared_state = info.shared_state->template cast<SharedState>();
692
302
            _dependency = _shared_state->create_sink_dependency(
693
302
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
694
302
        }
695
302
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
696
302
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
697
302
    }
698
699
302
    if (must_set_shared_state() && _shared_state == nullptr) {
700
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
701
0
    }
702
703
302
    _rows_input_counter =
704
302
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
705
302
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
706
302
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
707
302
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
708
302
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
709
302
    _memory_used_counter =
710
302
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
711
302
    _common_profile->add_info_string("IsColocate",
712
302
                                     std::to_string(_parent->is_colocated_operator()));
713
302
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
714
302
    _common_profile->add_info_string("FollowedByShuffledOperator",
715
302
                                     std::to_string(_parent->followed_by_shuffled_operator()));
716
302
    return Status::OK();
717
302
}
718
719
template <typename SharedState>
720
1.65M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
1.65M
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
1.65M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1.10M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1.10M
    }
727
1.65M
    _closed = true;
728
1.65M
    return Status::OK();
729
1.65M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
109k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
109k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
109k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
109k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
109k
    }
727
109k
    _closed = true;
728
109k
    return Status::OK();
729
109k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
1
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1
    }
727
1
    _closed = true;
728
1
    return Status::OK();
729
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
165k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
165k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
165k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
165k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
165k
    }
727
165k
    _closed = true;
728
165k
    return Status::OK();
729
165k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
23
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
23
    if (_closed) {
722
2
        return Status::OK();
723
2
    }
724
21
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
21
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
21
    }
727
21
    _closed = true;
728
21
    return Status::OK();
729
23
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
5.48k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
5.48k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
5.48k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
5.48k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
5.48k
    }
727
5.48k
    _closed = true;
728
5.48k
    return Status::OK();
729
5.48k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
6.26k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
6.26k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
6.26k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
6.26k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
6.26k
    }
727
6.26k
    _closed = true;
728
6.26k
    return Status::OK();
729
6.26k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
79.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
79.1k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
79.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
79.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
79.1k
    }
727
79.1k
    _closed = true;
728
79.1k
    return Status::OK();
729
79.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
323
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
323
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
323
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
323
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
323
    }
727
323
    _closed = true;
728
323
    return Status::OK();
729
323
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
70
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
70
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
70
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
70
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
70
    }
727
70
    _closed = true;
728
70
    return Status::OK();
729
70
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
545k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
545k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
    }
727
545k
    _closed = true;
728
545k
    return Status::OK();
729
545k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
4.44k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
4.44k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
4.44k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
4.44k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
4.44k
    }
727
4.44k
    _closed = true;
728
4.44k
    return Status::OK();
729
4.44k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
288
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
288
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
288
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
288
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
288
    }
727
288
    _closed = true;
728
288
    return Status::OK();
729
288
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
1.57k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
1.57k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
1.57k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
1.57k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
1.57k
    }
727
1.57k
    _closed = true;
728
1.57k
    return Status::OK();
729
1.57k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
12.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
12.2k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
12.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
12.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
12.2k
    }
727
12.2k
    _closed = true;
728
12.2k
    return Status::OK();
729
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
283k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
283k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
283k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
283k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
283k
    }
727
283k
    _closed = true;
728
283k
    return Status::OK();
729
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
440k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
440k
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
440k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
440k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
440k
    }
727
440k
    _closed = true;
728
440k
    return Status::OK();
729
440k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
14
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
14
    }
727
14
    _closed = true;
728
14
    return Status::OK();
729
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
720
302
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
721
302
    if (_closed) {
722
0
        return Status::OK();
723
0
    }
724
302
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
725
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
726
302
    }
727
302
    _closed = true;
728
302
    return Status::OK();
729
302
}
730
731
template <typename LocalStateType>
732
2.87k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
2.87k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
2.87k
    return pull(state, block, eos);
735
2.87k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
732
31
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
31
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
31
    return pull(state, block, eos);
735
31
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
732
2.84k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
733
2.84k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
734
2.84k
    return pull(state, block, eos);
735
2.84k
}
736
737
template <typename LocalStateType>
738
757k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
757k
    auto& local_state = get_local_state(state);
740
757k
    if (need_more_input_data(state)) {
741
728k
        local_state._child_block->clear_column_data(
742
728k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
728k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
728k
                state, local_state._child_block.get(), &local_state._child_eos));
745
728k
        *eos = local_state._child_eos;
746
728k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
75.6k
            return Status::OK();
748
75.6k
        }
749
652k
        {
750
652k
            SCOPED_TIMER(local_state.exec_time_counter());
751
652k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
652k
        }
753
652k
    }
754
755
682k
    if (!need_more_input_data(state)) {
756
646k
        SCOPED_TIMER(local_state.exec_time_counter());
757
646k
        bool new_eos = false;
758
646k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
646k
        if (new_eos) {
760
577k
            *eos = true;
761
577k
        } else if (!need_more_input_data(state)) {
762
22.8k
            *eos = false;
763
22.8k
        }
764
646k
    }
765
682k
    return Status::OK();
766
682k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
124k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
124k
    auto& local_state = get_local_state(state);
740
124k
    if (need_more_input_data(state)) {
741
108k
        local_state._child_block->clear_column_data(
742
108k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
108k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
108k
                state, local_state._child_block.get(), &local_state._child_eos));
745
108k
        *eos = local_state._child_eos;
746
108k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
38.4k
            return Status::OK();
748
38.4k
        }
749
70.2k
        {
750
70.2k
            SCOPED_TIMER(local_state.exec_time_counter());
751
70.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
70.2k
        }
753
70.2k
    }
754
755
86.0k
    if (!need_more_input_data(state)) {
756
86.0k
        SCOPED_TIMER(local_state.exec_time_counter());
757
86.0k
        bool new_eos = false;
758
86.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
86.0k
        if (new_eos) {
760
37.6k
            *eos = true;
761
48.4k
        } else if (!need_more_input_data(state)) {
762
8.69k
            *eos = false;
763
8.69k
        }
764
86.0k
    }
765
86.0k
    return Status::OK();
766
86.0k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
3.46k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
3.46k
    auto& local_state = get_local_state(state);
740
3.46k
    if (need_more_input_data(state)) {
741
2.15k
        local_state._child_block->clear_column_data(
742
2.15k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
2.15k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
2.15k
                state, local_state._child_block.get(), &local_state._child_eos));
745
2.15k
        *eos = local_state._child_eos;
746
2.15k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
726
            return Status::OK();
748
726
        }
749
1.42k
        {
750
1.42k
            SCOPED_TIMER(local_state.exec_time_counter());
751
1.42k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
1.42k
        }
753
1.42k
    }
754
755
2.74k
    if (!need_more_input_data(state)) {
756
2.74k
        SCOPED_TIMER(local_state.exec_time_counter());
757
2.74k
        bool new_eos = false;
758
2.74k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
2.74k
        if (new_eos) {
760
1.00k
            *eos = true;
761
1.73k
        } else if (!need_more_input_data(state)) {
762
1.32k
            *eos = false;
763
1.32k
        }
764
2.74k
    }
765
2.74k
    return Status::OK();
766
2.74k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
1.57k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
1.57k
    auto& local_state = get_local_state(state);
740
1.57k
    if (need_more_input_data(state)) {
741
1.57k
        local_state._child_block->clear_column_data(
742
1.57k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
1.57k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
1.57k
                state, local_state._child_block.get(), &local_state._child_eos));
745
1.57k
        *eos = local_state._child_eos;
746
1.57k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
619
            return Status::OK();
748
619
        }
749
951
        {
750
951
            SCOPED_TIMER(local_state.exec_time_counter());
751
951
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
951
        }
753
951
    }
754
755
951
    if (!need_more_input_data(state)) {
756
951
        SCOPED_TIMER(local_state.exec_time_counter());
757
951
        bool new_eos = false;
758
951
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
951
        if (new_eos) {
760
648
            *eos = true;
761
648
        } else if (!need_more_input_data(state)) {
762
0
            *eos = false;
763
0
        }
764
951
    }
765
951
    return Status::OK();
766
951
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
12.3k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
12.3k
    auto& local_state = get_local_state(state);
740
12.3k
    if (need_more_input_data(state)) {
741
12.3k
        local_state._child_block->clear_column_data(
742
12.3k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
12.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
12.3k
                state, local_state._child_block.get(), &local_state._child_eos));
745
12.3k
        *eos = local_state._child_eos;
746
12.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
2.96k
            return Status::OK();
748
2.96k
        }
749
9.42k
        {
750
9.42k
            SCOPED_TIMER(local_state.exec_time_counter());
751
9.42k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
9.42k
        }
753
9.42k
    }
754
755
9.42k
    if (!need_more_input_data(state)) {
756
4.71k
        SCOPED_TIMER(local_state.exec_time_counter());
757
4.71k
        bool new_eos = false;
758
4.71k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
4.71k
        if (new_eos) {
760
4.67k
            *eos = true;
761
4.67k
        } else if (!need_more_input_data(state)) {
762
15
            *eos = false;
763
15
        }
764
4.71k
    }
765
9.42k
    return Status::OK();
766
9.42k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
585k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
585k
    auto& local_state = get_local_state(state);
740
586k
    if (need_more_input_data(state)) {
741
586k
        local_state._child_block->clear_column_data(
742
586k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
586k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
586k
                state, local_state._child_block.get(), &local_state._child_eos));
745
586k
        *eos = local_state._child_eos;
746
586k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
31.5k
            return Status::OK();
748
31.5k
        }
749
554k
        {
750
554k
            SCOPED_TIMER(local_state.exec_time_counter());
751
554k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
554k
        }
753
554k
    }
754
755
553k
    if (!need_more_input_data(state)) {
756
523k
        SCOPED_TIMER(local_state.exec_time_counter());
757
523k
        bool new_eos = false;
758
523k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
523k
        if (new_eos) {
760
522k
            *eos = true;
761
522k
        } else if (!need_more_input_data(state)) {
762
0
            *eos = false;
763
0
        }
764
523k
    }
765
553k
    return Status::OK();
766
553k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
22.7k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
22.7k
    auto& local_state = get_local_state(state);
740
22.7k
    if (need_more_input_data(state)) {
741
10.2k
        local_state._child_block->clear_column_data(
742
10.2k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
10.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
10.2k
                state, local_state._child_block.get(), &local_state._child_eos));
745
10.2k
        *eos = local_state._child_eos;
746
10.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
743
            return Status::OK();
748
743
        }
749
9.47k
        {
750
9.47k
            SCOPED_TIMER(local_state.exec_time_counter());
751
9.47k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
9.47k
        }
753
9.47k
    }
754
755
21.9k
    if (!need_more_input_data(state)) {
756
21.3k
        SCOPED_TIMER(local_state.exec_time_counter());
757
21.3k
        bool new_eos = false;
758
21.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
21.3k
        if (new_eos) {
760
5.47k
            *eos = true;
761
15.8k
        } else if (!need_more_input_data(state)) {
762
12.4k
            *eos = false;
763
12.4k
        }
764
21.3k
    }
765
21.9k
    return Status::OK();
766
21.9k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
7.54k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
739
7.54k
    auto& local_state = get_local_state(state);
740
7.54k
    if (need_more_input_data(state)) {
741
7.17k
        local_state._child_block->clear_column_data(
742
7.17k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
743
7.17k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
744
7.17k
                state, local_state._child_block.get(), &local_state._child_eos));
745
7.17k
        *eos = local_state._child_eos;
746
7.17k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
747
598
            return Status::OK();
748
598
        }
749
6.57k
        {
750
6.57k
            SCOPED_TIMER(local_state.exec_time_counter());
751
6.57k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
752
6.57k
        }
753
6.57k
    }
754
755
6.93k
    if (!need_more_input_data(state)) {
756
6.93k
        SCOPED_TIMER(local_state.exec_time_counter());
757
6.93k
        bool new_eos = false;
758
6.93k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
759
6.93k
        if (new_eos) {
760
4.90k
            *eos = true;
761
4.90k
        } else if (!need_more_input_data(state)) {
762
366
            *eos = false;
763
366
        }
764
6.93k
    }
765
6.93k
    return Status::OK();
766
6.93k
}
767
768
template <typename Writer, typename Parent>
769
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
770
41.9k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
41.9k
    RETURN_IF_ERROR(Base::init(state, info));
772
41.9k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
41.9k
                                                         "AsyncWriterDependency", true);
774
41.9k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
41.9k
                             _finish_dependency));
776
777
41.9k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
41.9k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
41.9k
    return Status::OK();
780
41.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
358
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
358
    RETURN_IF_ERROR(Base::init(state, info));
772
358
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
358
                                                         "AsyncWriterDependency", true);
774
358
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
358
                             _finish_dependency));
776
777
358
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
358
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
358
    return Status::OK();
780
358
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
41.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
41.6k
    RETURN_IF_ERROR(Base::init(state, info));
772
41.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
41.6k
                                                         "AsyncWriterDependency", true);
774
41.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
41.6k
                             _finish_dependency));
776
777
41.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
41.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
41.6k
    return Status::OK();
780
41.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
770
26
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
771
26
    RETURN_IF_ERROR(Base::init(state, info));
772
26
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
773
26
                                                         "AsyncWriterDependency", true);
774
26
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
775
26
                             _finish_dependency));
776
777
26
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
778
26
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
779
26
    return Status::OK();
780
26
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
781
782
template <typename Writer, typename Parent>
783
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
784
42.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
42.1k
    RETURN_IF_ERROR(Base::open(state));
786
42.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
334k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
292k
        RETURN_IF_ERROR(
789
292k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
292k
    }
791
42.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
42.1k
    return Status::OK();
793
42.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
358
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
358
    RETURN_IF_ERROR(Base::open(state));
786
358
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
1.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
1.49k
        RETURN_IF_ERROR(
789
1.49k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
1.49k
    }
791
358
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
358
    return Status::OK();
793
358
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
41.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
41.7k
    RETURN_IF_ERROR(Base::open(state));
786
41.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
332k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
290k
        RETURN_IF_ERROR(
789
290k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
290k
    }
791
41.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
41.7k
    return Status::OK();
793
41.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
784
26
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
785
26
    RETURN_IF_ERROR(Base::open(state));
786
26
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
787
468
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
788
442
        RETURN_IF_ERROR(
789
442
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
790
442
    }
791
26
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
792
26
    return Status::OK();
793
26
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
794
795
template <typename Writer, typename Parent>
796
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
797
55.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
55.9k
    return _writer->sink(block, eos);
799
55.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
1.61k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
1.61k
    return _writer->sink(block, eos);
799
1.61k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
54.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
54.2k
    return _writer->sink(block, eos);
799
54.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
797
26
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
798
26
    return _writer->sink(block, eos);
799
26
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
800
801
template <typename Writer, typename Parent>
802
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
803
42.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
42.1k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
42.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
42.1k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
42.1k
    if (_writer) {
811
42.1k
        Status st = _writer->get_writer_status();
812
42.1k
        if (exec_status.ok()) {
813
42.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
42.1k
                                                       : Status::Cancelled("force close"));
815
42.1k
        } else {
816
83
            _writer->force_close(exec_status);
817
83
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
42.1k
        RETURN_IF_ERROR(st);
822
42.1k
    }
823
42.1k
    return Base::close(state, exec_status);
824
42.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
346
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
346
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
346
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
346
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
346
    if (_writer) {
811
346
        Status st = _writer->get_writer_status();
812
346
        if (exec_status.ok()) {
813
346
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
346
                                                       : Status::Cancelled("force close"));
815
346
        } else {
816
0
            _writer->force_close(exec_status);
817
0
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
346
        RETURN_IF_ERROR(st);
822
346
    }
823
346
    return Base::close(state, exec_status);
824
346
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
41.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
41.8k
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
41.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
41.8k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
41.8k
    if (_writer) {
811
41.8k
        Status st = _writer->get_writer_status();
812
41.8k
        if (exec_status.ok()) {
813
41.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
41.7k
                                                       : Status::Cancelled("force close"));
815
41.7k
        } else {
816
83
            _writer->force_close(exec_status);
817
83
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
41.8k
        RETURN_IF_ERROR(st);
822
41.8k
    }
823
41.7k
    return Base::close(state, exec_status);
824
41.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
803
26
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
804
26
    if (_closed) {
805
0
        return Status::OK();
806
0
    }
807
26
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
808
26
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
809
    // if the init failed, the _writer may be nullptr. so here need check
810
26
    if (_writer) {
811
26
        Status st = _writer->get_writer_status();
812
26
        if (exec_status.ok()) {
813
26
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
814
26
                                                       : Status::Cancelled("force close"));
815
26
        } else {
816
0
            _writer->force_close(exec_status);
817
0
        }
818
        // If there is an error in process_block thread, then we should get the writer
819
        // status before call force_close. For example, the thread may failed in commit
820
        // transaction.
821
26
        RETURN_IF_ERROR(st);
822
26
    }
823
26
    return Base::close(state, exec_status);
824
26
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
825
826
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
827
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
828
DECLARE_OPERATOR(ResultSinkLocalState)
829
DECLARE_OPERATOR(JdbcTableSinkLocalState)
830
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
831
DECLARE_OPERATOR(ResultFileSinkLocalState)
832
DECLARE_OPERATOR(OlapTableSinkLocalState)
833
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
834
DECLARE_OPERATOR(HiveTableSinkLocalState)
835
DECLARE_OPERATOR(TVFTableSinkLocalState)
836
DECLARE_OPERATOR(IcebergTableSinkLocalState)
837
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
838
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
839
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
840
DECLARE_OPERATOR(MCTableSinkLocalState)
841
DECLARE_OPERATOR(AnalyticSinkLocalState)
842
DECLARE_OPERATOR(BlackholeSinkLocalState)
843
DECLARE_OPERATOR(SortSinkLocalState)
844
DECLARE_OPERATOR(SpillSortSinkLocalState)
845
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
846
DECLARE_OPERATOR(AggSinkLocalState)
847
DECLARE_OPERATOR(BucketedAggSinkLocalState)
848
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
849
DECLARE_OPERATOR(ExchangeSinkLocalState)
850
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
851
DECLARE_OPERATOR(UnionSinkLocalState)
852
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
853
DECLARE_OPERATOR(PartitionSortSinkLocalState)
854
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
855
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
856
DECLARE_OPERATOR(SetSinkLocalState<true>)
857
DECLARE_OPERATOR(SetSinkLocalState<false>)
858
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
859
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
860
DECLARE_OPERATOR(CacheSinkLocalState)
861
DECLARE_OPERATOR(DictSinkLocalState)
862
DECLARE_OPERATOR(RecCTESinkLocalState)
863
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
864
865
#undef DECLARE_OPERATOR
866
867
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
868
DECLARE_OPERATOR(HashJoinProbeLocalState)
869
DECLARE_OPERATOR(OlapScanLocalState)
870
DECLARE_OPERATOR(GroupCommitLocalState)
871
DECLARE_OPERATOR(JDBCScanLocalState)
872
DECLARE_OPERATOR(FileScanLocalState)
873
DECLARE_OPERATOR(AnalyticLocalState)
874
DECLARE_OPERATOR(SortLocalState)
875
DECLARE_OPERATOR(SpillSortLocalState)
876
DECLARE_OPERATOR(LocalMergeSortLocalState)
877
DECLARE_OPERATOR(AggLocalState)
878
DECLARE_OPERATOR(BucketedAggLocalState)
879
DECLARE_OPERATOR(PartitionedAggLocalState)
880
DECLARE_OPERATOR(TableFunctionLocalState)
881
DECLARE_OPERATOR(ExchangeLocalState)
882
DECLARE_OPERATOR(RepeatLocalState)
883
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
884
DECLARE_OPERATOR(AssertNumRowsLocalState)
885
DECLARE_OPERATOR(EmptySetLocalState)
886
DECLARE_OPERATOR(UnionSourceLocalState)
887
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
888
DECLARE_OPERATOR(PartitionSortSourceLocalState)
889
DECLARE_OPERATOR(SetSourceLocalState<true>)
890
DECLARE_OPERATOR(SetSourceLocalState<false>)
891
DECLARE_OPERATOR(DataGenLocalState)
892
DECLARE_OPERATOR(SchemaScanLocalState)
893
DECLARE_OPERATOR(MetaScanLocalState)
894
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
895
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
896
DECLARE_OPERATOR(CacheSourceLocalState)
897
DECLARE_OPERATOR(RecCTESourceLocalState)
898
DECLARE_OPERATOR(RecCTEScanLocalState)
899
900
#ifdef BE_TEST
901
DECLARE_OPERATOR(MockLocalState)
902
DECLARE_OPERATOR(MockScanLocalState)
903
#endif
904
#undef DECLARE_OPERATOR
905
906
template class StreamingOperatorX<AssertNumRowsLocalState>;
907
template class StreamingOperatorX<SelectLocalState>;
908
909
template class StatefulOperatorX<HashJoinProbeLocalState>;
910
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
911
template class StatefulOperatorX<RepeatLocalState>;
912
template class StatefulOperatorX<MaterializationLocalState>;
913
template class StatefulOperatorX<StreamingAggLocalState>;
914
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
915
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
916
template class StatefulOperatorX<TableFunctionLocalState>;
917
918
template class PipelineXSinkLocalState<HashJoinSharedState>;
919
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
920
template class PipelineXSinkLocalState<SortSharedState>;
921
template class PipelineXSinkLocalState<SpillSortSharedState>;
922
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
923
template class PipelineXSinkLocalState<AnalyticSharedState>;
924
template class PipelineXSinkLocalState<AggSharedState>;
925
template class PipelineXSinkLocalState<BucketedAggSharedState>;
926
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
927
template class PipelineXSinkLocalState<FakeSharedState>;
928
template class PipelineXSinkLocalState<UnionSharedState>;
929
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
930
template class PipelineXSinkLocalState<MultiCastSharedState>;
931
template class PipelineXSinkLocalState<SetSharedState>;
932
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
933
template class PipelineXSinkLocalState<BasicSharedState>;
934
template class PipelineXSinkLocalState<DataQueueSharedState>;
935
template class PipelineXSinkLocalState<RecCTESharedState>;
936
937
template class PipelineXLocalState<HashJoinSharedState>;
938
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
939
template class PipelineXLocalState<SortSharedState>;
940
template class PipelineXLocalState<SpillSortSharedState>;
941
template class PipelineXLocalState<NestedLoopJoinSharedState>;
942
template class PipelineXLocalState<AnalyticSharedState>;
943
template class PipelineXLocalState<AggSharedState>;
944
template class PipelineXLocalState<BucketedAggSharedState>;
945
template class PipelineXLocalState<PartitionedAggSharedState>;
946
template class PipelineXLocalState<FakeSharedState>;
947
template class PipelineXLocalState<UnionSharedState>;
948
template class PipelineXLocalState<DataQueueSharedState>;
949
template class PipelineXLocalState<MultiCastSharedState>;
950
template class PipelineXLocalState<PartitionSortNodeSharedState>;
951
template class PipelineXLocalState<SetSharedState>;
952
template class PipelineXLocalState<LocalExchangeSharedState>;
953
template class PipelineXLocalState<BasicSharedState>;
954
template class PipelineXLocalState<RecCTESharedState>;
955
956
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
957
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
958
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
959
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
960
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
961
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
962
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
963
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
964
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
965
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
966
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
967
968
#ifdef BE_TEST
969
template class OperatorX<DummyOperatorLocalState>;
970
template class DataSinkOperatorX<DummySinkLocalState>;
971
#endif
972
973
} // namespace doris