Coverage Report

Created: 2026-07-28 07:51

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