Coverage Report

Created: 2026-05-27 08:12

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