Coverage Report

Created: 2026-04-28 15:58

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.36M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
2.36M
    if (_parent->nereids_id() == -1) {
120
1.22M
        return fmt::format("(id={})", _parent->node_id());
121
1.22M
    } else {
122
1.13M
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
1.13M
    }
124
2.36M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
104k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
104k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
104k
    } else {
122
104k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
104k
    }
124
104k
}
_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
262k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
262k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
262k
    } else {
122
262k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
262k
    }
124
262k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
21
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
21
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
21
    } else {
122
21
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
21
    }
124
21
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
11.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
11.1k
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
11.1k
    } else {
122
11.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
11.1k
    }
124
11.1k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
8.29k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
8.29k
    if (_parent->nereids_id() == -1) {
120
9
        return fmt::format("(id={})", _parent->node_id());
121
8.29k
    } else {
122
8.29k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
8.29k
    }
124
8.29k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
138k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
138k
    if (_parent->nereids_id() == -1) {
120
27
        return fmt::format("(id={})", _parent->node_id());
121
138k
    } else {
122
138k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
138k
    }
124
138k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
321
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
321
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
321
    } else {
122
321
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
321
    }
124
321
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
76
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
76
    if (_parent->nereids_id() == -1) {
120
0
        return fmt::format("(id={})", _parent->node_id());
121
76
    } else {
122
76
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
76
    }
124
76
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
997k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
997k
    if (_parent->nereids_id() == -1) {
120
449k
        return fmt::format("(id={})", _parent->node_id());
121
548k
    } else {
122
548k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
548k
    }
124
997k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
56.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
56.1k
    if (_parent->nereids_id() == -1) {
120
2
        return fmt::format("(id={})", _parent->node_id());
121
56.1k
    } else {
122
56.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
56.1k
    }
124
56.1k
}
_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
10.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
10.3k
    if (_parent->nereids_id() == -1) {
120
10.3k
        return fmt::format("(id={})", _parent->node_id());
121
10.3k
    } else {
122
4
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
4
    }
124
10.3k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
400
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
400
    if (_parent->nereids_id() == -1) {
120
102
        return fmt::format("(id={})", _parent->node_id());
121
298
    } else {
122
298
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
298
    }
124
400
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
5.02k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
5.02k
    if (_parent->nereids_id() == -1) {
120
12
        return fmt::format("(id={})", _parent->node_id());
121
5.01k
    } else {
122
5.01k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
5.01k
    }
124
5.02k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
118
766k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
119
766k
    if (_parent->nereids_id() == -1) {
120
766k
        return fmt::format("(id={})", _parent->node_id());
121
766k
    } else {
122
496
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
123
496
    }
124
766k
}
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.41M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
1.41M
    if (_parent->nereids_id() == -1) {
129
825k
        return fmt::format("(id={})", _parent->node_id());
130
825k
    } else {
131
585k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
585k
    }
133
1.41M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
153k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
153k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
153k
    } else {
131
153k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
153k
    }
133
153k
}
_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
263k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
263k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
263k
    } else {
131
263k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
263k
    }
133
263k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
27
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
27
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
27
    } else {
131
27
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
27
    }
133
27
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
11.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
11.3k
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
11.3k
    } else {
131
11.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
11.3k
    }
133
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
8.33k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
8.33k
    if (_parent->nereids_id() == -1) {
129
9
        return fmt::format("(id={})", _parent->node_id());
130
8.32k
    } else {
131
8.32k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
8.32k
    }
133
8.33k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
138k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
138k
    if (_parent->nereids_id() == -1) {
129
27
        return fmt::format("(id={})", _parent->node_id());
130
138k
    } else {
131
138k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
138k
    }
133
138k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
264
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
264
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
264
    } else {
131
264
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
264
    }
133
264
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
86
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
86
    if (_parent->nereids_id() == -1) {
129
0
        return fmt::format("(id={})", _parent->node_id());
130
86
    } else {
131
86
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
86
    }
133
86
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
104
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
104
    if (_parent->nereids_id() == -1) {
129
104
        return fmt::format("(id={})", _parent->node_id());
130
104
    } else {
131
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
0
    }
133
104
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
9.74k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
9.74k
    if (_parent->nereids_id() == -1) {
129
3
        return fmt::format("(id={})", _parent->node_id());
130
9.74k
    } else {
131
9.74k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
9.74k
    }
133
9.74k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
400
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
400
    if (_parent->nereids_id() == -1) {
129
102
        return fmt::format("(id={})", _parent->node_id());
130
298
    } else {
131
298
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
298
    }
133
400
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
12.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
12.4k
    if (_parent->nereids_id() == -1) {
129
12.4k
        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.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
282k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
282k
    if (_parent->nereids_id() == -1) {
129
282k
        return fmt::format("(id={})", _parent->node_id());
130
18.4E
    } else {
131
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
18.4E
    }
133
282k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
127
530k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
128
530k
    if (_parent->nereids_id() == -1) {
129
529k
        return fmt::format("(id={})", _parent->node_id());
130
529k
    } else {
131
66
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
132
66
    }
133
530k
}
_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
32.2k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
32.2k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
32.2k
    _terminated = true;
141
32.2k
    return Status::OK();
142
32.2k
}
_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
777
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
777
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
777
    _terminated = true;
141
777
    return Status::OK();
142
777
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
15
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
15
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
15
    _terminated = true;
141
15
    return Status::OK();
142
15
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_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
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
5.24k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
5.24k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
5.24k
    _terminated = true;
141
5.24k
    return Status::OK();
142
5.24k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
1.62k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
1.62k
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
1.62k
    _terminated = true;
141
1.62k
    return Status::OK();
142
1.62k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
9
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
9
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
9
    _terminated = true;
141
9
    return Status::OK();
142
9
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
4
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
4
    _terminated = true;
141
4
    return Status::OK();
142
4
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
201
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
201
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
201
    _terminated = true;
141
201
    return Status::OK();
142
201
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
136
194
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
137
194
    if (_terminated) {
138
0
        return Status::OK();
139
0
    }
140
194
    _terminated = true;
141
194
    return Status::OK();
142
194
}
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
850k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
145
850k
    return _child && _child->is_serial_operator() && !is_source()
146
850k
                   ? DataDistribution(ExchangeType::PASSTHROUGH)
147
850k
                   : DataDistribution(ExchangeType::NOOP);
148
850k
}
149
150
81.7k
const RowDescriptor& OperatorBase::row_desc() const {
151
81.7k
    return _child->row_desc();
152
81.7k
}
153
154
template <typename SharedStateArg>
155
20.0k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
20.0k
    fmt::memory_buffer debug_string_buffer;
157
20.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
20.0k
    return fmt::to_string(debug_string_buffer);
159
20.0k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
288
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
288
    fmt::memory_buffer debug_string_buffer;
157
288
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
288
    return fmt::to_string(debug_string_buffer);
159
288
}
_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
83
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
83
    fmt::memory_buffer debug_string_buffer;
157
83
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
83
    return fmt::to_string(debug_string_buffer);
159
83
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
83
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
83
    fmt::memory_buffer debug_string_buffer;
157
83
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
83
    return fmt::to_string(debug_string_buffer);
159
83
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
160
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
160
    fmt::memory_buffer debug_string_buffer;
157
160
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
160
    return fmt::to_string(debug_string_buffer);
159
160
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
155
17.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
17.7k
    fmt::memory_buffer debug_string_buffer;
157
17.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
17.7k
    return fmt::to_string(debug_string_buffer);
159
17.7k
}
_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
1.71k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
156
1.71k
    fmt::memory_buffer debug_string_buffer;
157
1.71k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
158
1.71k
    return fmt::to_string(debug_string_buffer);
159
1.71k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
160
161
template <typename SharedStateArg>
162
19.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
19.6k
    fmt::memory_buffer debug_string_buffer;
164
19.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
19.6k
    return fmt::to_string(debug_string_buffer);
166
19.6k
}
_ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
64
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
64
    fmt::memory_buffer debug_string_buffer;
164
64
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
64
    return fmt::to_string(debug_string_buffer);
166
64
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
83
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
83
    fmt::memory_buffer debug_string_buffer;
164
83
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
83
    return fmt::to_string(debug_string_buffer);
166
83
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
64
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
64
    fmt::memory_buffer debug_string_buffer;
164
64
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
64
    return fmt::to_string(debug_string_buffer);
166
64
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
160
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
160
    fmt::memory_buffer debug_string_buffer;
164
160
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
160
    return fmt::to_string(debug_string_buffer);
166
160
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
1.56k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
1.56k
    fmt::memory_buffer debug_string_buffer;
164
1.56k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
1.56k
    return fmt::to_string(debug_string_buffer);
166
1.56k
}
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
299
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
299
    fmt::memory_buffer debug_string_buffer;
164
299
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
299
    return fmt::to_string(debug_string_buffer);
166
299
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
162
17.4k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
163
17.4k
    fmt::memory_buffer debug_string_buffer;
164
17.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
165
17.4k
    return fmt::to_string(debug_string_buffer);
166
17.4k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
167
168
20.8k
std::string OperatorXBase::debug_string(int indentation_level) const {
169
20.8k
    fmt::memory_buffer debug_string_buffer;
170
20.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
171
20.8k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
172
20.8k
                   _is_serial_operator);
173
20.8k
    return fmt::to_string(debug_string_buffer);
174
20.8k
}
175
176
20.0k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
177
20.0k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
178
20.0k
}
179
180
698k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
181
698k
    std::string node_name = print_plan_node_type(tnode.node_type);
182
698k
    _nereids_id = tnode.nereids_id;
183
698k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
184
3.59k
        if (!tnode.__isset.output_tuple_id) {
185
0
            return Status::InternalError("no final output tuple id");
186
0
        }
187
3.59k
        if (tnode.intermediate_output_tuple_id_list.size() !=
188
3.59k
            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
3.59k
    }
196
698k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
197
698k
    _op_name = substr + "_OPERATOR";
198
199
698k
    if (tnode.__isset.vconjunct) {
200
0
        return Status::InternalError("vconjunct is not supported yet");
201
698k
    } else if (tnode.__isset.conjuncts) {
202
437k
        for (const auto& conjunct : tnode.conjuncts) {
203
437k
            VExprContextSPtr context;
204
437k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
205
437k
            _conjuncts.emplace_back(context);
206
437k
        }
207
139k
    }
208
209
    // create the projections expr
210
698k
    if (tnode.__isset.projections) {
211
304k
        DCHECK(tnode.__isset.output_tuple_id);
212
304k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projections));
213
304k
    }
214
698k
    if (!tnode.intermediate_projections_list.empty()) {
215
3.59k
        DCHECK(tnode.__isset.projections) << "no final projections";
216
3.59k
        _intermediate_projections.reserve(tnode.intermediate_projections_list.size());
217
6.90k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
218
6.90k
            VExprContextSPtrs projections;
219
6.90k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
220
6.90k
            _intermediate_projections.push_back(projections);
221
6.90k
        }
222
3.59k
    }
223
698k
    return Status::OK();
224
698k
}
225
226
728k
Status OperatorXBase::prepare(RuntimeState* state) {
227
728k
    for (auto& conjunct : _conjuncts) {
228
437k
        RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc()));
229
437k
    }
230
728k
    if (state->enable_adjust_conjunct_order_by_cost()) {
231
678k
        std::ranges::sort(_conjuncts, [](const auto& a, const auto& b) {
232
595k
            return a->execute_cost() < b->execute_cost();
233
595k
        });
234
678k
    };
235
236
735k
    for (int i = 0; i < _intermediate_projections.size(); i++) {
237
6.90k
        RETURN_IF_ERROR(
238
6.90k
                VExpr::prepare(_intermediate_projections[i], state, intermediate_row_desc(i)));
239
6.90k
    }
240
728k
    RETURN_IF_ERROR(VExpr::prepare(_projections, state, projections_row_desc()));
241
242
728k
    if (has_output_row_desc()) {
243
304k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(_projections, *_output_row_descriptor));
244
304k
    }
245
246
728k
    for (auto& conjunct : _conjuncts) {
247
437k
        RETURN_IF_ERROR(conjunct->open(state));
248
437k
    }
249
728k
    RETURN_IF_ERROR(VExpr::open(_projections, state));
250
728k
    for (auto& projections : _intermediate_projections) {
251
6.90k
        RETURN_IF_ERROR(VExpr::open(projections, state));
252
6.90k
    }
253
728k
    if (_child && !is_source()) {
254
138k
        RETURN_IF_ERROR(_child->prepare(state));
255
138k
    }
256
257
728k
    if (VExpr::contains_blockable_function(_conjuncts) ||
258
728k
        VExpr::contains_blockable_function(_projections)) {
259
0
        _blockable = true;
260
0
    }
261
262
728k
    return Status::OK();
263
728k
}
264
265
10.4k
Status OperatorXBase::terminate(RuntimeState* state) {
266
10.4k
    if (_child && !is_source()) {
267
2.15k
        RETURN_IF_ERROR(_child->terminate(state));
268
2.15k
    }
269
10.4k
    auto result = state->get_local_state_result(operator_id());
270
10.4k
    if (!result) {
271
0
        return result.error();
272
0
    }
273
10.4k
    return result.value()->terminate(state);
274
10.4k
}
275
276
6.69M
Status OperatorXBase::close(RuntimeState* state) {
277
6.69M
    if (_child && !is_source()) {
278
1.32M
        RETURN_IF_ERROR(_child->close(state));
279
1.32M
    }
280
6.69M
    auto result = state->get_local_state_result(operator_id());
281
6.69M
    if (!result) {
282
0
        return result.error();
283
0
    }
284
6.69M
    return result.value()->close(state);
285
6.69M
}
286
287
325k
void PipelineXLocalStateBase::clear_origin_block() {
288
325k
    _origin_block.clear_column_data(_parent->intermediate_row_desc().num_materialized_slots());
289
325k
}
290
291
642k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
292
642k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
293
294
642k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
295
642k
    return Status::OK();
296
642k
}
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
325k
                                     Block* output_block) const {
305
325k
    auto* local_state = state->get_local_state(operator_id());
306
325k
    SCOPED_TIMER(local_state->exec_time_counter());
307
325k
    SCOPED_TIMER(local_state->_projection_timer);
308
325k
    const size_t rows = origin_block->rows();
309
325k
    if (rows == 0) {
310
188k
        return Status::OK();
311
188k
    }
312
136k
    Block input_block = *origin_block;
313
314
136k
    size_t bytes_usage = 0;
315
136k
    ColumnsWithTypeAndName new_columns;
316
136k
    for (const auto& projections : local_state->_intermediate_projections) {
317
1.37k
        if (projections.empty()) {
318
0
            return Status::InternalError("meet empty intermediate projection, node id: {}",
319
0
                                         node_id());
320
0
        }
321
1.37k
        new_columns.resize(projections.size());
322
9.75k
        for (int i = 0; i < projections.size(); i++) {
323
8.37k
            RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
324
8.37k
            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
8.37k
        }
332
1.37k
        Block tmp_block {new_columns};
333
1.37k
        bytes_usage += tmp_block.allocated_bytes();
334
1.37k
        input_block.swap(tmp_block);
335
1.37k
    }
336
337
136k
    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
658k
    auto insert_column_datas = [&](auto& to, ColumnPtr& from, size_t rows) {
344
658k
        if (to->is_nullable() && !from->is_nullable()) {
345
0
            if (_keep_origin || !from->is_exclusive()) {
346
0
                auto& null_column = reinterpret_cast<ColumnNullable&>(*to);
347
0
                null_column.get_nested_column().insert_range_from(*from, 0, rows);
348
0
                null_column.get_null_map_column().get_data().resize_fill(rows, 0);
349
0
                bytes_usage += null_column.allocated_bytes();
350
0
            } else {
351
0
                to = make_nullable(from, false)->assume_mutable();
352
0
            }
353
658k
        } else {
354
658k
            if (_keep_origin || !from->is_exclusive()) {
355
646k
                to->insert_range_from(*from, 0, rows);
356
646k
                bytes_usage += from->allocated_bytes();
357
646k
            } else {
358
12.3k
                to = from->assume_mutable();
359
12.3k
            }
360
658k
        }
361
658k
    };
362
363
136k
    MutableBlock mutable_block =
364
136k
            VectorizedUtils::build_mutable_mem_reuse_block(output_block, *_output_row_descriptor);
365
136k
    if (rows != 0) {
366
136k
        auto& mutable_columns = mutable_block.mutable_columns();
367
136k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
368
795k
        for (int i = 0; i < mutable_columns.size(); ++i) {
369
658k
            ColumnPtr column_ptr;
370
658k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
371
658k
            if (column_ptr->size() != rows) {
372
0
                return Status::InternalError(
373
0
                        "projection result column size {} not equal input rows {}, expr: {}",
374
0
                        column_ptr->size(), rows,
375
0
                        local_state->_projections[i]->root()->debug_string());
376
0
            }
377
658k
            column_ptr = column_ptr->convert_to_full_column_if_const();
378
658k
            bytes_usage += column_ptr->allocated_bytes();
379
658k
            insert_column_datas(mutable_columns[i], column_ptr, rows);
380
658k
        }
381
136k
        DCHECK(mutable_block.rows() == rows);
382
136k
        output_block->set_columns(std::move(mutable_columns));
383
136k
    }
384
385
136k
    local_state->_estimate_memory_usage += bytes_usage;
386
387
136k
    return Status::OK();
388
136k
}
389
390
4.87M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
391
4.87M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
392
4.87M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
393
4.87M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
394
4.87M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
395
4.87M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
396
4.87M
            if (_debug_point_count++ % 2 == 0) {
397
4.87M
                return Status::OK();
398
4.87M
            }
