Coverage Report

Created: 2026-04-15 08:28

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