Coverage Report

Created: 2026-06-22 10:21

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