399
4.87M
        }
400
4.87M
    });
401
402
4.87M
    Status status;
403
4.87M
    auto* local_state = state->get_local_state(operator_id());
404
4.87M
    Defer defer([&]() {
405
4.87M
        if (status.ok()) {
406
4.87M
            if (auto rows = block->rows()) {
407
919k
                COUNTER_UPDATE(local_state->_rows_returned_counter, rows);
408
919k
                COUNTER_UPDATE(local_state->_blocks_returned_counter, 1);
409
919k
            }
410
4.87M
        }
411
4.87M
    });
412
4.87M
    if (_output_row_descriptor) {
413
325k
        local_state->clear_origin_block();
414
325k
        status = get_block(state, &local_state->_origin_block, eos);
415
325k
        if (UNLIKELY(!status.ok())) {
416
19
            return status;
417
19
        }
418
325k
        status = do_projections(state, &local_state->_origin_block, block);
419
325k
        return status;
420
325k
    }
421
4.54M
    status = get_block(state, block, eos);
422
4.54M
    RETURN_IF_ERROR(block->check_type_and_column());
423
4.54M
    return status;
424
4.54M
}
425
426
3.13M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
427
3.13M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
428
6.66k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
429
6.66k
        *eos = true;
430
6.66k
    }
431
432
3.13M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
433
3.13M
        auto op_name = to_lower(_parent->_op_name);
434
3.13M
        auto arg_op_name = dp->param<std::string>("op_name");
435
3.13M
        arg_op_name = to_lower(arg_op_name);
436
437
3.13M
        if (op_name == arg_op_name) {
438
3.13M
            *eos = true;
439
3.13M
        }
440
3.13M
    });
441
442
3.13M
    if (auto rows = block->rows()) {
443
859k
        _num_rows_returned += rows;
444
859k
    }
445
3.13M
}
446
447
32.2k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
448
32.2k
    auto result = state->get_sink_local_state_result();
449
32.2k
    if (!result) {
450
0
        return result.error();
451
0
    }
452
32.2k
    return result.value()->terminate(state);
453
32.2k
}
454
455
20.4k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
456
20.4k
    fmt::memory_buffer debug_string_buffer;
457
458
20.4k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
459
20.4k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
460
20.4k
    return fmt::to_string(debug_string_buffer);
461
20.4k
}
462
463
19.6k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
464
19.6k
    return state->get_sink_local_state()->debug_string(indentation_level);
465
19.6k
}
466
467
439k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
468
439k
    std::string op_name = "UNKNOWN_SINK";
469
439k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
470
471
439k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
472
439k
        op_name = it->second;
473
439k
    }
474
439k
    _name = op_name + "_OPERATOR";
475
439k
    return Status::OK();
476
439k
}
477
478
197k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
479
197k
    std::string op_name = print_plan_node_type(tnode.node_type);
480
197k
    _nereids_id = tnode.nereids_id;
481
197k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
482
197k
    _name = substr + "_SINK_OPERATOR";
483
197k
    return Status::OK();
484
197k
}
485
486
template <typename LocalStateType>
487
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
488
2.12M
                                                            LocalSinkStateInfo& info) {
489
2.12M
    auto local_state = LocalStateType::create_unique(this, state);
490
2.12M
    RETURN_IF_ERROR(local_state->init(state, info));
491
2.12M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
2.12M
    return Status::OK();
493
2.12M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
153k
                                                            LocalSinkStateInfo& info) {
489
153k
    auto local_state = LocalStateType::create_unique(this, state);
490
153k
    RETURN_IF_ERROR(local_state->init(state, info));
491
153k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
153k
    return Status::OK();
493
153k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
460k
                                                            LocalSinkStateInfo& info) {
489
460k
    auto local_state = LocalStateType::create_unique(this, state);
490
460k
    RETURN_IF_ERROR(local_state->init(state, info));
491
460k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
460k
    return Status::OK();
493
460k
}
_ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
88
                                                            LocalSinkStateInfo& info) {
489
88
    auto local_state = LocalStateType::create_unique(this, state);
490
88
    RETURN_IF_ERROR(local_state->init(state, info));
491
88
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
88
    return Status::OK();
493
88
}
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
3
                                                            LocalSinkStateInfo& info) {
489
3
    auto local_state = LocalStateType::create_unique(this, state);
490
3
    RETURN_IF_ERROR(local_state->init(state, info));
491
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
3
    return Status::OK();
493
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
539
                                                            LocalSinkStateInfo& info) {
489
539
    auto local_state = LocalStateType::create_unique(this, state);
490
539
    RETURN_IF_ERROR(local_state->init(state, info));
491
539
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
539
    return Status::OK();
493
539
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
54.2k
                                                            LocalSinkStateInfo& info) {
489
54.2k
    auto local_state = LocalStateType::create_unique(this, state);
490
54.2k
    RETURN_IF_ERROR(local_state->init(state, info));
491
54.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
54.2k
    return Status::OK();
493
54.2k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
5.65k
                                                            LocalSinkStateInfo& info) {
489
5.65k
    auto local_state = LocalStateType::create_unique(this, state);
490
5.65k
    RETURN_IF_ERROR(local_state->init(state, info));
491
5.65k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
5.65k
    return Status::OK();
493
5.65k
}
_ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
5.14k
                                                            LocalSinkStateInfo& info) {
489
5.14k
    auto local_state = LocalStateType::create_unique(this, state);
490
5.14k
    RETURN_IF_ERROR(local_state->init(state, info));
491
5.14k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
5.14k
    return Status::OK();
493
5.14k
}
_ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
156
                                                            LocalSinkStateInfo& info) {
489
156
    auto local_state = LocalStateType::create_unique(this, state);
490
156
    RETURN_IF_ERROR(local_state->init(state, info));
491
156
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
156
    return Status::OK();
493
156
}
_ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
3.38k
                                                            LocalSinkStateInfo& info) {
489
3.38k
    auto local_state = LocalStateType::create_unique(this, state);
490
3.38k
    RETURN_IF_ERROR(local_state->init(state, info));
491
3.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
3.38k
    return Status::OK();
493
3.38k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
160
                                                            LocalSinkStateInfo& info) {
489
160
    auto local_state = LocalStateType::create_unique(this, state);
490
160
    RETURN_IF_ERROR(local_state->init(state, info));
491
160
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
160
    return Status::OK();
493
160
}
_ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
640
                                                            LocalSinkStateInfo& info) {
489
640
    auto local_state = LocalStateType::create_unique(this, state);
490
640
    RETURN_IF_ERROR(local_state->init(state, info));
491
640
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
640
    return Status::OK();
493
640
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
8.33k
                                                            LocalSinkStateInfo& info) {
489
8.33k
    auto local_state = LocalStateType::create_unique(this, state);
490
8.33k
    RETURN_IF_ERROR(local_state->init(state, info));
491
8.33k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
8.33k
    return Status::OK();
493
8.33k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
101
                                                            LocalSinkStateInfo& info) {
489
101
    auto local_state = LocalStateType::create_unique(this, state);
490
101
    RETURN_IF_ERROR(local_state->init(state, info));
491
101
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
101
    return Status::OK();
493
101
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
263k
                                                            LocalSinkStateInfo& info) {
489
263k
    auto local_state = LocalStateType::create_unique(this, state);
490
263k
    RETURN_IF_ERROR(local_state->init(state, info));
491
263k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
263k
    return Status::OK();
493
263k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
27
                                                            LocalSinkStateInfo& info) {
489
27
    auto local_state = LocalStateType::create_unique(this, state);
490
27
    RETURN_IF_ERROR(local_state->init(state, info));
491
27
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
27
    return Status::OK();
493
27
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
282k
                                                            LocalSinkStateInfo& info) {
489
282k
    auto local_state = LocalStateType::create_unique(this, state);
490
282k
    RETURN_IF_ERROR(local_state->init(state, info));
491
282k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
282k
    return Status::OK();
493
282k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
138k
                                                            LocalSinkStateInfo& info) {
489
138k
    auto local_state = LocalStateType::create_unique(this, state);
490
138k
    RETURN_IF_ERROR(local_state->init(state, info));
491
138k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
138k
    return Status::OK();
493
138k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
264
                                                            LocalSinkStateInfo& info) {
489
264
    auto local_state = LocalStateType::create_unique(this, state);
490
264
    RETURN_IF_ERROR(local_state->init(state, info));
491
264
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
264
    return Status::OK();
493
264
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
86
                                                            LocalSinkStateInfo& info) {
489
86
    auto local_state = LocalStateType::create_unique(this, state);
490
86
    RETURN_IF_ERROR(local_state->init(state, info));
491
86
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
86
    return Status::OK();
493
86
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
708k
                                                            LocalSinkStateInfo& info) {
489
708k
    auto local_state = LocalStateType::create_unique(this, state);
490
708k
    RETURN_IF_ERROR(local_state->init(state, info));
491
708k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
708k
    return Status::OK();
493
708k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
11.3k
                                                            LocalSinkStateInfo& info) {
489
11.3k
    auto local_state = LocalStateType::create_unique(this, state);
490
11.3k
    RETURN_IF_ERROR(local_state->init(state, info));
491
11.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
11.3k
    return Status::OK();
493
11.3k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
9.72k
                                                            LocalSinkStateInfo& info) {
489
9.72k
    auto local_state = LocalStateType::create_unique(this, state);
490
9.72k
    RETURN_IF_ERROR(local_state->init(state, info));
491
9.72k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
9.72k
    return Status::OK();
493
9.72k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
3.88k
                                                            LocalSinkStateInfo& info) {
489
3.88k
    auto local_state = LocalStateType::create_unique(this, state);
490
3.88k
    RETURN_IF_ERROR(local_state->init(state, info));
491
3.88k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
3.88k
    return Status::OK();
493
3.88k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
298
                                                            LocalSinkStateInfo& info) {
489
298
    auto local_state = LocalStateType::create_unique(this, state);
490
298
    RETURN_IF_ERROR(local_state->init(state, info));
491
298
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
298
    return Status::OK();
493
298
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
4.73k
                                                            LocalSinkStateInfo& info) {
489
4.73k
    auto local_state = LocalStateType::create_unique(this, state);
490
4.73k
    RETURN_IF_ERROR(local_state->init(state, info));
491
4.73k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
4.73k
    return Status::OK();
493
4.73k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
2.62k
                                                            LocalSinkStateInfo& info) {
489
2.62k
    auto local_state = LocalStateType::create_unique(this, state);
490
2.62k
    RETURN_IF_ERROR(local_state->init(state, info));
491
2.62k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
2.62k
    return Status::OK();
493
2.62k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
2.50k
                                                            LocalSinkStateInfo& info) {
489
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
490
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
491
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
2.50k
    return Status::OK();
493
2.50k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
2.55k
                                                            LocalSinkStateInfo& info) {
489
2.55k
    auto local_state = LocalStateType::create_unique(this, state);
490
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
491
2.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
2.55k
    return Status::OK();
493
2.55k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
1
                                                            LocalSinkStateInfo& info) {
489
1
    auto local_state = LocalStateType::create_unique(this, state);
490
1
    RETURN_IF_ERROR(local_state->init(state, info));
491
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
1
    return Status::OK();
493
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
165
                                                            LocalSinkStateInfo& info) {
489
165
    auto local_state = LocalStateType::create_unique(this, state);
490
165
    RETURN_IF_ERROR(local_state->init(state, info));
491
165
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
165
    return Status::OK();
493
165
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
14
                                                            LocalSinkStateInfo& info) {
489
14
    auto local_state = LocalStateType::create_unique(this, state);
490
14
    RETURN_IF_ERROR(local_state->init(state, info));
491
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
14
    return Status::OK();
493
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
104
                                                            LocalSinkStateInfo& info) {
489
104
    auto local_state = LocalStateType::create_unique(this, state);
490
104
    RETURN_IF_ERROR(local_state->init(state, info));
491
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
104
    return Status::OK();
493
104
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
151
                                                            LocalSinkStateInfo& info) {
489
151
    auto local_state = LocalStateType::create_unique(this, state);
490
151
    RETURN_IF_ERROR(local_state->init(state, info));
491
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
151
    return Status::OK();
493
151
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
488
151
                                                            LocalSinkStateInfo& info) {
489
151
    auto local_state = LocalStateType::create_unique(this, state);
490
151
    RETURN_IF_ERROR(local_state->init(state, info));
491
151
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
492
151
    return Status::OK();
493
151
}
494
495
template <typename LocalStateType>
496
1.79M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
0
                                 LocalExchangeSharedState>) {
499
0
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
0
                                        MultiCastSharedState>) {
502
0
        throw Exception(Status::FatalError("should not reach here!"));
503
1.79M
    } else {
504
1.79M
        auto ss = LocalStateType::SharedStateType::create_shared();
505
1.79M
        ss->id = operator_id();
506
1.79M
        for (auto& dest : dests_id()) {
507
1.79M
            ss->related_op_ids.insert(dest);
508
1.79M
        }
509
1.79M
        return ss;
510
1.79M
    }
511
1.79M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
132k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
132k
    } else {
504
132k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
132k
        ss->id = operator_id();
506
132k
        for (auto& dest : dests_id()) {
507
132k
            ss->related_op_ids.insert(dest);
508
132k
        }
509
132k
        return ss;
510
132k
    }
511
132k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
460k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
460k
    } else {
504
460k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
460k
        ss->id = operator_id();
506
460k
        for (auto& dest : dests_id()) {
507
460k
            ss->related_op_ids.insert(dest);
508
460k
        }
509
460k
        return ss;
510
460k
    }
511
460k
}
_ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
88
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
88
    } else {
504
88
        auto ss = LocalStateType::SharedStateType::create_shared();
505
88
        ss->id = operator_id();
506
88
        for (auto& dest : dests_id()) {
507
88
            ss->related_op_ids.insert(dest);
508
88
        }
509
88
        return ss;
510
88
    }
511
88
}
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
3
    } else {
504
3
        auto ss = LocalStateType::SharedStateType::create_shared();
505
3
        ss->id = operator_id();
506
3
        for (auto& dest : dests_id()) {
507
3
            ss->related_op_ids.insert(dest);
508
3
        }
509
3
        return ss;
510
3
    }
