Coverage Report

Created: 2026-06-08 16:12

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