Coverage Report

Created: 2026-07-22 17:02

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