511
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
540
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
540
    } else {
504
540
        auto ss = LocalStateType::SharedStateType::create_shared();
505
540
        ss->id = operator_id();
506
540
        for (auto& dest : dests_id()) {
507
540
            ss->related_op_ids.insert(dest);
508
540
        }
509
540
        return ss;
510
540
    }
511
540
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
54.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
54.1k
    } else {
504
54.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
54.1k
        ss->id = operator_id();
506
54.1k
        for (auto& dest : dests_id()) {
507
54.0k
            ss->related_op_ids.insert(dest);
508
54.0k
        }
509
54.1k
        return ss;
510
54.1k
    }
511
54.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
496
5.65k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
5.65k
    } else {
504
5.65k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
5.65k
        ss->id = operator_id();
506
5.65k
        for (auto& dest : dests_id()) {
507
5.65k
            ss->related_op_ids.insert(dest);
508
5.65k
        }
509
5.65k
        return ss;
510
5.65k
    }
511
5.65k
}
_ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
5.14k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
5.14k
    } else {
504
5.14k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
5.14k
        ss->id = operator_id();
506
5.14k
        for (auto& dest : dests_id()) {
507
5.14k
            ss->related_op_ids.insert(dest);
508
5.14k
        }
509
5.14k
        return ss;
510
5.14k
    }
511
5.14k
}
_ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
156
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
156
    } else {
504
156
        auto ss = LocalStateType::SharedStateType::create_shared();
505
156
        ss->id = operator_id();
506
156
        for (auto& dest : dests_id()) {
507
156
            ss->related_op_ids.insert(dest);
508
156
        }
509
156
        return ss;
510
156
    }
511
156
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
3.38k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
3.38k
    } else {
504
3.38k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
3.38k
        ss->id = operator_id();
506
3.38k
        for (auto& dest : dests_id()) {
507
3.38k
            ss->related_op_ids.insert(dest);
508
3.38k
        }
509
3.38k
        return ss;
510
3.38k
    }
511
3.38k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
160
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
160
    } else {
504
160
        auto ss = LocalStateType::SharedStateType::create_shared();
505
160
        ss->id = operator_id();
506
160
        for (auto& dest : dests_id()) {
507
160
            ss->related_op_ids.insert(dest);
508
160
        }
509
160
        return ss;
510
160
    }
511
160
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
640
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
640
    } else {
504
640
        auto ss = LocalStateType::SharedStateType::create_shared();
505
640
        ss->id = operator_id();
506
640
        for (auto& dest : dests_id()) {
507
640
            ss->related_op_ids.insert(dest);
508
640
        }
509
640
        return ss;
510
640
    }
511
640
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
8.34k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
8.34k
    } else {
504
8.34k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
8.34k
        ss->id = operator_id();
506
8.34k
        for (auto& dest : dests_id()) {
507
8.34k
            ss->related_op_ids.insert(dest);
508
8.34k
        }
509
8.34k
        return ss;
510
8.34k
    }
511
8.34k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
101
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
101
    } else {
504
101
        auto ss = LocalStateType::SharedStateType::create_shared();
505
101
        ss->id = operator_id();
506
101
        for (auto& dest : dests_id()) {
507
101
            ss->related_op_ids.insert(dest);
508
101
        }
509
101
        return ss;
510
101
    }
511
101
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
263k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
263k
    } else {
504
263k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
263k
        ss->id = operator_id();
506
263k
        for (auto& dest : dests_id()) {
507
263k
            ss->related_op_ids.insert(dest);
508
263k
        }
509
263k
        return ss;
510
263k
    }
511
263k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
29
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
29
    } else {
504
29
        auto ss = LocalStateType::SharedStateType::create_shared();
505
29
        ss->id = operator_id();
506
29
        for (auto& dest : dests_id()) {
507
29
            ss->related_op_ids.insert(dest);
508
29
        }
509
29
        return ss;
510
29
    }
511
29
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
138k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
138k
    } else {
504
138k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
138k
        ss->id = operator_id();
506
138k
        for (auto& dest : dests_id()) {
507
138k
            ss->related_op_ids.insert(dest);
508
138k
        }
509
138k
        return ss;
510
138k
    }
511
138k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
85
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
85
    } else {
504
85
        auto ss = LocalStateType::SharedStateType::create_shared();
505
85
        ss->id = operator_id();
506
85
        for (auto& dest : dests_id()) {
507
85
            ss->related_op_ids.insert(dest);
508
85
        }
509
85
        return ss;
510
85
    }
511
85
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
707k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
707k
    } else {
504
707k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
707k
        ss->id = operator_id();
506
707k
        for (auto& dest : dests_id()) {
507
706k
            ss->related_op_ids.insert(dest);
508
706k
        }
509
707k
        return ss;
510
707k
    }
511
707k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
11.4k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
11.4k
    } else {
504
11.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
11.4k
        ss->id = operator_id();
506
11.4k
        for (auto& dest : dests_id()) {
507
11.4k
            ss->related_op_ids.insert(dest);
508
11.4k
        }
509
11.4k
        return ss;
510
11.4k
    }
511
11.4k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
399
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
399
    } else {
504
399
        auto ss = LocalStateType::SharedStateType::create_shared();
505
399
        ss->id = operator_id();
506
399
        for (auto& dest : dests_id()) {
507
399
            ss->related_op_ids.insert(dest);
508
399
        }
509
399
        return ss;
510
399
    }
511
399
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
496
2.51k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
2.51k
    } else {
504
2.51k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
2.51k
        ss->id = operator_id();
506
2.51k
        for (auto& dest : dests_id()) {
507
2.51k
            ss->related_op_ids.insert(dest);
508
2.51k
        }
509
2.51k
        return ss;
510
2.51k
    }
511
2.51k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
496
2.56k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
2.56k
    } else {
504
2.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
505
2.56k
        ss->id = operator_id();
506
2.56k
        for (auto& dest : dests_id()) {
507
2.56k
            ss->related_op_ids.insert(dest);
508
2.56k
        }
509
2.56k
        return ss;
510
2.56k
    }
511
2.56k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
165
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
165
    } else {
504
165
        auto ss = LocalStateType::SharedStateType::create_shared();
505
165
        ss->id = operator_id();
506
165
        for (auto& dest : dests_id()) {
507
165
            ss->related_op_ids.insert(dest);
508
165
        }
509
165
        return ss;
510
165
    }
511
165
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
496
104
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
497
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
498
                                 LocalExchangeSharedState>) {
499
        return nullptr;
500
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
501
                                        MultiCastSharedState>) {
502
        throw Exception(Status::FatalError("should not reach here!"));
503
104
    } else {
504
104
        auto ss = LocalStateType::SharedStateType::create_shared();
505
104
        ss->id = operator_id();
506
104
        for (auto& dest : dests_id()) {
507
104
            ss->related_op_ids.insert(dest);
508
104
        }
509
104
        return ss;
510
104
    }
511
104
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
512
513
template <typename LocalStateType>
514
2.70M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
2.70M
    auto local_state = LocalStateType::create_unique(state, this);
516
2.70M
    RETURN_IF_ERROR(local_state->init(state, info));
517
2.70M
    state->emplace_local_state(operator_id(), std::move(local_state));
518
2.70M
    return Status::OK();
519
2.70M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
104k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
104k
    auto local_state = LocalStateType::create_unique(state, this);
516
104k
    RETURN_IF_ERROR(local_state->init(state, info));
517
104k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
104k
    return Status::OK();
519
104k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
306k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
306k
    auto local_state = LocalStateType::create_unique(state, this);
516
306k
    RETURN_IF_ERROR(local_state->init(state, info));
517
306k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
306k
    return Status::OK();
519
306k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
78
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
78
    auto local_state = LocalStateType::create_unique(state, this);
516
78
    RETURN_IF_ERROR(local_state->init(state, info));
517
78
    state->emplace_local_state(operator_id(), std::move(local_state));
518
78
    return Status::OK();
519
78
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
31.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
31.4k
    auto local_state = LocalStateType::create_unique(state, this);
516
31.4k
    RETURN_IF_ERROR(local_state->init(state, info));
517
31.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
31.4k
    return Status::OK();
519
31.4k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
8.29k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
8.29k
    auto local_state = LocalStateType::create_unique(state, this);
516
8.29k
    RETURN_IF_ERROR(local_state->init(state, info));
517
8.29k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
8.29k
    return Status::OK();
519
8.29k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
8.71k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
8.71k
    auto local_state = LocalStateType::create_unique(state, this);
516
8.71k
    RETURN_IF_ERROR(local_state->init(state, info));
517
8.71k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
8.71k
    return Status::OK();
519
8.71k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
21
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
21
    auto local_state = LocalStateType::create_unique(state, this);
516
21
    RETURN_IF_ERROR(local_state->init(state, info));
517
21
    state->emplace_local_state(operator_id(), std::move(local_state));
518
21
    return Status::OK();
519
21
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
254k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
254k
    auto local_state = LocalStateType::create_unique(state, this);
516
254k
    RETURN_IF_ERROR(local_state->init(state, info));
517
254k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
254k
    return Status::OK();
519
254k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
138k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
138k
    auto local_state = LocalStateType::create_unique(state, this);
516
138k
    RETURN_IF_ERROR(local_state->init(state, info));
517
138k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
138k
    return Status::OK();
519
138k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
321
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
321
    auto local_state = LocalStateType::create_unique(state, this);
516
321
    RETURN_IF_ERROR(local_state->init(state, info));
517
321
    state->emplace_local_state(operator_id(), std::move(local_state));
518
321
    return Status::OK();
519
321
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
76
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
76
    auto local_state = LocalStateType::create_unique(state, this);
516
76
    RETURN_IF_ERROR(local_state->init(state, info));
517
76
    state->emplace_local_state(operator_id(), std::move(local_state));
518
76
    return Status::OK();
519
76
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
4.28k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
4.28k
    auto local_state = LocalStateType::create_unique(state, this);
516
4.28k
    RETURN_IF_ERROR(local_state->init(state, info));
517
4.28k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
4.28k
    return Status::OK();
519
4.28k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
449k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
449k
    auto local_state = LocalStateType::create_unique(state, this);
516
449k
    RETURN_IF_ERROR(local_state->init(state, info));
517
449k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
449k
    return Status::OK();
519
449k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
1.24k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
1.24k
    auto local_state = LocalStateType::create_unique(state, this);
516
1.24k
    RETURN_IF_ERROR(local_state->init(state, info));
517
1.24k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
1.24k
    return Status::OK();
519
1.24k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
11.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
11.1k
    auto local_state = LocalStateType::create_unique(state, this);
516
11.1k
    RETURN_IF_ERROR(local_state->init(state, info));
517
11.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
11.1k
    return Status::OK();
519
11.1k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
221
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
221
    auto local_state = LocalStateType::create_unique(state, this);
516
221
    RETURN_IF_ERROR(local_state->init(state, info));
517
221
    state->emplace_local_state(operator_id(), std::move(local_state));
518
221
    return Status::OK();
519
221
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
516
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
517
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
1.60k
    return Status::OK();
519
1.60k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
56.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
56.3k
    auto local_state = LocalStateType::create_unique(state, this);
516
56.3k
    RETURN_IF_ERROR(local_state->init(state, info));
517
56.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
56.3k
    return Status::OK();
519
56.3k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
10.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
10.3k
    auto local_state = LocalStateType::create_unique(state, this);
516
10.3k
    RETURN_IF_ERROR(local_state->init(state, info));
517
10.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
10.3k
    return Status::OK();
519
10.3k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
297
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
297
    auto local_state = LocalStateType::create_unique(state, this);
516
297
    RETURN_IF_ERROR(local_state->init(state, info));
517
297
    state->emplace_local_state(operator_id(), std::move(local_state));
518
297
    return Status::OK();
519
297
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
2.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
2.48k
    auto local_state = LocalStateType::create_unique(state, this);
516
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
517
2.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
2.48k
    return Status::OK();
519
2.48k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
2.50k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
2.50k
    auto local_state = LocalStateType::create_unique(state, this);
516
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
517
2.50k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
2.50k
    return Status::OK();
519
2.50k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
463
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
463
    auto local_state = LocalStateType::create_unique(state, this);
516
463
    RETURN_IF_ERROR(local_state->init(state, info));
517
463
    state->emplace_local_state(operator_id(), std::move(local_state));
518
463
    return Status::OK();
519
463
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
2.04k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
2.04k
    auto local_state = LocalStateType::create_unique(state, this);
516
2.04k
    RETURN_IF_ERROR(local_state->init(state, info));
517
2.04k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
2.04k
    return Status::OK();
519
2.04k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
6.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
6.08k
    auto local_state = LocalStateType::create_unique(state, this);
516
6.08k
    RETURN_IF_ERROR(local_state->init(state, info));
517
6.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
6.08k
    return Status::OK();
519
6.08k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
768k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
768k
    auto local_state = LocalStateType::create_unique(state, this);
516
768k
    RETURN_IF_ERROR(local_state->init(state, info));
517
768k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
768k
    return Status::OK();
519
768k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
14
    auto local_state = LocalStateType::create_unique(state, this);
516
14
    RETURN_IF_ERROR(local_state->init(state, info));
517
14
    state->emplace_local_state(operator_id(), std::move(local_state));
518
14
    return Status::OK();
519
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
151
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
151
    auto local_state = LocalStateType::create_unique(state, this);
516
151
    RETURN_IF_ERROR(local_state->init(state, info));
517
151
    state->emplace_local_state(operator_id(), std::move(local_state));
518
151
    return Status::OK();
519
151
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
1.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
1.95k
    auto local_state = LocalStateType::create_unique(state, this);
516
1.95k
    RETURN_IF_ERROR(local_state->init(state, info));
517
1.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
1.95k
    return Status::OK();
519
1.95k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
1.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
1.61k
    auto local_state = LocalStateType::create_unique(state, this);
516
1.61k
    RETURN_IF_ERROR(local_state->init(state, info));
517
1.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
1.61k
    return Status::OK();
519
1.61k
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
2.25k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
2.25k
    auto local_state = LocalStateType::create_unique(state, this);
516
2.25k
    RETURN_IF_ERROR(local_state->init(state, info));
517
2.25k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
2.25k
    return Status::OK();
519
2.25k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
12.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
12.0k
    auto local_state = LocalStateType::create_unique(state, this);
516
12.0k
    RETURN_IF_ERROR(local_state->init(state, info));
517
12.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
12.0k
    return Status::OK();
519
12.0k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
514
517k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
515
517k
    auto local_state = LocalStateType::create_unique(state, this);
516
517k
    RETURN_IF_ERROR(local_state->init(state, info));
517
517k
    state->emplace_local_state(operator_id(), std::move(local_state));
518
517k
    return Status::OK();
519
517k
}
520
521
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
522
                                                         RuntimeState* state)
523
2.12M
        : _parent(parent), _state(state) {}
524
525
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
526
2.70M
        : _num_rows_returned(0), _rows_returned_counter(nullptr), _parent(parent), _state(state) {}
527
528
template <typename SharedStateArg>
529
2.70M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
2.70M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
2.70M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
2.70M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
2.70M
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
2.70M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
2.70M
    _operator_profile->add_child(_common_profile.get(), true);
538
2.70M
    _operator_profile->add_child(_custom_profile.get(), true);
539
2.70M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
2.70M
    if constexpr (!is_fake_shared) {
541
1.36M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
789k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
789k
                                    .first.get()
544
789k
                                    ->template cast<SharedStateArg>();
545
546
789k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
789k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
789k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
789k
        } else if (info.shared_state) {
550
521k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
0
                DCHECK(false);
552
0
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
521k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
521k
            _dependency = _shared_state->create_source_dependency(
557
521k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
521k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
521k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
521k
        } else {
561
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
18.4E
                DCHECK(false);
563
18.4E
            }
564
55.8k
        }
565
1.36M
    }
566
567
2.70M
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
2.70M
    _rows_returned_counter =
572
2.70M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
2.70M
    _blocks_returned_counter =
574
2.70M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
2.70M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
2.70M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
2.70M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
2.70M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
2.70M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
2.70M
    _memory_used_counter =
581
2.70M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
2.70M
    _common_profile->add_info_string("IsColocate",
583
2.70M
                                     std::to_string(_parent->is_colocated_operator()));
584
2.70M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
2.70M
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
2.70M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
2.70M
    return Status::OK();
588
2.70M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
104k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
104k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
104k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
104k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
104k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
104k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
104k
    _operator_profile->add_child(_common_profile.get(), true);
538
104k
    _operator_profile->add_child(_custom_profile.get(), true);
539
104k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
104k
    if constexpr (!is_fake_shared) {
541
104k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
20.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
20.3k
                                    .first.get()
544
20.3k
                                    ->template cast<SharedStateArg>();
545
546
20.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
20.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
20.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
84.5k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
83.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
83.5k
            _dependency = _shared_state->create_source_dependency(
557
83.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
83.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
83.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
83.5k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
1.05k
        }
565
104k
    }
566
567
104k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
104k
    _rows_returned_counter =
572
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
104k
    _blocks_returned_counter =
574
104k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
104k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
104k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
104k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
104k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
104k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
104k
    _memory_used_counter =
581
104k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
104k
    _common_profile->add_info_string("IsColocate",
583
104k
                                     std::to_string(_parent->is_colocated_operator()));
584
104k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
104k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
104k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
104k
    return Status::OK();
588
104k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
1
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
1
    _operator_profile->add_child(_common_profile.get(), true);
538
1
    _operator_profile->add_child(_custom_profile.get(), true);
539
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
1
    if constexpr (!is_fake_shared) {
541
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
1
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
1
            _dependency = _shared_state->create_source_dependency(
557
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
1
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
0
        }
565
1
    }
566
567
1
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
1
    _rows_returned_counter =
572
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
1
    _blocks_returned_counter =
574
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
1
    _memory_used_counter =
581
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
1
    _common_profile->add_info_string("IsColocate",
583
1
                                     std::to_string(_parent->is_colocated_operator()));
584
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
1
    return Status::OK();
588
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
263k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
263k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
263k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
263k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
263k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
263k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
263k
    _operator_profile->add_child(_common_profile.get(), true);
538
263k
    _operator_profile->add_child(_custom_profile.get(), true);
539
263k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
263k
    if constexpr (!is_fake_shared) {
541
263k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
263k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
260k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
260k
            _dependency = _shared_state->create_source_dependency(
557
260k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
260k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
260k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
260k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
2.69k
        }
565
263k
    }
566
567
263k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
263k
    _rows_returned_counter =
572
263k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
263k
    _blocks_returned_counter =
574
263k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
263k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
263k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
263k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
263k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
263k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
263k
    _memory_used_counter =
581
263k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
263k
    _common_profile->add_info_string("IsColocate",
583
263k
                                     std::to_string(_parent->is_colocated_operator()));
584
263k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
263k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
263k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
263k
    return Status::OK();
588
263k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
21
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
21
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
21
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
21
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
21
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
21
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
21
    _operator_profile->add_child(_common_profile.get(), true);
538
21
    _operator_profile->add_child(_custom_profile.get(), true);
539
21
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
21
    if constexpr (!is_fake_shared) {
541
21
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
21
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
21
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
21
            _dependency = _shared_state->create_source_dependency(
557
21
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
21
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
21
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
21
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
0
        }
565
21
    }
566
567
21
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
21
    _rows_returned_counter =
572
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
21
    _blocks_returned_counter =
574
21
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
21
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
21
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
21
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
21
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
21
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
21
    _memory_used_counter =
581
21
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
21
    _common_profile->add_info_string("IsColocate",
583
21
                                     std::to_string(_parent->is_colocated_operator()));
584
21
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
21
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
21
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
21
    return Status::OK();
588
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
11.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
11.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
11.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
11.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
11.1k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
11.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
11.1k
    _operator_profile->add_child(_common_profile.get(), true);
538
11.1k
    _operator_profile->add_child(_custom_profile.get(), true);
539
11.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
11.1k
    if constexpr (!is_fake_shared) {
541
11.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
11.1k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
11.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
11.0k
            _dependency = _shared_state->create_source_dependency(
557
11.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
11.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
11.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
11.0k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
75
        }
565
11.1k
    }
566
567
11.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
11.1k
    _rows_returned_counter =
572
11.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
11.1k
    _blocks_returned_counter =
574
11.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
11.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
11.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
11.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
11.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
11.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
11.1k
    _memory_used_counter =
581
11.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
11.1k
    _common_profile->add_info_string("IsColocate",
583
11.1k
                                     std::to_string(_parent->is_colocated_operator()));
584
11.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
11.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
11.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
11.1k
    return Status::OK();
588
11.1k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.30k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
8.30k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
8.30k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
8.30k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
8.30k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
8.30k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
8.30k
    _operator_profile->add_child(_common_profile.get(), true);
538
8.30k
    _operator_profile->add_child(_custom_profile.get(), true);
539
8.30k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
8.30k
    if constexpr (!is_fake_shared) {
541
8.30k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
8.30k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
8.27k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
8.27k
            _dependency = _shared_state->create_source_dependency(
557
8.27k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
8.27k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
8.27k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
8.27k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
33
        }
565
8.30k
    }
566
567
8.30k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
8.30k
    _rows_returned_counter =
572
8.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
8.30k
    _blocks_returned_counter =
574
8.30k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
8.30k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
8.30k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
8.30k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
8.30k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
8.30k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
8.30k
    _memory_used_counter =
581
8.30k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
8.30k
    _common_profile->add_info_string("IsColocate",
583
8.30k
                                     std::to_string(_parent->is_colocated_operator()));
584
8.30k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
8.30k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
8.30k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
8.30k
    return Status::OK();
588
8.30k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
138k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
138k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
138k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
138k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
138k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
138k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
138k
    _operator_profile->add_child(_common_profile.get(), true);
538
138k
    _operator_profile->add_child(_custom_profile.get(), true);
539
138k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
138k
    if constexpr (!is_fake_shared) {
541
138k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
138k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
137k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
137k
            _dependency = _shared_state->create_source_dependency(
557
137k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
137k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
137k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
137k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
627
        }
565
138k
    }
566
567
138k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
138k
    _rows_returned_counter =
572
138k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
138k
    _blocks_returned_counter =
574
138k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
138k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
138k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
138k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
138k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
138k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
138k
    _memory_used_counter =
581
138k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
138k
    _common_profile->add_info_string("IsColocate",
583
138k
                                     std::to_string(_parent->is_colocated_operator()));
584
138k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
138k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
138k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
138k
    return Status::OK();
588
138k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
320
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
320
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
320
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
320
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
320
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
320
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
320
    _operator_profile->add_child(_common_profile.get(), true);
538
320
    _operator_profile->add_child(_custom_profile.get(), true);
539
320
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
320
    if constexpr (!is_fake_shared) {
541
320
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
318
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
318
                                    .first.get()
544
318
                                    ->template cast<SharedStateArg>();
545
546
318
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
318
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
318
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
318
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
0
            _dependency = _shared_state->create_source_dependency(
557
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
2
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
2
        }
565
320
    }
566
567
320
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
320
    _rows_returned_counter =
572
320
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
320
    _blocks_returned_counter =
574
320
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
320
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
320
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
320
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
320
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
320
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
320
    _memory_used_counter =
581
320
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
320
    _common_profile->add_info_string("IsColocate",
583
320
                                     std::to_string(_parent->is_colocated_operator()));
584
320
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
320
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
320
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
320
    return Status::OK();
588
320
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
76
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
76
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
76
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
76
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
76
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
76
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
76
    _operator_profile->add_child(_common_profile.get(), true);
538
76
    _operator_profile->add_child(_custom_profile.get(), true);
539
76
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
76
    if constexpr (!is_fake_shared) {
541
76
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
76
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
76
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
76
            _dependency = _shared_state->create_source_dependency(
557
76
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
76
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
76
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
76
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
0
        }
565
76
    }
566
567
76
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
76
    _rows_returned_counter =
572
76
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
76
    _blocks_returned_counter =
574
76
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
76
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
76
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
76
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
76
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
76
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
76
    _memory_used_counter =
581
76
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
76
    _common_profile->add_info_string("IsColocate",
583
76
                                     std::to_string(_parent->is_colocated_operator()));
584
76
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
76
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
76
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
76
    return Status::OK();
588
76
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.33M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
1.33M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
1.33M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
1.33M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
1.33M
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
1.33M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
1.33M
    _operator_profile->add_child(_common_profile.get(), true);
538
1.33M
    _operator_profile->add_child(_custom_profile.get(), true);
539
1.33M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
    if constexpr (!is_fake_shared) {
541
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
                                    .first.get()
544
                                    ->template cast<SharedStateArg>();
545
546
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
            _dependency = _shared_state->create_source_dependency(
557
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
        }
565
    }
566
567
1.33M
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
1.33M
    _rows_returned_counter =
572
1.33M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
1.33M
    _blocks_returned_counter =
574
1.33M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
1.33M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
1.33M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
1.33M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
1.33M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
1.33M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
1.33M
    _memory_used_counter =
581
1.33M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
1.33M
    _common_profile->add_info_string("IsColocate",
583
1.33M
                                     std::to_string(_parent->is_colocated_operator()));
584
1.33M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
1.33M
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
1.33M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
1.33M
    return Status::OK();
588
1.33M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
56.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
56.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
56.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
56.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
56.2k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
56.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
56.2k
    _operator_profile->add_child(_common_profile.get(), true);
538
56.2k
    _operator_profile->add_child(_custom_profile.get(), true);
539
56.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
56.2k
    if constexpr (!is_fake_shared) {
541
56.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
56.2k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
4.58k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
4.58k
            _dependency = _shared_state->create_source_dependency(
557
4.58k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
4.58k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
4.58k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
51.6k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
51.6k
        }
565
56.2k
    }
566
567
56.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
56.2k
    _rows_returned_counter =
572
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
56.2k
    _blocks_returned_counter =
574
56.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
56.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
56.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
56.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
56.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
56.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
56.2k
    _memory_used_counter =
581
56.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
56.2k
    _common_profile->add_info_string("IsColocate",
583
56.2k
                                     std::to_string(_parent->is_colocated_operator()));
584
56.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
56.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
56.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
56.2k
    return Status::OK();
588
56.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
17
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
17
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
17
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
17
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
17
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
17
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
17
    _operator_profile->add_child(_common_profile.get(), true);
538
17
    _operator_profile->add_child(_custom_profile.get(), true);
539
17
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
17
    if constexpr (!is_fake_shared) {
541
17
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
17
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
17
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
17
            _dependency = _shared_state->create_source_dependency(
557
17
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
17
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
17
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
17
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
0
        }
565
17
    }
566
567
17
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
17
    _rows_returned_counter =
572
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
17
    _blocks_returned_counter =
574
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
17
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
17
    _memory_used_counter =
581
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
17
    _common_profile->add_info_string("IsColocate",
583
17
                                     std::to_string(_parent->is_colocated_operator()));
584
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
17
    return Status::OK();
588
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
10.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
10.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
10.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
10.3k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
10.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
10.3k
    _operator_profile->add_child(_common_profile.get(), true);
538
10.3k
    _operator_profile->add_child(_custom_profile.get(), true);
539
10.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
10.3k
    if constexpr (!is_fake_shared) {
541
10.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
10.3k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
10.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
10.3k
            _dependency = _shared_state->create_source_dependency(
557
10.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
10.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
10.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
10.3k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
14
        }
565
10.3k
    }
566
567
10.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
10.3k
    _rows_returned_counter =
572
10.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
10.3k
    _blocks_returned_counter =
574
10.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
10.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
10.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
10.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
10.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
10.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
10.3k
    _memory_used_counter =
581
10.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
10.3k
    _common_profile->add_info_string("IsColocate",
583
10.3k
                                     std::to_string(_parent->is_colocated_operator()));
584
10.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
10.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
10.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
10.3k
    return Status::OK();
588
10.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
400
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
400
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
400
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
400
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
400
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
400
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
400
    _operator_profile->add_child(_common_profile.get(), true);
538
400
    _operator_profile->add_child(_custom_profile.get(), true);
539
400
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
400
    if constexpr (!is_fake_shared) {
541
400
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
400
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
399
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
399
            _dependency = _shared_state->create_source_dependency(
557
399
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
399
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
399
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
399
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
1
        }
565
400
    }
566
567
400
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
400
    _rows_returned_counter =
572
400
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
400
    _blocks_returned_counter =
574
400
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
400
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
400
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
400
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
400
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
400
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
400
    _memory_used_counter =
581
400
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
400
    _common_profile->add_info_string("IsColocate",
583
400
                                     std::to_string(_parent->is_colocated_operator()));
584
400
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
400
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
400
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
400
    return Status::OK();
588
400
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.08k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
5.08k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
5.08k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
5.08k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
5.08k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
5.08k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
5.08k
    _operator_profile->add_child(_common_profile.get(), true);
538
5.08k
    _operator_profile->add_child(_custom_profile.get(), true);
539
5.08k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
5.08k
    if constexpr (!is_fake_shared) {
541
5.08k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
5.08k
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
4.89k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
4.89k
            _dependency = _shared_state->create_source_dependency(
557
4.89k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
4.89k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
4.89k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
4.89k
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
189
        }
565
5.08k
    }
566
567
5.08k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
5.08k
    _rows_returned_counter =
572
5.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
5.08k
    _blocks_returned_counter =
574
5.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
5.08k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
5.08k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
5.08k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
5.08k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
5.08k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
5.08k
    _memory_used_counter =
581
5.08k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
5.08k
    _common_profile->add_info_string("IsColocate",
583
5.08k
                                     std::to_string(_parent->is_colocated_operator()));
584
5.08k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
5.08k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
5.08k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
5.08k
    return Status::OK();
588
5.08k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
768k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
768k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
768k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
768k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
768k
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
768k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
768k
    _operator_profile->add_child(_common_profile.get(), true);
538
768k
    _operator_profile->add_child(_custom_profile.get(), true);
539
768k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
768k
    if constexpr (!is_fake_shared) {
541
768k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
768k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
768k
                                    .first.get()
544
768k
                                    ->template cast<SharedStateArg>();
545
546
768k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
768k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
768k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
18.4E
        } else if (info.shared_state) {
550
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
0
                DCHECK(false);
552
0
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
0
            _dependency = _shared_state->create_source_dependency(
557
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
18.4E
        } else {
561
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
18.4E
                DCHECK(false);
563
18.4E
            }
564
18.4E
        }
565
768k
    }
566
567
768k
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
768k
    _rows_returned_counter =
572
768k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
768k
    _blocks_returned_counter =
574
768k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
768k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
768k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
768k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
768k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
768k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
768k
    _memory_used_counter =
581
768k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
768k
    _common_profile->add_info_string("IsColocate",
583
768k
                                     std::to_string(_parent->is_colocated_operator()));
584
768k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
768k
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
768k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
768k
    return Status::OK();
588
768k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
151
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
530
151
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
531
151
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
532
151
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
533
151
    _operator_profile->set_metadata(_parent->node_id());
534
    // indent is false so that source operator will have same
535
    // indentation_level with its parent operator.
536
151
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
537
151
    _operator_profile->add_child(_common_profile.get(), true);
538
151
    _operator_profile->add_child(_custom_profile.get(), true);
539
151
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
540
151
    if constexpr (!is_fake_shared) {
541
151
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
542
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
543
0
                                    .first.get()
544
0
                                    ->template cast<SharedStateArg>();
545
546
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
547
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
548
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
549
151
        } else if (info.shared_state) {
550
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
551
                DCHECK(false);
552
            }
553
            // For UnionSourceOperator without children, there is no shared state.
554
151
            _shared_state = info.shared_state->template cast<SharedStateArg>();
555
556
151
            _dependency = _shared_state->create_source_dependency(
557
151
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
558
151
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
559
151
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
560
151
        } else {
561
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
562
                DCHECK(false);
563
            }
564
0
        }
565
151
    }
566
567
151
    if (must_set_shared_state() && _shared_state == nullptr) {
568
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
569
0
    }
570
571
151
    _rows_returned_counter =
572
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
573
151
    _blocks_returned_counter =
574
151
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
575
151
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
576
151
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
577
151
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
578
151
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
579
151
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
580
151
    _memory_used_counter =
581
151
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
582
151
    _common_profile->add_info_string("IsColocate",
583
151
                                     std::to_string(_parent->is_colocated_operator()));
584
151
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
585
151
    _common_profile->add_info_string("FollowedByShuffledOperator",
586
151
                                     std::to_string(_parent->followed_by_shuffled_operator()));
587
151
    return Status::OK();
588
151
}
589
590
template <typename SharedStateArg>
591
2.71M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
2.71M
    _conjuncts.resize(_parent->_conjuncts.size());
593
2.71M
    _projections.resize(_parent->_projections.size());
594
3.21M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
493k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
493k
    }
597
5.64M
    for (size_t i = 0; i < _projections.size(); i++) {
598
2.92M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
2.92M
    }
600
2.71M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
2.73M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
13.0k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
86.3k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
73.2k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
73.2k
                    state, _intermediate_projections[i][j]));
606
73.2k
        }
607
13.0k
    }
608
2.71M
    return Status::OK();
609
2.71M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
105k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
105k
    _conjuncts.resize(_parent->_conjuncts.size());
593
105k
    _projections.resize(_parent->_projections.size());
594
107k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
1.81k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
1.81k
    }
597
556k
    for (size_t i = 0; i < _projections.size(); i++) {
598
451k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
451k
    }
600
105k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
106k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
1.39k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
15.9k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
14.5k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
14.5k
                    state, _intermediate_projections[i][j]));
606
14.5k
        }
607
1.39k
    }
608
105k
    return Status::OK();
609
105k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
3
    _conjuncts.resize(_parent->_conjuncts.size());
593
3
    _projections.resize(_parent->_projections.size());
594
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
3
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
3
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
3
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
3
    return Status::OK();
609
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
263k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
263k
    _conjuncts.resize(_parent->_conjuncts.size());
593
263k
    _projections.resize(_parent->_projections.size());
594
263k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
264k
    for (size_t i = 0; i < _projections.size(); i++) {
598
354
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
354
    }
600
263k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
263k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
263k
    return Status::OK();
609
263k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
21
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
21
    _conjuncts.resize(_parent->_conjuncts.size());
593
21
    _projections.resize(_parent->_projections.size());
594
21
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
21
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
21
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
21
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
21
    return Status::OK();
609
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
11.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
11.4k
    _conjuncts.resize(_parent->_conjuncts.size());
593
11.4k
    _projections.resize(_parent->_projections.size());
594
11.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
81
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
81
    }
597
66.5k
    for (size_t i = 0; i < _projections.size(); i++) {
598
55.1k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
55.1k
    }
600
11.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
11.5k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
147
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
902
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
755
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
755
                    state, _intermediate_projections[i][j]));
606
755
        }
607
147
    }
608
11.4k
    return Status::OK();
609
11.4k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
8.35k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
8.35k
    _conjuncts.resize(_parent->_conjuncts.size());
593
8.35k
    _projections.resize(_parent->_projections.size());
594
9.09k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
740
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
740
    }
597
22.1k
    for (size_t i = 0; i < _projections.size(); i++) {
598
13.8k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
13.8k
    }
600
8.35k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
8.44k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
95
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
727
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
632
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
632
                    state, _intermediate_projections[i][j]));
606
632
        }
607
95
    }
608
8.35k
    return Status::OK();
609
8.35k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
138k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
138k
    _conjuncts.resize(_parent->_conjuncts.size());
593
138k
    _projections.resize(_parent->_projections.size());
594
142k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
4.35k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
4.35k
    }
597
404k
    for (size_t i = 0; i < _projections.size(); i++) {
598
265k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
265k
    }
600
138k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
138k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
258
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
1.98k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
1.72k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
1.72k
                    state, _intermediate_projections[i][j]));
606
1.72k
        }
607
258
    }
608
138k
    return Status::OK();
609
138k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
323
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
323
    _conjuncts.resize(_parent->_conjuncts.size());
593
323
    _projections.resize(_parent->_projections.size());
594
339
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
16
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
16
    }
597
1.23k
    for (size_t i = 0; i < _projections.size(); i++) {
598
907
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
907
    }
600
323
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
323
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
323
    return Status::OK();
609
323
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
80
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
80
    _conjuncts.resize(_parent->_conjuncts.size());
593
80
    _projections.resize(_parent->_projections.size());
594
80
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
164
    for (size_t i = 0; i < _projections.size(); i++) {
598
84
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
84
    }
600
80
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
80
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
80
    return Status::OK();
609
80
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
1.34M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
1.34M
    _conjuncts.resize(_parent->_conjuncts.size());
593
1.34M
    _projections.resize(_parent->_projections.size());
594
1.82M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
482k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
482k
    }
597
3.38M
    for (size_t i = 0; i < _projections.size(); i++) {
598
2.04M
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
2.04M
    }
600
1.34M
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
1.35M
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
11.1k
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
66.7k
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
55.6k
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
55.6k
                    state, _intermediate_projections[i][j]));
606
55.6k
        }
607
11.1k
    }
608
1.34M
    return Status::OK();
609
1.34M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
56.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
56.4k
    _conjuncts.resize(_parent->_conjuncts.size());
593
56.4k
    _projections.resize(_parent->_projections.size());
594
56.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
149k
    for (size_t i = 0; i < _projections.size(); i++) {
598
92.6k
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
92.6k
    }
600
56.4k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
56.4k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
56.4k
    return Status::OK();
609
56.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
17
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
17
    _conjuncts.resize(_parent->_conjuncts.size());
593
17
    _projections.resize(_parent->_projections.size());
594
17
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
17
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
17
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
17
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
17
    return Status::OK();
609
17
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
10.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
10.3k
    _conjuncts.resize(_parent->_conjuncts.size());
593
10.3k
    _projections.resize(_parent->_projections.size());
594
13.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
3.63k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
3.63k
    }
597
10.3k
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
10.3k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
10.3k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
10.3k
    return Status::OK();
609
10.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
400
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
400
    _conjuncts.resize(_parent->_conjuncts.size());
593
400
    _projections.resize(_parent->_projections.size());
594
400
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
400
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
400
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
400
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
400
    return Status::OK();
609
400
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
5.12k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
5.12k
    _conjuncts.resize(_parent->_conjuncts.size());
593
5.12k
    _projections.resize(_parent->_projections.size());
594
5.12k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
5.12k
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
5.12k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
5.12k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
5.12k
    return Status::OK();
609
5.12k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
773k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
773k
    _conjuncts.resize(_parent->_conjuncts.size());
593
773k
    _projections.resize(_parent->_projections.size());
594
773k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
0
    }
597
773k
    for (size_t i = 0; i < _projections.size(); i++) {
598
0
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
0
    }
600
773k
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
773k
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
0
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
0
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
0
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
0
                    state, _intermediate_projections[i][j]));
606
0
        }
607
0
    }
608
773k
    return Status::OK();
609
773k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
591
151
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
592
151
    _conjuncts.resize(_parent->_conjuncts.size());
593
151
    _projections.resize(_parent->_projections.size());
594
158
    for (size_t i = 0; i < _conjuncts.size(); i++) {
595
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
596
7
    }
597
447
    for (size_t i = 0; i < _projections.size(); i++) {
598
296
        RETURN_IF_ERROR(_parent->_projections[i]->clone(state, _projections[i]));
599
296
    }
600
151
    _intermediate_projections.resize(_parent->_intermediate_projections.size());
601
152
    for (int i = 0; i < _parent->_intermediate_projections.size(); i++) {
602
1
        _intermediate_projections[i].resize(_parent->_intermediate_projections[i].size());
603
3
        for (int j = 0; j < _parent->_intermediate_projections[i].size(); j++) {
604
2
            RETURN_IF_ERROR(_parent->_intermediate_projections[i][j]->clone(
605
2
                    state, _intermediate_projections[i][j]));
606
2
        }
607
1
    }
608
151
    return Status::OK();
609
151
}
610
611
template <typename SharedStateArg>
612
10.4k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
10.4k
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
10.4k
    _terminated = true;
617
10.4k
    return Status::OK();
618
10.4k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
1.29k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
1.29k
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
1.29k
    _terminated = true;
617
1.29k
    return Status::OK();
618
1.29k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
158
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
158
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
158
    _terminated = true;
617
158
    return Status::OK();
618
158
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
244
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
244
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
244
    _terminated = true;
617
244
    return Status::OK();
618
244
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
413
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
413
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
413
    _terminated = true;
617
413
    return Status::OK();
618
413
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
6.74k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
6.74k
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
6.74k
    _terminated = true;
617
6.74k
    return Status::OK();
618
6.74k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
3
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
3
    _terminated = true;
617
3
    return Status::OK();
618
3
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
137
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
137
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
137
    _terminated = true;
617
137
    return Status::OK();
618
137
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
220
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
220
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
220
    _terminated = true;
617
220
    return Status::OK();
618
220
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
1.22k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
1.22k
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
1.22k
    _terminated = true;
617
1.22k
    return Status::OK();
618
1.22k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
612
15
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
613
15
    if (_terminated) {
614
0
        return Status::OK();
615
0
    }
616
15
    _terminated = true;
617
15
    return Status::OK();
618
15
}
619
620
template <typename SharedStateArg>
621
3.01M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
3.01M
    if (_closed) {
623
295k
        return Status::OK();
624
295k
    }
625
2.71M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
1.37M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
1.37M
    }
628
2.71M
    _closed = true;
629
2.71M
    return Status::OK();
630
3.01M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
105k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
105k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
105k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
105k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
105k
    }
628
105k
    _closed = true;
629
105k
    return Status::OK();
630
105k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
3
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
3
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
3
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
3
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
3
    }
628
3
    _closed = true;
629
3
    return Status::OK();
630
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
525k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
525k
    if (_closed) {
623
262k
        return Status::OK();
624
262k
    }
625
262k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
262k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
262k
    }
628
262k
    _closed = true;
629
262k
    return Status::OK();
630
525k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
21
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
21
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
21
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
21
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
21
    }
628
21
    _closed = true;
629
21
    return Status::OK();
630
21
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
11.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
11.4k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
11.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
11.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
11.4k
    }
628
11.4k
    _closed = true;
629
11.4k
    return Status::OK();
630
11.4k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
16.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
16.8k
    if (_closed) {
623
8.50k
        return Status::OK();
624
8.50k
    }
625
8.33k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
8.33k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
8.33k
    }
628
8.33k
    _closed = true;
629
8.33k
    return Status::OK();
630
16.8k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
138k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
138k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
138k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
138k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
138k
    }
628
138k
    _closed = true;
629
138k
    return Status::OK();
630
138k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
322
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
322
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
322
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
322
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
322
    }
628
322
    _closed = true;
629
322
    return Status::OK();
630
322
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
75
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
75
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
75
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
75
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
75
    }
628
75
    _closed = true;
629
75
    return Status::OK();
630
75
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
1.36M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
1.36M
    if (_closed) {
623
18.0k
        return Status::OK();
624
18.0k
    }
625
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
    }
628
1.34M
    _closed = true;
629
1.34M
    return Status::OK();
630
1.36M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
56.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
56.4k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
56.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
56.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
56.4k
    }
628
56.4k
    _closed = true;
629
56.4k
    return Status::OK();
630
56.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
28
    if (_closed) {
623
14
        return Status::OK();
624
14
    }
625
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
14
    }
628
14
    _closed = true;
629
14
    return Status::OK();
630
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
10.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
10.3k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
10.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
10.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
10.3k
    }
628
10.3k
    _closed = true;
629
10.3k
    return Status::OK();
630
10.3k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
592
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
592
    if (_closed) {
623
298
        return Status::OK();
624
298
    }
625
294
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
294
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
294
    }
628
294
    _closed = true;
629
294
    return Status::OK();
630
592
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
10.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
10.3k
    if (_closed) {
623
5.26k
        return Status::OK();
624
5.26k
    }
625
5.11k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
5.11k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
5.11k
    }
628
5.11k
    _closed = true;
629
5.11k
    return Status::OK();
630
10.3k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
775k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
775k
    if (_closed) {
623
0
        return Status::OK();
624
0
    }
625
775k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
775k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
775k
    }
628
775k
    _closed = true;
629
775k
    return Status::OK();
630
775k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
621
304
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
622
304
    if (_closed) {
623
162
        return Status::OK();
624
162
    }
625
142
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
626
142
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
627
142
    }
628
142
    _closed = true;
629
142
    return Status::OK();
630
304
}
631
632
template <typename SharedState>
633
2.12M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
2.12M
    _operator_profile =
636
2.12M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
2.12M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
2.12M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
2.12M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
2.12M
    _operator_profile->add_child(_common_profile, true);
645
2.12M
    _operator_profile->add_child(_custom_profile, true);
646
647
2.12M
    _operator_profile->set_metadata(_parent->node_id());
648
2.12M
    _wait_for_finish_dependency_timer =
649
2.12M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
2.12M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
2.12M
    if constexpr (!is_fake_shared) {
652
1.41M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
1.41M
            info.shared_state_map.end()) {
654
303k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
282k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
282k
            }
657
303k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
303k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
303k
                                                  ? 0
660
303k
                                                  : info.task_idx]
661
303k
                                  .get();
662
303k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
1.11M
        } else {
664
1.11M
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
454
                DCHECK(false);
666
454
            }
667
1.11M
            _shared_state = info.shared_state->template cast<SharedState>();
668
1.11M
            _dependency = _shared_state->create_sink_dependency(
669
1.11M
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
1.11M
        }
671
1.41M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
1.41M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
1.41M
    }
674
675
2.12M
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
2.12M
    _rows_input_counter =
680
2.12M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
2.12M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
2.12M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
2.12M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
2.12M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
2.12M
    _memory_used_counter =
686
2.12M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
2.12M
    _common_profile->add_info_string("IsColocate",
688
2.12M
                                     std::to_string(_parent->is_colocated_operator()));
689
2.12M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
2.12M
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
2.12M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
2.12M
    return Status::OK();
693
2.12M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
153k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
153k
    _operator_profile =
636
153k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
153k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
153k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
153k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
153k
    _operator_profile->add_child(_common_profile, true);
645
153k
    _operator_profile->add_child(_custom_profile, true);
646
647
153k
    _operator_profile->set_metadata(_parent->node_id());
648
153k
    _wait_for_finish_dependency_timer =
649
153k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
153k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
153k
    if constexpr (!is_fake_shared) {
652
153k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
153k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
20.3k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
20.3k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
20.3k
                                                  ? 0
660
20.3k
                                                  : info.task_idx]
661
20.3k
                                  .get();
662
20.3k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
133k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
133k
            _shared_state = info.shared_state->template cast<SharedState>();
668
133k
            _dependency = _shared_state->create_sink_dependency(
669
133k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
133k
        }
671
153k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
153k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
153k
    }
674
675
153k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
153k
    _rows_input_counter =
680
153k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
153k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
153k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
153k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
153k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
153k
    _memory_used_counter =
686
153k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
153k
    _common_profile->add_info_string("IsColocate",
688
153k
                                     std::to_string(_parent->is_colocated_operator()));
689
153k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
153k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
153k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
153k
    return Status::OK();
693
153k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
2
    _operator_profile =
636
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
2
    _operator_profile->add_child(_common_profile, true);
645
2
    _operator_profile->add_child(_custom_profile, true);
646
647
2
    _operator_profile->set_metadata(_parent->node_id());
648
2
    _wait_for_finish_dependency_timer =
649
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
2
    if constexpr (!is_fake_shared) {
652
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
2
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
2
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
2
            _shared_state = info.shared_state->template cast<SharedState>();
668
2
            _dependency = _shared_state->create_sink_dependency(
669
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
2
        }
671
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
2
    }
674
675
2
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
2
    _rows_input_counter =
680
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
2
    _memory_used_counter =
686
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
2
    _common_profile->add_info_string("IsColocate",
688
2
                                     std::to_string(_parent->is_colocated_operator()));
689
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
2
    return Status::OK();
693
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
263k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
263k
    _operator_profile =
636
263k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
263k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
263k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
263k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
263k
    _operator_profile->add_child(_common_profile, true);
645
263k
    _operator_profile->add_child(_custom_profile, true);
646
647
263k
    _operator_profile->set_metadata(_parent->node_id());
648
263k
    _wait_for_finish_dependency_timer =
649
263k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
263k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
263k
    if constexpr (!is_fake_shared) {
652
263k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
263k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
263k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
263k
            _shared_state = info.shared_state->template cast<SharedState>();
668
263k
            _dependency = _shared_state->create_sink_dependency(
669
263k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
263k
        }
671
263k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
263k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
263k
    }
674
675
263k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
263k
    _rows_input_counter =
680
263k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
263k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
263k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
263k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
263k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
263k
    _memory_used_counter =
686
263k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
263k
    _common_profile->add_info_string("IsColocate",
688
263k
                                     std::to_string(_parent->is_colocated_operator()));
689
263k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
263k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
263k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
263k
    return Status::OK();
693
263k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
27
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
27
    _operator_profile =
636
27
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
27
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
27
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
27
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
27
    _operator_profile->add_child(_common_profile, true);
645
27
    _operator_profile->add_child(_custom_profile, true);
646
647
27
    _operator_profile->set_metadata(_parent->node_id());
648
27
    _wait_for_finish_dependency_timer =
649
27
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
27
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
27
    if constexpr (!is_fake_shared) {
652
27
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
27
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
27
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
27
            _shared_state = info.shared_state->template cast<SharedState>();
668
27
            _dependency = _shared_state->create_sink_dependency(
669
27
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
27
        }
671
27
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
27
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
27
    }
674
675
27
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
27
    _rows_input_counter =
680
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
27
    _memory_used_counter =
686
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
27
    _common_profile->add_info_string("IsColocate",
688
27
                                     std::to_string(_parent->is_colocated_operator()));
689
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
27
    return Status::OK();
693
27
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
11.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
11.4k
    _operator_profile =
636
11.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
11.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
11.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
11.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
11.4k
    _operator_profile->add_child(_common_profile, true);
645
11.4k
    _operator_profile->add_child(_custom_profile, true);
646
647
11.4k
    _operator_profile->set_metadata(_parent->node_id());
648
11.4k
    _wait_for_finish_dependency_timer =
649
11.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
11.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
11.4k
    if constexpr (!is_fake_shared) {
652
11.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
11.4k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
11.4k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
11.4k
            _shared_state = info.shared_state->template cast<SharedState>();
668
11.4k
            _dependency = _shared_state->create_sink_dependency(
669
11.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
11.4k
        }
671
11.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
11.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
11.4k
    }
674
675
11.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
11.4k
    _rows_input_counter =
680
11.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
11.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
11.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
11.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
11.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
11.4k
    _memory_used_counter =
686
11.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
11.4k
    _common_profile->add_info_string("IsColocate",
688
11.4k
                                     std::to_string(_parent->is_colocated_operator()));
689
11.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
11.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
11.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
11.4k
    return Status::OK();
693
11.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
8.34k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
8.34k
    _operator_profile =
636
8.34k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
8.34k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
8.34k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
8.34k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
8.34k
    _operator_profile->add_child(_common_profile, true);
645
8.34k
    _operator_profile->add_child(_custom_profile, true);
646
647
8.34k
    _operator_profile->set_metadata(_parent->node_id());
648
8.34k
    _wait_for_finish_dependency_timer =
649
8.34k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
8.34k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
8.34k
    if constexpr (!is_fake_shared) {
652
8.34k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
8.34k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
8.34k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
8.34k
            _shared_state = info.shared_state->template cast<SharedState>();
668
8.34k
            _dependency = _shared_state->create_sink_dependency(
669
8.34k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
8.34k
        }
671
8.34k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
8.34k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
8.34k
    }
674
675
8.34k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
8.34k
    _rows_input_counter =
680
8.34k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
8.34k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
8.34k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
8.34k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
8.34k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
8.34k
    _memory_used_counter =
686
8.34k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
8.34k
    _common_profile->add_info_string("IsColocate",
688
8.34k
                                     std::to_string(_parent->is_colocated_operator()));
689
8.34k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
8.34k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
8.34k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
8.34k
    return Status::OK();
693
8.34k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
138k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
138k
    _operator_profile =
636
138k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
138k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
138k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
138k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
138k
    _operator_profile->add_child(_common_profile, true);
645
138k
    _operator_profile->add_child(_custom_profile, true);
646
647
138k
    _operator_profile->set_metadata(_parent->node_id());
648
138k
    _wait_for_finish_dependency_timer =
649
138k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
138k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
138k
    if constexpr (!is_fake_shared) {
652
138k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
138k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
138k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
138k
            _shared_state = info.shared_state->template cast<SharedState>();
668
138k
            _dependency = _shared_state->create_sink_dependency(
669
138k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
138k
        }
671
138k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
138k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
138k
    }
674
675
138k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
138k
    _rows_input_counter =
680
138k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
138k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
138k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
138k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
138k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
138k
    _memory_used_counter =
686
138k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
138k
    _common_profile->add_info_string("IsColocate",
688
138k
                                     std::to_string(_parent->is_colocated_operator()));
689
138k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
138k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
138k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
138k
    return Status::OK();
693
138k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
264
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
264
    _operator_profile =
636
264
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
264
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
264
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
264
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
264
    _operator_profile->add_child(_common_profile, true);
645
264
    _operator_profile->add_child(_custom_profile, true);
646
647
264
    _operator_profile->set_metadata(_parent->node_id());
648
264
    _wait_for_finish_dependency_timer =
649
264
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
264
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
264
    if constexpr (!is_fake_shared) {
652
264
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
264
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
264
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
264
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
264
                                                  ? 0
660
264
                                                  : info.task_idx]
661
264
                                  .get();
662
264
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
264
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
0
            _shared_state = info.shared_state->template cast<SharedState>();
668
0
            _dependency = _shared_state->create_sink_dependency(
669
0
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
0
        }
671
264
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
264
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
264
    }
674
675
264
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
264
    _rows_input_counter =
680
264
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
264
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
264
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
264
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
264
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
264
    _memory_used_counter =
686
264
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
264
    _common_profile->add_info_string("IsColocate",
688
264
                                     std::to_string(_parent->is_colocated_operator()));
689
264
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
264
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
264
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
264
    return Status::OK();
693
264
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
86
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
86
    _operator_profile =
636
86
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
86
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
86
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
86
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
86
    _operator_profile->add_child(_common_profile, true);
645
86
    _operator_profile->add_child(_custom_profile, true);
646
647
86
    _operator_profile->set_metadata(_parent->node_id());
648
86
    _wait_for_finish_dependency_timer =
649
86
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
86
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
86
    if constexpr (!is_fake_shared) {
652
86
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
86
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
86
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
86
            _shared_state = info.shared_state->template cast<SharedState>();
668
86
            _dependency = _shared_state->create_sink_dependency(
669
86
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
86
        }
671
86
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
86
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
86
    }
674
675
86
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
86
    _rows_input_counter =
680
86
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
86
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
86
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
86
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
86
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
86
    _memory_used_counter =
686
86
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
86
    _common_profile->add_info_string("IsColocate",
688
86
                                     std::to_string(_parent->is_colocated_operator()));
689
86
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
86
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
86
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
86
    return Status::OK();
693
86
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
711k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
711k
    _operator_profile =
636
711k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
711k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
711k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
711k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
711k
    _operator_profile->add_child(_common_profile, true);
645
711k
    _operator_profile->add_child(_custom_profile, true);
646
647
711k
    _operator_profile->set_metadata(_parent->node_id());
648
711k
    _wait_for_finish_dependency_timer =
649
711k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
711k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
    if constexpr (!is_fake_shared) {
652
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
                                                  ? 0
660
                                                  : info.task_idx]
661
                                  .get();
662
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
            _shared_state = info.shared_state->template cast<SharedState>();
668
            _dependency = _shared_state->create_sink_dependency(
669
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
        }
671
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
    }
674
675
711k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
711k
    _rows_input_counter =
680
711k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
711k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
711k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
711k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
711k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
711k
    _memory_used_counter =
686
711k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
711k
    _common_profile->add_info_string("IsColocate",
688
711k
                                     std::to_string(_parent->is_colocated_operator()));
689
711k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
711k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
711k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
711k
    return Status::OK();
693
711k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
9.75k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
9.75k
    _operator_profile =
636
9.75k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
9.75k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
9.75k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
9.75k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
9.75k
    _operator_profile->add_child(_common_profile, true);
645
9.75k
    _operator_profile->add_child(_custom_profile, true);
646
647
9.75k
    _operator_profile->set_metadata(_parent->node_id());
648
9.75k
    _wait_for_finish_dependency_timer =
649
9.75k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
9.75k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
9.75k
    if constexpr (!is_fake_shared) {
652
9.75k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
9.75k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
9.75k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
9.75k
            _shared_state = info.shared_state->template cast<SharedState>();
668
9.75k
            _dependency = _shared_state->create_sink_dependency(
669
9.75k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
9.75k
        }
671
9.75k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
9.75k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
9.75k
    }
674
675
9.75k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
9.75k
    _rows_input_counter =
680
9.75k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
9.75k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
9.75k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
9.75k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
9.75k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
9.75k
    _memory_used_counter =
686
9.75k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
9.75k
    _common_profile->add_info_string("IsColocate",
688
9.75k
                                     std::to_string(_parent->is_colocated_operator()));
689
9.75k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
9.75k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
9.75k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
9.75k
    return Status::OK();
693
9.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
400
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
400
    _operator_profile =
636
400
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
400
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
400
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
400
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
400
    _operator_profile->add_child(_common_profile, true);
645
400
    _operator_profile->add_child(_custom_profile, true);
646
647
400
    _operator_profile->set_metadata(_parent->node_id());
648
400
    _wait_for_finish_dependency_timer =
649
400
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
400
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
400
    if constexpr (!is_fake_shared) {
652
400
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
400
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
400
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
400
            _shared_state = info.shared_state->template cast<SharedState>();
668
400
            _dependency = _shared_state->create_sink_dependency(
669
400
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
400
        }
671
400
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
400
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
400
    }
674
675
400
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
400
    _rows_input_counter =
680
400
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
400
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
400
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
400
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
400
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
400
    _memory_used_counter =
686
400
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
400
    _common_profile->add_info_string("IsColocate",
688
400
                                     std::to_string(_parent->is_colocated_operator()));
689
400
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
400
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
400
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
400
    return Status::OK();
693
400
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
3.88k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
3.88k
    _operator_profile =
636
3.88k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
3.88k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
3.88k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
3.88k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
3.88k
    _operator_profile->add_child(_common_profile, true);
645
3.88k
    _operator_profile->add_child(_custom_profile, true);
646
647
3.88k
    _operator_profile->set_metadata(_parent->node_id());
648
3.88k
    _wait_for_finish_dependency_timer =
649
3.88k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
3.88k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
3.88k
    if constexpr (!is_fake_shared) {
652
3.88k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
3.88k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
3.88k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
3.88k
            _shared_state = info.shared_state->template cast<SharedState>();
668
3.88k
            _dependency = _shared_state->create_sink_dependency(
669
3.88k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
3.88k
        }
671
3.88k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
3.88k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
3.88k
    }
674
675
3.88k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
3.88k
    _rows_input_counter =
680
3.88k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
3.88k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
3.88k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
3.88k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
3.88k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
3.88k
    _memory_used_counter =
686
3.88k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
3.88k
    _common_profile->add_info_string("IsColocate",
688
3.88k
                                     std::to_string(_parent->is_colocated_operator()));
689
3.88k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
3.88k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
3.88k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
3.88k
    return Status::OK();
693
3.88k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
12.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
12.5k
    _operator_profile =
636
12.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
12.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
12.5k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
12.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
12.5k
    _operator_profile->add_child(_common_profile, true);
645
12.5k
    _operator_profile->add_child(_custom_profile, true);
646
647
12.5k
    _operator_profile->set_metadata(_parent->node_id());
648
12.5k
    _wait_for_finish_dependency_timer =
649
12.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
12.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
12.5k
    if constexpr (!is_fake_shared) {
652
12.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
12.5k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
12.5k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
12.5k
            _shared_state = info.shared_state->template cast<SharedState>();
668
12.5k
            _dependency = _shared_state->create_sink_dependency(
669
12.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
12.5k
        }
671
12.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
12.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
12.5k
    }
674
675
12.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
12.5k
    _rows_input_counter =
680
12.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
12.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
12.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
12.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
12.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
12.5k
    _memory_used_counter =
686
12.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
12.5k
    _common_profile->add_info_string("IsColocate",
688
12.5k
                                     std::to_string(_parent->is_colocated_operator()));
689
12.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
12.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
12.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
12.5k
    return Status::OK();
693
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
283k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
283k
    _operator_profile =
636
283k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
283k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
283k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
283k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
283k
    _operator_profile->add_child(_common_profile, true);
645
283k
    _operator_profile->add_child(_custom_profile, true);
646
647
283k
    _operator_profile->set_metadata(_parent->node_id());
648
283k
    _wait_for_finish_dependency_timer =
649
283k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
283k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
283k
    if constexpr (!is_fake_shared) {
652
283k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
283k
            info.shared_state_map.end()) {
654
282k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
282k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
282k
            }
657
282k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
282k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
282k
                                                  ? 0
660
282k
                                                  : info.task_idx]
661
282k
                                  .get();
662
282k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
282k
        } else {
664
454
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
454
                DCHECK(false);
666
454
            }
667
454
            _shared_state = info.shared_state->template cast<SharedState>();
668
454
            _dependency = _shared_state->create_sink_dependency(
669
454
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
454
        }
671
283k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
283k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
283k
    }
674
675
283k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
283k
    _rows_input_counter =
680
283k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
283k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
283k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
283k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
283k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
283k
    _memory_used_counter =
686
283k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
283k
    _common_profile->add_info_string("IsColocate",
688
283k
                                     std::to_string(_parent->is_colocated_operator()));
689
283k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
283k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
283k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
283k
    return Status::OK();
693
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
530k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
530k
    _operator_profile =
636
530k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
530k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
530k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
530k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
530k
    _operator_profile->add_child(_common_profile, true);
645
530k
    _operator_profile->add_child(_custom_profile, true);
646
647
530k
    _operator_profile->set_metadata(_parent->node_id());
648
530k
    _wait_for_finish_dependency_timer =
649
530k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
530k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
530k
    if constexpr (!is_fake_shared) {
652
530k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
530k
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
530k
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
530k
            _shared_state = info.shared_state->template cast<SharedState>();
668
530k
            _dependency = _shared_state->create_sink_dependency(
669
530k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
530k
        }
671
530k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
530k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
530k
    }
674
675
530k
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
530k
    _rows_input_counter =
680
530k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
530k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
530k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
530k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
530k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
530k
    _memory_used_counter =
686
530k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
530k
    _common_profile->add_info_string("IsColocate",
688
530k
                                     std::to_string(_parent->is_colocated_operator()));
689
530k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
530k
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
530k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
530k
    return Status::OK();
693
530k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
17
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
17
    _operator_profile =
636
17
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
17
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
17
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
17
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
17
    _operator_profile->add_child(_common_profile, true);
645
17
    _operator_profile->add_child(_custom_profile, true);
646
647
17
    _operator_profile->set_metadata(_parent->node_id());
648
17
    _wait_for_finish_dependency_timer =
649
17
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
17
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
17
    if constexpr (!is_fake_shared) {
652
17
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
17
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
17
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
17
            _shared_state = info.shared_state->template cast<SharedState>();
668
17
            _dependency = _shared_state->create_sink_dependency(
669
17
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
17
        }
671
17
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
17
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
17
    }
674
675
17
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
17
    _rows_input_counter =
680
17
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
17
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
17
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
17
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
17
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
17
    _memory_used_counter =
686
17
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
17
    _common_profile->add_info_string("IsColocate",
688
17
                                     std::to_string(_parent->is_colocated_operator()));
689
17
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
17
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
17
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
17
    return Status::OK();
693
17
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
633
302
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
634
    // create profile
635
302
    _operator_profile =
636
302
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
637
302
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
638
302
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
639
640
    // indentation is true
641
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
642
    // So we should set the indentation to true.
643
302
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
644
302
    _operator_profile->add_child(_common_profile, true);
645
302
    _operator_profile->add_child(_custom_profile, true);
646
647
302
    _operator_profile->set_metadata(_parent->node_id());
648
302
    _wait_for_finish_dependency_timer =
649
302
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
650
302
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
651
302
    if constexpr (!is_fake_shared) {
652
302
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
653
302
            info.shared_state_map.end()) {
654
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
655
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
656
            }
657
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
658
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
659
0
                                                  ? 0
660
0
                                                  : info.task_idx]
661
0
                                  .get();
662
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
663
302
        } else {
664
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
665
                DCHECK(false);
666
            }
667
302
            _shared_state = info.shared_state->template cast<SharedState>();
668
302
            _dependency = _shared_state->create_sink_dependency(
669
302
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
670
302
        }
671
302
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
672
302
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
673
302
    }
674
675
302
    if (must_set_shared_state() && _shared_state == nullptr) {
676
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
677
0
    }
678
679
302
    _rows_input_counter =
680
302
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
681
302
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
682
302
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
683
302
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
684
302
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
685
302
    _memory_used_counter =
686
302
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
687
302
    _common_profile->add_info_string("IsColocate",
688
302
                                     std::to_string(_parent->is_colocated_operator()));
689
302
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
690
302
    _common_profile->add_info_string("FollowedByShuffledOperator",
691
302
                                     std::to_string(_parent->followed_by_shuffled_operator()));
692
302
    return Status::OK();
693
302
}
694
695
template <typename SharedState>
696
2.12M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
2.12M
    if (_closed) {
698
2
        return Status::OK();
699
2
    }
700
2.12M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
1.41M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
1.41M
    }
703
2.12M
    _closed = true;
704
2.12M
    return Status::OK();
705
2.12M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
153k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
153k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
153k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
153k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
153k
    }
703
153k
    _closed = true;
704
153k
    return Status::OK();
705
153k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
1
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
1
    }
703
1
    _closed = true;
704
1
    return Status::OK();
705
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
263k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
263k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
263k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
263k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
263k
    }
703
263k
    _closed = true;
704
263k
    return Status::OK();
705
263k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
19
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
19
    if (_closed) {
698
2
        return Status::OK();
699
2
    }
700
17
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
17
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
17
    }
703
17
    _closed = true;
704
17
    return Status::OK();
705
19
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
11.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
11.3k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
11.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
11.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
11.3k
    }
703
11.3k
    _closed = true;
704
11.3k
    return Status::OK();
705
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
8.30k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
8.30k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
8.30k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
8.30k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
8.30k
    }
703
8.30k
    _closed = true;
704
8.30k
    return Status::OK();
705
8.30k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
138k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
138k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
138k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
138k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
138k
    }
703
138k
    _closed = true;
704
138k
    return Status::OK();
705
138k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
262
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
262
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
262
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
262
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
262
    }
703
262
    _closed = true;
704
262
    return Status::OK();
705
262
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
75
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
75
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
75
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
75
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
75
    }
703
75
    _closed = true;
704
75
    return Status::OK();
705
75
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
710k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
710k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
    }
703
710k
    _closed = true;
704
710k
    return Status::OK();
705
710k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
9.76k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
9.76k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
9.76k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
9.76k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
9.76k
    }
703
9.76k
    _closed = true;
704
9.76k
    return Status::OK();
705
9.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
297
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
297
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
297
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
297
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
297
    }
703
297
    _closed = true;
704
297
    return Status::OK();
705
297
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
3.89k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
3.89k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
3.89k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
3.89k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
3.89k
    }
703
3.89k
    _closed = true;
704
3.89k
    return Status::OK();
705
3.89k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
12.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
12.5k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
12.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
12.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
12.5k
    }
703
12.5k
    _closed = true;
704
12.5k
    return Status::OK();
705
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
283k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
283k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
283k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
283k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
283k
    }
703
283k
    _closed = true;
704
283k
    return Status::OK();
705
283k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
532k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
532k
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
532k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
532k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
532k
    }
703
532k
    _closed = true;
704
532k
    return Status::OK();
705
532k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
14
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
14
    }
703
14
    _closed = true;
704
14
    return Status::OK();
705
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
696
302
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
697
302
    if (_closed) {
698
0
        return Status::OK();
699
0
    }
700
302
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
701
302
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
702
302
    }
703
302
    _closed = true;
704
302
    return Status::OK();
705
302
}
706
707
template <typename LocalStateType>
708
6.74k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
709
6.74k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
710
6.74k
    return pull(state, block, eos);
711
6.74k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
708
432
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
709
432
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
710
432
    return pull(state, block, eos);
711
432
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
708
6.31k
Status StreamingOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
709
6.31k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
710
6.31k
    return pull(state, block, eos);
711
6.31k
}
712
713
template <typename LocalStateType>
714
829k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
829k
    auto& local_state = get_local_state(state);
716
829k
    if (need_more_input_data(state)) {
717
780k
        local_state._child_block->clear_column_data(
718
780k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
780k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
780k
                state, local_state._child_block.get(), &local_state._child_eos));
721
780k
        *eos = local_state._child_eos;
722
780k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
63.7k
            return Status::OK();
724
63.7k
        }
725
716k
        {
726
716k
            SCOPED_TIMER(local_state.exec_time_counter());
727
716k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
716k
        }
729
716k
    }
730
731
765k
    if (!need_more_input_data(state)) {
732
711k
        SCOPED_TIMER(local_state.exec_time_counter());
733
711k
        bool new_eos = false;
734
711k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
711k
        if (new_eos) {
736
629k
            *eos = true;
737
629k
        } else if (!need_more_input_data(state)) {
738
22.9k
            *eos = false;
739
22.9k
        }
740
711k
    }
741
765k
    return Status::OK();
742
765k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
168k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
168k
    auto& local_state = get_local_state(state);
716
168k
    if (need_more_input_data(state)) {
717
132k
        local_state._child_block->clear_column_data(
718
132k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
132k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
132k
                state, local_state._child_block.get(), &local_state._child_eos));
721
132k
        *eos = local_state._child_eos;
722
132k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
33.1k
            return Status::OK();
724
33.1k
        }
725
99.4k
        {
726
99.4k
            SCOPED_TIMER(local_state.exec_time_counter());
727
99.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
99.4k
        }
729
99.4k
    }
730
731
135k
    if (!need_more_input_data(state)) {
732
135k
        SCOPED_TIMER(local_state.exec_time_counter());
733
135k
        bool new_eos = false;
734
135k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
135k
        if (new_eos) {
736
81.2k
            *eos = true;
737
81.2k
        } else if (!need_more_input_data(state)) {
738
9.13k
            *eos = false;
739
9.13k
        }
740
135k
    }
741
135k
    return Status::OK();
742
135k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
3.31k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
3.31k
    auto& local_state = get_local_state(state);
716
3.31k
    if (need_more_input_data(state)) {
717
1.95k
        local_state._child_block->clear_column_data(
718
1.95k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
1.95k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
1.95k
                state, local_state._child_block.get(), &local_state._child_eos));
721
1.95k
        *eos = local_state._child_eos;
722
1.95k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
421
            return Status::OK();
724
421
        }
725
1.53k
        {
726
1.53k
            SCOPED_TIMER(local_state.exec_time_counter());
727
1.53k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
1.53k
        }
729
1.53k
    }
730
731
2.89k
    if (!need_more_input_data(state)) {
732
2.89k
        SCOPED_TIMER(local_state.exec_time_counter());
733
2.89k
        bool new_eos = false;
734
2.89k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
2.89k
        if (new_eos) {
736
1.24k
            *eos = true;
737
1.65k
        } else if (!need_more_input_data(state)) {
738
1.35k
            *eos = false;
739
1.35k
        }
740
2.89k
    }
741
2.89k
    return Status::OK();
742
2.89k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
4.47k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
4.47k
    auto& local_state = get_local_state(state);
716
4.47k
    if (need_more_input_data(state)) {
717
4.47k
        local_state._child_block->clear_column_data(
718
4.47k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
4.47k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
4.47k
                state, local_state._child_block.get(), &local_state._child_eos));
721
4.47k
        *eos = local_state._child_eos;
722
4.47k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
1.58k
            return Status::OK();
724
1.58k
        }
725
2.89k
        {
726
2.89k
            SCOPED_TIMER(local_state.exec_time_counter());
727
2.89k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
2.89k
        }
729
2.89k
    }
730
731
2.89k
    if (!need_more_input_data(state)) {
732
2.89k
        SCOPED_TIMER(local_state.exec_time_counter());
733
2.89k
        bool new_eos = false;
734
2.89k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
2.89k
        if (new_eos) {
736
1.60k
            *eos = true;
737
1.60k
        } else if (!need_more_input_data(state)) {
738
0
            *eos = false;
739
0
        }
740
2.89k
    }
741
2.89k
    return Status::OK();
742
2.89k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
32.1k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
32.1k
    auto& local_state = get_local_state(state);
716
32.1k
    if (need_more_input_data(state)) {
717
32.1k
        local_state._child_block->clear_column_data(
718
32.1k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
32.1k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
32.1k
                state, local_state._child_block.get(), &local_state._child_eos));
721
32.1k
        *eos = local_state._child_eos;
722
32.1k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
4.69k
            return Status::OK();
724
4.69k
        }
725
27.4k
        {
726
27.4k
            SCOPED_TIMER(local_state.exec_time_counter());
727
27.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
27.4k
        }
729
27.4k
    }
730
731
27.4k
    if (!need_more_input_data(state)) {
732
12.0k
        SCOPED_TIMER(local_state.exec_time_counter());
733
12.0k
        bool new_eos = false;
734
12.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
12.0k
        if (new_eos) {
736
11.9k
            *eos = true;
737
11.9k
        } else if (!need_more_input_data(state)) {
738
10
            *eos = false;
739
10
        }
740
12.0k
    }
741
27.4k
    return Status::OK();
742
27.4k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
577k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
577k
    auto& local_state = get_local_state(state);
716
578k
    if (need_more_input_data(state)) {
717
578k
        local_state._child_block->clear_column_data(
718
578k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
578k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
578k
                state, local_state._child_block.get(), &local_state._child_eos));
721
578k
        *eos = local_state._child_eos;
722
578k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
20.0k
            return Status::OK();
724
20.0k
        }
725
558k
        {
726
558k
            SCOPED_TIMER(local_state.exec_time_counter());
727
558k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
558k
        }
729
558k
    }
730
731
557k
    if (!need_more_input_data(state)) {
732
519k
        SCOPED_TIMER(local_state.exec_time_counter());
733
519k
        bool new_eos = false;
734
519k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
519k
        if (new_eos) {
736
518k
            *eos = true;
737
518k
        } else if (!need_more_input_data(state)) {
738
0
            *eos = false;
739
0
        }
740
519k
    }
741
557k
    return Status::OK();
742
557k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
36.7k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
36.7k
    auto& local_state = get_local_state(state);
716
36.7k
    if (need_more_input_data(state)) {
717
24.6k
        local_state._child_block->clear_column_data(
718
24.6k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
24.6k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
24.6k
                state, local_state._child_block.get(), &local_state._child_eos));
721
24.6k
        *eos = local_state._child_eos;
722
24.6k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
3.07k
            return Status::OK();
724
3.07k
        }
725
21.5k
        {
726
21.5k
            SCOPED_TIMER(local_state.exec_time_counter());
727
21.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
21.5k
        }
729
21.5k
    }
730
731
33.6k
    if (!need_more_input_data(state)) {
732
32.4k
        SCOPED_TIMER(local_state.exec_time_counter());
733
32.4k
        bool new_eos = false;
734
32.4k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
32.4k
        if (new_eos) {
736
11.4k
            *eos = true;
737
21.0k
        } else if (!need_more_input_data(state)) {
738
12.0k
            *eos = false;
739
12.0k
        }
740
32.4k
    }
741
33.6k
    return Status::OK();
742
33.6k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE9get_blockEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
714
6.95k
Status StatefulOperatorX<LocalStateType>::get_block(RuntimeState* state, Block* block, bool* eos) {
715
6.95k
    auto& local_state = get_local_state(state);
716
6.95k
    if (need_more_input_data(state)) {
717
6.59k
        local_state._child_block->clear_column_data(
718
6.59k
                OperatorX<LocalStateType>::_child->row_desc().num_materialized_slots());
719
6.59k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
720
6.59k
                state, local_state._child_block.get(), &local_state._child_eos));
721
6.59k
        *eos = local_state._child_eos;
722
6.59k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
723
690
            return Status::OK();
724
690
        }
725
5.90k
        {
726
5.90k
            SCOPED_TIMER(local_state.exec_time_counter());
727
5.90k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
728
5.90k
        }
729
5.90k
    }
730
731
6.26k
    if (!need_more_input_data(state)) {
732
6.26k
        SCOPED_TIMER(local_state.exec_time_counter());
733
6.26k
        bool new_eos = false;
734
6.26k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
735
6.26k
        if (new_eos) {
736
4.23k
            *eos = true;
737
4.23k
        } else if (!need_more_input_data(state)) {
738
366
            *eos = false;
739
366
        }
740
6.26k
    }
741
6.25k
    return Status::OK();
742
6.25k
}
743
744
template <typename Writer, typename Parent>
745
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
746
69.9k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
69.9k
    RETURN_IF_ERROR(Base::init(state, info));
748
69.9k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
69.9k
                                                         "AsyncWriterDependency", true);
750
69.9k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
69.9k
                             _finish_dependency));
752
753
69.9k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
69.9k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
69.9k
    return Status::OK();
756
69.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
540
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
540
    RETURN_IF_ERROR(Base::init(state, info));
748
540
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
540
                                                         "AsyncWriterDependency", true);
750
540
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
540
                             _finish_dependency));
752
753
540
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
540
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
540
    return Status::OK();
756
540
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
88
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
88
    RETURN_IF_ERROR(Base::init(state, info));
748
88
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
88
                                                         "AsyncWriterDependency", true);
750
88
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
88
                             _finish_dependency));
752
753
88
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
88
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
88
    return Status::OK();
756
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
54.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
54.1k
    RETURN_IF_ERROR(Base::init(state, info));
748
54.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
54.1k
                                                         "AsyncWriterDependency", true);
750
54.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
54.1k
                             _finish_dependency));
752
753
54.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
54.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
54.1k
    return Status::OK();
756
54.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
5.65k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
5.65k
    RETURN_IF_ERROR(Base::init(state, info));
748
5.65k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
5.65k
                                                         "AsyncWriterDependency", true);
750
5.65k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
5.65k
                             _finish_dependency));
752
753
5.65k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
5.65k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
5.65k
    return Status::OK();
756
5.65k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
5.14k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
5.14k
    RETURN_IF_ERROR(Base::init(state, info));
748
5.14k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
5.14k
                                                         "AsyncWriterDependency", true);
750
5.14k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
5.14k
                             _finish_dependency));
752
753
5.14k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
5.14k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
5.14k
    return Status::OK();
756
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
3.38k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
3.38k
    RETURN_IF_ERROR(Base::init(state, info));
748
3.38k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
3.38k
                                                         "AsyncWriterDependency", true);
750
3.38k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
3.38k
                             _finish_dependency));
752
753
3.38k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
3.38k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
3.38k
    return Status::OK();
756
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
160
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
160
    RETURN_IF_ERROR(Base::init(state, info));
748
160
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
160
                                                         "AsyncWriterDependency", true);
750
160
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
160
                             _finish_dependency));
752
753
160
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
160
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
160
    return Status::OK();
756
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
640
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
640
    RETURN_IF_ERROR(Base::init(state, info));
748
640
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
640
                                                         "AsyncWriterDependency", true);
750
640
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
640
                             _finish_dependency));
752
753
640
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
640
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
640
    return Status::OK();
756
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
746
156
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
747
156
    RETURN_IF_ERROR(Base::init(state, info));
748
156
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
749
156
                                                         "AsyncWriterDependency", true);
750
156
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
751
156
                             _finish_dependency));
752
753
156
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
754
156
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
755
156
    return Status::OK();
756
156
}
757
758
template <typename Writer, typename Parent>
759
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
760
70.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
70.1k
    RETURN_IF_ERROR(Base::open(state));
762
70.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
620k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
550k
        RETURN_IF_ERROR(
765
550k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
550k
    }
767
70.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
70.1k
    return Status::OK();
769
70.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
542
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
542
    RETURN_IF_ERROR(Base::open(state));
762
542
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
2.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
2.31k
        RETURN_IF_ERROR(
765
2.31k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
2.31k
    }
767
542
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
542
    return Status::OK();
769
542
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
88
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
88
    RETURN_IF_ERROR(Base::open(state));
762
88
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
412
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
324
        RETURN_IF_ERROR(
765
324
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
324
    }
767
88
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
88
    return Status::OK();
769
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
54.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
54.3k
    RETURN_IF_ERROR(Base::open(state));
762
54.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
394k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
339k
        RETURN_IF_ERROR(
765
339k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
339k
    }
767
54.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
54.3k
    return Status::OK();
769
54.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
5.64k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
5.64k
    RETURN_IF_ERROR(Base::open(state));
762
5.64k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
39.4k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
33.7k
        RETURN_IF_ERROR(
765
33.7k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
33.7k
    }
767
5.64k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
5.64k
    return Status::OK();
769
5.64k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
5.14k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
5.14k
    RETURN_IF_ERROR(Base::open(state));
762
5.14k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
136k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
131k
        RETURN_IF_ERROR(
765
131k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
131k
    }
767
5.14k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
5.14k
    return Status::OK();
769
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
3.38k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
3.38k
    RETURN_IF_ERROR(Base::open(state));
762
3.38k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
41.5k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
38.1k
        RETURN_IF_ERROR(
765
38.1k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
38.1k
    }
767
3.38k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
3.38k
    return Status::OK();
769
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
160
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
160
    RETURN_IF_ERROR(Base::open(state));
762
160
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
480
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
320
        RETURN_IF_ERROR(
765
320
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
320
    }
767
160
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
160
    return Status::OK();
769
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
640
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
640
    RETURN_IF_ERROR(Base::open(state));
762
640
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
4.38k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
3.74k
        RETURN_IF_ERROR(
765
3.74k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
3.74k
    }
767
640
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
640
    return Status::OK();
769
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
760
156
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
761
156
    RETURN_IF_ERROR(Base::open(state));
762
156
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
763
786
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
764
630
        RETURN_IF_ERROR(
765
630
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
766
630
    }
767
156
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
768
156
    return Status::OK();
769
156
}
770
771
template <typename Writer, typename Parent>
772
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
773
90.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
90.3k
    return _writer->sink(block, eos);
775
90.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
2.37k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
2.37k
    return _writer->sink(block, eos);
775
2.37k
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
112
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
112
    return _writer->sink(block, eos);
775
112
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
67.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
67.1k
    return _writer->sink(block, eos);
775
67.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
6.62k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
6.62k
    return _writer->sink(block, eos);
775
6.62k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
7.49k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
7.49k
    return _writer->sink(block, eos);
775
7.49k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
5.35k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
5.35k
    return _writer->sink(block, eos);
775
5.35k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
180
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
180
    return _writer->sink(block, eos);
775
180
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
800
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
800
    return _writer->sink(block, eos);
775
800
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
773
306
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
774
306
    return _writer->sink(block, eos);
775
306
}
776
777
template <typename Writer, typename Parent>
778
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
779
70.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
70.2k
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
70.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
70.2k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
70.2k
    if (_writer) {
787
70.2k
        Status st = _writer->get_writer_status();
788
70.2k
        if (exec_status.ok()) {
789
70.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
70.0k
                                                       : Status::Cancelled("force close"));
791
70.0k
        } else {
792
163
            _writer->force_close(exec_status);
793
163
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
70.2k
        RETURN_IF_ERROR(st);
798
70.2k
    }
799
70.1k
    return Base::close(state, exec_status);
800
70.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
530
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
530
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
530
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
530
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
530
    if (_writer) {
787
530
        Status st = _writer->get_writer_status();
788
530
        if (exec_status.ok()) {
789
530
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
530
                                                       : Status::Cancelled("force close"));
791
530
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
530
        RETURN_IF_ERROR(st);
798
530
    }
799
530
    return Base::close(state, exec_status);
800
530
}
_ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
88
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
88
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
88
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
88
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
88
    if (_writer) {
787
88
        Status st = _writer->get_writer_status();
788
88
        if (exec_status.ok()) {
789
88
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
88
                                                       : Status::Cancelled("force close"));
791
88
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
88
        RETURN_IF_ERROR(st);
798
88
    }
799
80
    return Base::close(state, exec_status);
800
88
}
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
54.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
54.4k
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
54.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
54.4k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
54.4k
    if (_writer) {
787
54.4k
        Status st = _writer->get_writer_status();
788
54.4k
        if (exec_status.ok()) {
789
54.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
54.3k
                                                       : Status::Cancelled("force close"));
791
54.3k
        } else {
792
87
            _writer->force_close(exec_status);
793
87
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
54.4k
        RETURN_IF_ERROR(st);
798
54.4k
    }
799
54.4k
    return Base::close(state, exec_status);
800
54.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
5.64k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
5.64k
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
5.64k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
5.64k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
5.64k
    if (_writer) {
787
5.64k
        Status st = _writer->get_writer_status();
788
5.64k
        if (exec_status.ok()) {
789
5.56k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
5.56k
                                                       : Status::Cancelled("force close"));
791
5.56k
        } else {
792
82
            _writer->force_close(exec_status);
793
82
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
5.64k
        RETURN_IF_ERROR(st);
798
5.64k
    }
799
5.64k
    return Base::close(state, exec_status);
800
5.64k
}
_ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
5.14k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
5.14k
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
5.14k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
5.14k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
5.14k
    if (_writer) {
787
5.14k
        Status st = _writer->get_writer_status();
788
5.14k
        if (exec_status.ok()) {
789
5.14k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
5.14k
                                                       : Status::Cancelled("force close"));
791
18.4E
        } else {
792
18.4E
            _writer->force_close(exec_status);
793
18.4E
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
5.14k
        RETURN_IF_ERROR(st);
798
5.14k
    }
799
5.14k
    return Base::close(state, exec_status);
800
5.14k
}
_ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
3.38k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
3.38k
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
3.38k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
3.38k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
3.38k
    if (_writer) {
787
3.38k
        Status st = _writer->get_writer_status();
788
3.38k
        if (exec_status.ok()) {
789
3.38k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
3.38k
                                                       : Status::Cancelled("force close"));
791
3.38k
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
3.38k
        RETURN_IF_ERROR(st);
798
3.38k
    }
799
3.38k
    return Base::close(state, exec_status);
800
3.38k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
160
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
160
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
160
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
160
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
160
    if (_writer) {
787
160
        Status st = _writer->get_writer_status();
788
160
        if (exec_status.ok()) {
789
160
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
160
                                                       : Status::Cancelled("force close"));
791
160
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
160
        RETURN_IF_ERROR(st);
798
160
    }
799
160
    return Base::close(state, exec_status);
800
160
}
_ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
640
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
640
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
640
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
640
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
640
    if (_writer) {
787
640
        Status st = _writer->get_writer_status();
788
640
        if (exec_status.ok()) {
789
640
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
640
                                                       : Status::Cancelled("force close"));
791
640
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
640
        RETURN_IF_ERROR(st);
798
640
    }
799
640
    return Base::close(state, exec_status);
800
640
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
779
156
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
780
156
    if (_closed) {
781
0
        return Status::OK();
782
0
    }
783
156
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
784
156
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
785
    // if the init failed, the _writer may be nullptr. so here need check
786
156
    if (_writer) {
787
156
        Status st = _writer->get_writer_status();
788
156
        if (exec_status.ok()) {
789
156
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
790
156
                                                       : Status::Cancelled("force close"));
791
156
        } else {
792
0
            _writer->force_close(exec_status);
793
0
        }
794
        // If there is an error in process_block thread, then we should get the writer
795
        // status before call force_close. For example, the thread may failed in commit
796
        // transaction.
797
156
        RETURN_IF_ERROR(st);
798
156
    }
799
156
    return Base::close(state, exec_status);
800
156
}
801
802
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
803
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
804
DECLARE_OPERATOR(ResultSinkLocalState)
805
DECLARE_OPERATOR(JdbcTableSinkLocalState)
806
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
807
DECLARE_OPERATOR(ResultFileSinkLocalState)
808
DECLARE_OPERATOR(OlapTableSinkLocalState)
809
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
810
DECLARE_OPERATOR(HiveTableSinkLocalState)
811
DECLARE_OPERATOR(TVFTableSinkLocalState)
812
DECLARE_OPERATOR(IcebergTableSinkLocalState)
813
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
814
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
815
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
816
DECLARE_OPERATOR(MCTableSinkLocalState)
817
DECLARE_OPERATOR(AnalyticSinkLocalState)
818
DECLARE_OPERATOR(BlackholeSinkLocalState)
819
DECLARE_OPERATOR(SortSinkLocalState)
820
DECLARE_OPERATOR(SpillSortSinkLocalState)
821
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
822
DECLARE_OPERATOR(AggSinkLocalState)
823
DECLARE_OPERATOR(BucketedAggSinkLocalState)
824
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
825
DECLARE_OPERATOR(ExchangeSinkLocalState)
826
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
827
DECLARE_OPERATOR(UnionSinkLocalState)
828
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
829
DECLARE_OPERATOR(PartitionSortSinkLocalState)
830
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
831
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
832
DECLARE_OPERATOR(SetSinkLocalState<true>)
833
DECLARE_OPERATOR(SetSinkLocalState<false>)
834
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
835
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
836
DECLARE_OPERATOR(CacheSinkLocalState)
837
DECLARE_OPERATOR(DictSinkLocalState)
838
DECLARE_OPERATOR(RecCTESinkLocalState)
839
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
840
841
#undef DECLARE_OPERATOR
842
843
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
844
DECLARE_OPERATOR(HashJoinProbeLocalState)
845
DECLARE_OPERATOR(OlapScanLocalState)
846
DECLARE_OPERATOR(GroupCommitLocalState)
847
DECLARE_OPERATOR(JDBCScanLocalState)
848
DECLARE_OPERATOR(FileScanLocalState)
849
DECLARE_OPERATOR(AnalyticLocalState)
850
DECLARE_OPERATOR(SortLocalState)
851
DECLARE_OPERATOR(SpillSortLocalState)
852
DECLARE_OPERATOR(LocalMergeSortLocalState)
853
DECLARE_OPERATOR(AggLocalState)
854
DECLARE_OPERATOR(BucketedAggLocalState)
855
DECLARE_OPERATOR(PartitionedAggLocalState)
856
DECLARE_OPERATOR(TableFunctionLocalState)
857
DECLARE_OPERATOR(ExchangeLocalState)
858
DECLARE_OPERATOR(RepeatLocalState)
859
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
860
DECLARE_OPERATOR(AssertNumRowsLocalState)
861
DECLARE_OPERATOR(EmptySetLocalState)
862
DECLARE_OPERATOR(UnionSourceLocalState)
863
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
864
DECLARE_OPERATOR(PartitionSortSourceLocalState)
865
DECLARE_OPERATOR(SetSourceLocalState<true>)
866
DECLARE_OPERATOR(SetSourceLocalState<false>)
867
DECLARE_OPERATOR(DataGenLocalState)
868
DECLARE_OPERATOR(SchemaScanLocalState)
869
DECLARE_OPERATOR(MetaScanLocalState)
870
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
871
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
872
DECLARE_OPERATOR(CacheSourceLocalState)
873
DECLARE_OPERATOR(RecCTESourceLocalState)
874
DECLARE_OPERATOR(RecCTEScanLocalState)
875
876
#ifdef BE_TEST
877
DECLARE_OPERATOR(MockLocalState)
878
DECLARE_OPERATOR(MockScanLocalState)
879
#endif
880
#undef DECLARE_OPERATOR
881
882
template class StreamingOperatorX<AssertNumRowsLocalState>;
883
template class StreamingOperatorX<SelectLocalState>;
884
885
template class StatefulOperatorX<HashJoinProbeLocalState>;
886
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
887
template class StatefulOperatorX<RepeatLocalState>;
888
template class StatefulOperatorX<MaterializationLocalState>;
889
template class StatefulOperatorX<StreamingAggLocalState>;
890
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
891
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
892
template class StatefulOperatorX<TableFunctionLocalState>;
893
894
template class PipelineXSinkLocalState<HashJoinSharedState>;
895
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
896
template class PipelineXSinkLocalState<SortSharedState>;
897
template class PipelineXSinkLocalState<SpillSortSharedState>;
898
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
899
template class PipelineXSinkLocalState<AnalyticSharedState>;
900
template class PipelineXSinkLocalState<AggSharedState>;
901
template class PipelineXSinkLocalState<BucketedAggSharedState>;
902
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
903
template class PipelineXSinkLocalState<FakeSharedState>;
904
template class PipelineXSinkLocalState<UnionSharedState>;
905
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
906
template class PipelineXSinkLocalState<MultiCastSharedState>;
907
template class PipelineXSinkLocalState<SetSharedState>;
908
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
909
template class PipelineXSinkLocalState<BasicSharedState>;
910
template class PipelineXSinkLocalState<DataQueueSharedState>;
911
template class PipelineXSinkLocalState<RecCTESharedState>;
912
913
template class PipelineXLocalState<HashJoinSharedState>;
914
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
915
template class PipelineXLocalState<SortSharedState>;
916
template class PipelineXLocalState<SpillSortSharedState>;
917
template class PipelineXLocalState<NestedLoopJoinSharedState>;
918
template class PipelineXLocalState<AnalyticSharedState>;
919
template class PipelineXLocalState<AggSharedState>;
920
template class PipelineXLocalState<BucketedAggSharedState>;
921
template class PipelineXLocalState<PartitionedAggSharedState>;
922
template class PipelineXLocalState<FakeSharedState>;
923
template class PipelineXLocalState<UnionSharedState>;
924
template class PipelineXLocalState<DataQueueSharedState>;
925
template class PipelineXLocalState<MultiCastSharedState>;
926
template class PipelineXLocalState<PartitionSortNodeSharedState>;
927
template class PipelineXLocalState<SetSharedState>;
928
template class PipelineXLocalState<LocalExchangeSharedState>;
929
template class PipelineXLocalState<BasicSharedState>;
930
template class PipelineXLocalState<RecCTESharedState>;
931
932
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
933
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
934
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
935
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
936
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
937
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
938
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
939
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
940
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
941
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
942
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
943
944
#ifdef BE_TEST
945
template class OperatorX<DummyOperatorLocalState>;
946
template class DataSinkOperatorX<DummySinkLocalState>;
947
#endif
948
949
} // namespace doris