Coverage Report

Created: 2026-08-27 18:29

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
1.56M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.56M
    if (_parent->nereids_id() == -1) {
122
817k
        return fmt::format("(id={})", _parent->node_id());
123
817k
    } else {
124
749k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
749k
    }
126
1.56M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
63.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
63.4k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
63.4k
    } else {
124
63.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
63.4k
    }
126
63.4k
}
_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
159k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
159k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
159k
    } else {
124
159k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
159k
    }
126
159k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
35
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
35
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
35
    } else {
124
35
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
35
    }
126
35
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.79k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.79k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
5.79k
    } else {
124
5.79k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.79k
    }
126
5.79k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.22k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.22k
    if (_parent->nereids_id() == -1) {
122
11
        return fmt::format("(id={})", _parent->node_id());
123
8.21k
    } else {
124
8.21k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
8.21k
    }
126
8.22k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
86.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
86.8k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
86.8k
    } else {
124
86.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
86.8k
    }
126
86.8k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
71.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
71.6k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
71.6k
    } else {
124
71.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
71.6k
    }
126
71.6k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
42
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
42
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
42
    } else {
124
42
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
42
    }
126
42
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
552k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
552k
    if (_parent->nereids_id() == -1) {
122
253k
        return fmt::format("(id={})", _parent->node_id());
123
298k
    } else {
124
298k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
298k
    }
126
552k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
50.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
50.6k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
50.6k
    } else {
124
50.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
50.6k
    }
126
50.6k
}
_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
4.37k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.38k
    if (_parent->nereids_id() == -1) {
122
4.38k
        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
4.37k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
665
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
665
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
563
    } else {
124
563
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
563
    }
126
665
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.09k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.09k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
5.07k
    } else {
124
5.07k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.07k
    }
126
5.09k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
557k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
558k
    if (_parent->nereids_id() == -1) {
122
558k
        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
557k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
164
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
164
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
164
    } else {
124
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
164
    }
126
164
}
127
128
template <typename SharedStateArg>
129
1.08M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.08M
    if (_parent->nereids_id() == -1) {
131
637k
        return fmt::format("(id={})", _parent->node_id());
132
637k
    } else {
133
452k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
452k
    }
135
1.08M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
112k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
112k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
112k
    } else {
133
112k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
112k
    }
135
112k
}
_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
162k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
162k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
162k
    } else {
133
162k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
162k
    }
135
162k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
42
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
42
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
42
    } else {
133
42
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
42
    }
135
42
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.05k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.05k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
6.05k
    } else {
133
6.05k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.05k
    }
135
6.05k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.23k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.23k
    if (_parent->nereids_id() == -1) {
131
11
        return fmt::format("(id={})", _parent->node_id());
132
8.22k
    } else {
133
8.22k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.22k
    }
135
8.23k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
87.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
87.4k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
87.3k
    } else {
133
87.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
87.3k
    }
135
87.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
71.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
71.3k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
71.3k
    } else {
133
71.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
71.3k
    }
135
71.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
52
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
52
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
52
    } else {
133
52
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
52
    }
135
52
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
24
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
24
    if (_parent->nereids_id() == -1) {
131
24
        return fmt::format("(id={})", _parent->node_id());
132
24
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
24
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
4.62k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
4.62k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
4.61k
    } else {
133
4.61k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
4.61k
    }
135
4.62k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
666
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
666
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
564
    } else {
133
564
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
564
    }
135
666
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.4k
    if (_parent->nereids_id() == -1) {
131
12.4k
        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.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
232k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
232k
    if (_parent->nereids_id() == -1) {
131
232k
        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
232k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
392k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
392k
    if (_parent->nereids_id() == -1) {
131
392k
        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
392k
}
_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
29.4k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
29.4k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
29.4k
    _terminated = true;
143
29.4k
    return Status::OK();
144
29.4k
}
_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
1.84k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.84k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.84k
    _terminated = true;
143
1.84k
    return Status::OK();
144
1.84k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_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
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.76k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.76k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.76k
    _terminated = true;
143
1.76k
    return Status::OK();
144
1.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
742
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
742
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
742
    _terminated = true;
143
742
    return Status::OK();
144
742
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
524
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
524
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
524
    _terminated = true;
143
524
    return Status::OK();
144
524
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
15
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
15
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
15
    _terminated = true;
143
15
    return Status::OK();
144
15
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
180
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
180
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
180
    _terminated = true;
143
180
    return Status::OK();
144
180
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
9
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
9
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
9
    _terminated = true;
143
9
    return Status::OK();
144
9
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
230
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
230
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
230
    _terminated = true;
143
230
    return Status::OK();
144
230
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
127
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
127
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
127
    _terminated = true;
143
127
    return Status::OK();
144
127
}
145
146
281k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
281k
    return _child && _child->is_serial_operator() && !is_source()
148
281k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
281k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
281k
}
151
152
24.8k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
24.8k
    if (!_child) {
154
23.8k
        return false;
155
23.8k
    }
156
1.02k
    if (_child->is_serial_operator()) {
157
106
        return true;
158
106
    }
159
915
    const auto child_distribution = _child->required_data_distribution(state);
160
915
    return child_distribution.need_local_exchange() &&
161
915
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.02k
}
163
164
template <typename SharedStateArg>
165
19.5k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
19.5k
    fmt::memory_buffer debug_string_buffer;
167
19.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
19.5k
    return fmt::to_string(debug_string_buffer);
169
19.5k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
3
    fmt::memory_buffer debug_string_buffer;
167
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
3
    return fmt::to_string(debug_string_buffer);
169
3
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
19.5k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
19.5k
    fmt::memory_buffer debug_string_buffer;
167
19.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
19.5k
    return fmt::to_string(debug_string_buffer);
169
19.5k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
1
    fmt::memory_buffer debug_string_buffer;
167
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
1
    return fmt::to_string(debug_string_buffer);
169
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
19.5k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19.5k
    fmt::memory_buffer debug_string_buffer;
174
19.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19.5k
    return fmt::to_string(debug_string_buffer);
176
19.5k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
19.5k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19.5k
    fmt::memory_buffer debug_string_buffer;
174
19.5k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19.5k
    return fmt::to_string(debug_string_buffer);
176
19.5k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
19.5k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
19.5k
    fmt::memory_buffer debug_string_buffer;
180
19.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
19.5k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
19.5k
                   _is_serial_operator);
183
19.5k
    return fmt::to_string(debug_string_buffer);
184
19.5k
}
185
186
19.5k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
19.5k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
19.5k
}
189
190
598k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
598k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
598k
    _nereids_id = tnode.nereids_id;
193
598k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.20k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.20k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.20k
            tnode.intermediate_projections_list.size()) {
199
0
            return Status::InternalError(
200
0
                    "intermediate_output_tuple_id_list size:{} not match "
201
0
                    "intermediate_projections_list size:{}",
202
0
                    tnode.intermediate_output_tuple_id_list.size(),
203
0
                    tnode.intermediate_projections_list.size());
204
0
        }
205
3.20k
    }
206
598k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
598k
    _op_name = substr + "_OPERATOR";
208
209
598k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
598k
    } else if (tnode.__isset.conjuncts) {
212
252k
        for (const auto& conjunct : tnode.conjuncts) {
213
252k
            VExprContextSPtr context;
214
252k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
252k
            _conjuncts.emplace_back(context);
216
252k
        }
217
86.0k
    }
218
219
    // create the projections expr
220
598k
    if (tnode.__isset.projections) {
221
234k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
234k
    }
223
598k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.20k
        DCHECK(has_projection()) << "no final projections";
225
3.20k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
4.17k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
4.17k
            VExprContextSPtrs projections;
228
4.17k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
4.17k
            _projection->intermediate_projections.push_back(projections);
230
4.17k
        }
231
3.20k
    }
232
598k
    return Status::OK();
233
598k
}
234
235
624k
Status OperatorXBase::prepare(RuntimeState* state) {
236
624k
    for (auto& conjunct : _conjuncts) {
237
252k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
252k
    }
239
624k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
574k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
326k
            return a->execute_cost() < b->execute_cost();
242
326k
        });
243
574k
    };
244
245
624k
    if (has_projection()) {
246
233k
        auto& projection = *_projection;
247
238k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
4.17k
            const auto& input_row_desc =
249
4.17k
                    i == 0 ? operator_row_desc_before_projection()
250
4.17k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
4.17k
            RETURN_IF_ERROR(
252
4.17k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
4.17k
        }
254
233k
        const auto& final_projection_input_row_desc =
255
233k
                projection.intermediate_output_row_descriptors.empty()
256
233k
                        ? operator_row_desc_before_projection()
257
233k
                        : projection.intermediate_output_row_descriptors.back();
258
233k
        RETURN_IF_ERROR(
259
233k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
233k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
233k
                                                      projection.output_row_descriptor));
262
233k
    }
263
264
624k
    for (auto& conjunct : _conjuncts) {
265
252k
        RETURN_IF_ERROR(conjunct->open(state));
266
252k
    }
267
624k
    if (has_projection()) {
268
233k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
233k
        for (auto& projections : _projection->intermediate_projections) {
270
4.17k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
4.17k
        }
272
233k
    }
273
624k
    if (_child && !is_source()) {
274
95.0k
        RETURN_IF_ERROR(_child->prepare(state));
275
95.0k
    }
276
277
624k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
624k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
624k
    return Status::OK();
283
624k
}
284
285
6.07k
Status OperatorXBase::terminate(RuntimeState* state) {
286
6.07k
    if (_child && !is_source()) {
287
592
        RETURN_IF_ERROR(_child->terminate(state));
288
592
    }
289
6.07k
    auto result = state->get_local_state_result(operator_id());
290
6.07k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
6.07k
    return result.value()->terminate(state);
294
6.07k
}
295
296
4.30M
Status OperatorXBase::close(RuntimeState* state) {
297
4.30M
    if (_child && !is_source()) {
298
728k
        RETURN_IF_ERROR(_child->close(state));
299
728k
    }
300
4.30M
    auto result = state->get_local_state_result(operator_id());
301
4.30M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
4.30M
    return result.value()->close(state);
305
4.30M
}
306
307
241k
void PipelineXLocalStateBase::clear_origin_block() {
308
241k
    _origin_block.clear_column_data(
309
241k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
241k
}
311
312
783k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
783k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
783k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
783k
    return Status::OK();
317
783k
}
318
319
0
bool PipelineXLocalStateBase::is_blockable() const {
320
0
    return std::any_of(_projections.begin(), _projections.end(),
321
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
322
0
}
323
324
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
325
241k
                                     Block* output_block) const {
326
241k
    auto* local_state = state->get_local_state(operator_id());
327
241k
    SCOPED_TIMER(local_state->exec_time_counter());
328
241k
    SCOPED_TIMER(local_state->_projection_timer);
329
241k
    const size_t rows = origin_block->rows();
330
241k
    if (rows == 0) {
331
126k
        return Status::OK();
332
126k
    }
333
115k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
115k
    {
336
115k
        Block input_block = *origin_block;
337
338
115k
        ColumnsWithTypeAndName new_columns;
339
115k
        for (const auto& projections : local_state->_intermediate_projections) {
340
1.68k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
1.68k
            new_columns.resize(projections.size());
345
10.1k
            for (int i = 0; i < projections.size(); i++) {
346
8.47k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
8.47k
                if (new_columns[i].column->size() != rows) {
348
0
                    return Status::InternalError(
349
0
                            "intermediate projection result column size {} not equal input rows "
350
0
                            "{}, expr: {}",
351
0
                            new_columns[i].column->size(), rows,
352
0
                            projections[i]->root()->debug_string());
353
0
                }
354
8.47k
            }
355
1.68k
            Block tmp_block {new_columns};
356
1.68k
            input_block.swap(tmp_block);
357
1.68k
        }
358
359
115k
        if (input_block.rows() != rows) {
360
0
            return Status::InternalError(
361
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
362
0
                    "input_block: {}",
363
0
                    input_block.rows(), rows, input_block.dump_structure());
364
0
        }
365
366
115k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
115k
                output_block, _projection->output_row_descriptor);
368
115k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
115k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
115k
        Columns shared_columns(mutable_columns.size());
371
372
655k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
540k
            ColumnPtr column_ptr;
374
540k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
540k
            if (column_ptr->size() != rows) {
376
0
                return Status::InternalError(
377
0
                        "projection result column size {} not equal input rows {}, expr: {}",
378
0
                        column_ptr->size(), rows,
379
0
                        local_state->_projections[i]->root()->debug_string());
380
0
            }
381
540k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
540k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
540k
            if (column_ptr->is_exclusive()) {
386
195k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
345k
            } else {
388
345k
                shared_columns[i] = std::move(column_ptr);
389
345k
            }
390
540k
        }
391
392
115k
        scoped_mutable_block.restore();
393
655k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
540k
            if (shared_columns[i]) {
395
345k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
345k
            }
397
540k
        }
398
115k
    }
399
400
0
    origin_block->clear_column_data(
401
115k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
115k
    DCHECK_EQ(output_block->rows(), rows);
403
404
115k
    return Status::OK();
405
115k
}
406
407
4.19M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.19M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.19M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.19M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.19M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.19M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.19M
            if (_debug_point_count++ % 2 == 0) {
414
4.19M
                return Status::OK();
415
4.19M
            }
416
4.19M
        }
417
4.19M
    });
418
419
4.19M
    Status status;
420
4.19M
    auto* local_state = state->get_local_state(operator_id());
421
4.19M
    Defer defer([&]() {
422
4.19M
        if (status.ok()) {
423
4.19M
            local_state->update_output_block_counters(*block);
424
4.19M
        }
425
4.19M
    });
426
4.19M
    if (has_projection()) {
427
241k
        local_state->clear_origin_block();
428
241k
        status = get_block(state, &local_state->_origin_block, eos);
429
241k
        if (UNLIKELY(!status.ok())) {
430
24
            return status;
431
24
        }
432
241k
        status = do_projections(state, &local_state->_origin_block, block);
433
241k
        return status;
434
241k
    }
435
3.95M
    status = get_block(state, block, eos);
436
3.95M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.95M
    return status;
438
3.95M
}
439
440
2.56M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.56M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
3.48k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
3.48k
        *eos = true;
444
3.48k
    }
445
446
2.56M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.56M
        auto op_name = to_lower(_parent->_op_name);
448
2.56M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.56M
        arg_op_name = to_lower(arg_op_name);
450
451
2.56M
        if (op_name == arg_op_name) {
452
2.56M
            *eos = true;
453
2.56M
        }
454
2.56M
    });
455
456
2.56M
    if (auto rows = block->rows()) {
457
702k
        _num_rows_returned += rows;
458
702k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
702k
    }
460
2.56M
}
461
462
29.4k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
29.4k
    auto result = state->get_sink_local_state_result();
464
29.4k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
29.4k
    return result.value()->terminate(state);
468
29.4k
}
469
470
19.5k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
19.5k
    fmt::memory_buffer debug_string_buffer;
472
473
19.5k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
19.5k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
19.5k
    return fmt::to_string(debug_string_buffer);
476
19.5k
}
477
478
19.5k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
19.5k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
19.5k
}
481
482
311k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
311k
    std::string op_name = "UNKNOWN_SINK";
484
311k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
312k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
312k
        op_name = it->second;
488
312k
    }
489
311k
    _name = op_name + "_OPERATOR";
490
311k
    return Status::OK();
491
311k
}
492
493
264k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
264k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
264k
    _nereids_id = tnode.nereids_id;
496
264k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
264k
    _name = substr + "_SINK_OPERATOR";
498
264k
    return Status::OK();
499
264k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.51M
                                                            LocalSinkStateInfo& info) {
504
1.51M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.51M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.51M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.51M
    return Status::OK();
508
1.51M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
112k
                                                            LocalSinkStateInfo& info) {
504
112k
    auto local_state = LocalStateType::create_unique(this, state);
505
112k
    RETURN_IF_ERROR(local_state->init(state, info));
506
112k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
112k
    return Status::OK();
508
112k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
350k
                                                            LocalSinkStateInfo& info) {
504
350k
    auto local_state = LocalStateType::create_unique(this, state);
505
350k
    RETURN_IF_ERROR(local_state->init(state, info));
506
350k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
350k
    return Status::OK();
508
350k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
352
                                                            LocalSinkStateInfo& info) {
504
352
    auto local_state = LocalStateType::create_unique(this, state);
505
352
    RETURN_IF_ERROR(local_state->init(state, info));
506
352
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
352
    return Status::OK();
508
352
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
42.4k
                                                            LocalSinkStateInfo& info) {
504
42.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
42.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
42.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
42.4k
    return Status::OK();
508
42.4k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
144
                                                            LocalSinkStateInfo& info) {
504
144
    auto local_state = LocalStateType::create_unique(this, state);
505
144
    RETURN_IF_ERROR(local_state->init(state, info));
506
144
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
144
    return Status::OK();
508
144
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.22k
                                                            LocalSinkStateInfo& info) {
504
8.22k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.22k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.22k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.22k
    return Status::OK();
508
8.22k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
21
                                                            LocalSinkStateInfo& info) {
504
21
    auto local_state = LocalStateType::create_unique(this, state);
505
21
    RETURN_IF_ERROR(local_state->init(state, info));
506
21
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
21
    return Status::OK();
508
21
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
162k
                                                            LocalSinkStateInfo& info) {
504
162k
    auto local_state = LocalStateType::create_unique(this, state);
505
162k
    RETURN_IF_ERROR(local_state->init(state, info));
506
162k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
162k
    return Status::OK();
508
162k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
42
                                                            LocalSinkStateInfo& info) {
504
42
    auto local_state = LocalStateType::create_unique(this, state);
505
42
    RETURN_IF_ERROR(local_state->init(state, info));
506
42
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
42
    return Status::OK();
508
42
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
232k
                                                            LocalSinkStateInfo& info) {
504
232k
    auto local_state = LocalStateType::create_unique(this, state);
505
232k
    RETURN_IF_ERROR(local_state->init(state, info));
506
232k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
232k
    return Status::OK();
508
232k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
87.6k
                                                            LocalSinkStateInfo& info) {
504
87.6k
    auto local_state = LocalStateType::create_unique(this, state);
505
87.6k
    RETURN_IF_ERROR(local_state->init(state, info));
506
87.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
87.6k
    return Status::OK();
508
87.6k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
71.3k
                                                            LocalSinkStateInfo& info) {
504
71.3k
    auto local_state = LocalStateType::create_unique(this, state);
505
71.3k
    RETURN_IF_ERROR(local_state->init(state, info));
506
71.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
71.3k
    return Status::OK();
508
71.3k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
52
                                                            LocalSinkStateInfo& info) {
504
52
    auto local_state = LocalStateType::create_unique(this, state);
505
52
    RETURN_IF_ERROR(local_state->init(state, info));
506
52
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
52
    return Status::OK();
508
52
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
424k
                                                            LocalSinkStateInfo& info) {
504
424k
    auto local_state = LocalStateType::create_unique(this, state);
505
424k
    RETURN_IF_ERROR(local_state->init(state, info));
506
424k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
424k
    return Status::OK();
508
424k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.06k
                                                            LocalSinkStateInfo& info) {
504
6.06k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.06k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.06k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.06k
    return Status::OK();
508
6.06k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.63k
                                                            LocalSinkStateInfo& info) {
504
4.63k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.63k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.63k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.63k
    return Status::OK();
508
4.63k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.72k
                                                            LocalSinkStateInfo& info) {
504
1.72k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.72k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.72k
    return Status::OK();
508
1.72k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
561
                                                            LocalSinkStateInfo& info) {
504
561
    auto local_state = LocalStateType::create_unique(this, state);
505
561
    RETURN_IF_ERROR(local_state->init(state, info));
506
561
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
561
    return Status::OK();
508
561
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.74k
                                                            LocalSinkStateInfo& info) {
504
4.74k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.74k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.74k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.74k
    return Status::OK();
508
4.74k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.55k
                                                            LocalSinkStateInfo& info) {
504
2.55k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.55k
    return Status::OK();
508
2.55k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.56k
                                                            LocalSinkStateInfo& info) {
504
2.56k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.56k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.56k
    return Status::OK();
508
2.56k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.46k
                                                            LocalSinkStateInfo& info) {
504
2.46k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.46k
    return Status::OK();
508
2.46k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
569
                                                            LocalSinkStateInfo& info) {
504
569
    auto local_state = LocalStateType::create_unique(this, state);
505
569
    RETURN_IF_ERROR(local_state->init(state, info));
506
569
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
569
    return Status::OK();
508
569
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
100
                                                            LocalSinkStateInfo& info) {
504
100
    auto local_state = LocalStateType::create_unique(this, state);
505
100
    RETURN_IF_ERROR(local_state->init(state, info));
506
100
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
100
    return Status::OK();
508
100
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
509
510
template <typename LocalStateType>
511
1.19M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
0
                                 LocalExchangeSharedState>) {
514
0
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
0
                                        MultiCastSharedState>) {
517
0
        throw Exception(Status::FatalError("should not reach here!"));
518
1.19M
    } else {
519
1.19M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.19M
        ss->id = operator_id();
521
1.19M
        for (auto& dest : dests_id()) {
522
1.18M
            ss->related_op_ids.insert(dest);
523
1.18M
        }
524
1.19M
        return ss;
525
1.19M
    }
526
1.19M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
102k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
102k
    } else {
519
102k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
102k
        ss->id = operator_id();
521
102k
        for (auto& dest : dests_id()) {
522
101k
            ss->related_op_ids.insert(dest);
523
101k
        }
524
102k
        return ss;
525
102k
    }
526
102k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
350k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
350k
    } else {
519
350k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
350k
        ss->id = operator_id();
521
350k
        for (auto& dest : dests_id()) {
522
350k
            ss->related_op_ids.insert(dest);
523
350k
        }
524
350k
        return ss;
525
350k
    }
526
350k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
354
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
354
    } else {
519
354
        auto ss = LocalStateType::SharedStateType::create_shared();
520
354
        ss->id = operator_id();
521
354
        for (auto& dest : dests_id()) {
522
354
            ss->related_op_ids.insert(dest);
523
354
        }
524
354
        return ss;
525
354
    }
526
354
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
42.4k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
42.4k
    } else {
519
42.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
42.4k
        ss->id = operator_id();
521
42.4k
        for (auto& dest : dests_id()) {
522
42.2k
            ss->related_op_ids.insert(dest);
523
42.2k
        }
524
42.4k
        return ss;
525
42.4k
    }
526
42.4k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
144
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
144
    } else {
519
144
        auto ss = LocalStateType::SharedStateType::create_shared();
520
144
        ss->id = operator_id();
521
144
        for (auto& dest : dests_id()) {
522
144
            ss->related_op_ids.insert(dest);
523
144
        }
524
144
        return ss;
525
144
    }
526
144
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8.26k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
8.26k
    } else {
519
8.26k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.26k
        ss->id = operator_id();
521
8.27k
        for (auto& dest : dests_id()) {
522
8.27k
            ss->related_op_ids.insert(dest);
523
8.27k
        }
524
8.26k
        return ss;
525
8.26k
    }
526
8.26k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
21
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
21
    } else {
519
21
        auto ss = LocalStateType::SharedStateType::create_shared();
520
21
        ss->id = operator_id();
521
21
        for (auto& dest : dests_id()) {
522
21
            ss->related_op_ids.insert(dest);
523
21
        }
524
21
        return ss;
525
21
    }
526
21
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
162k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
162k
    } else {
519
162k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
162k
        ss->id = operator_id();
521
162k
        for (auto& dest : dests_id()) {
522
162k
            ss->related_op_ids.insert(dest);
523
162k
        }
524
162k
        return ss;
525
162k
    }
526
162k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
44
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
44
    } else {
519
44
        auto ss = LocalStateType::SharedStateType::create_shared();
520
44
        ss->id = operator_id();
521
44
        for (auto& dest : dests_id()) {
522
44
            ss->related_op_ids.insert(dest);
523
44
        }
524
44
        return ss;
525
44
    }
526
44
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
87.9k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
87.9k
    } else {
519
87.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
87.9k
        ss->id = operator_id();
521
87.9k
        for (auto& dest : dests_id()) {
522
87.7k
            ss->related_op_ids.insert(dest);
523
87.7k
        }
524
87.9k
        return ss;
525
87.9k
    }
526
87.9k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
51
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
51
    } else {
519
51
        auto ss = LocalStateType::SharedStateType::create_shared();
520
51
        ss->id = operator_id();
521
51
        for (auto& dest : dests_id()) {
522
51
            ss->related_op_ids.insert(dest);
523
51
        }
524
51
        return ss;
525
51
    }
526
51
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
426k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
426k
    } else {
519
426k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
426k
        ss->id = operator_id();
521
426k
        for (auto& dest : dests_id()) {
522
423k
            ss->related_op_ids.insert(dest);
523
423k
        }
524
426k
        return ss;
525
426k
    }
526
426k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.09k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6.09k
    } else {
519
6.09k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.09k
        ss->id = operator_id();
521
6.09k
        for (auto& dest : dests_id()) {
522
6.08k
            ss->related_op_ids.insert(dest);
523
6.08k
        }
524
6.09k
        return ss;
525
6.09k
    }
526
6.09k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
664
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
664
    } else {
519
664
        auto ss = LocalStateType::SharedStateType::create_shared();
520
664
        ss->id = operator_id();
521
667
        for (auto& dest : dests_id()) {
522
667
            ss->related_op_ids.insert(dest);
523
667
        }
524
664
        return ss;
525
664
    }
526
664
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.56k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.56k
    } else {
519
2.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.56k
        ss->id = operator_id();
521
2.57k
        for (auto& dest : dests_id()) {
522
2.57k
            ss->related_op_ids.insert(dest);
523
2.57k
        }
524
2.56k
        return ss;
525
2.56k
    }
526
2.56k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.47k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.47k
    } else {
519
2.47k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.47k
        ss->id = operator_id();
521
2.47k
        for (auto& dest : dests_id()) {
522
2.46k
            ss->related_op_ids.insert(dest);
523
2.46k
        }
524
2.47k
        return ss;
525
2.47k
    }
526
2.47k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
569
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
569
    } else {
519
569
        auto ss = LocalStateType::SharedStateType::create_shared();
520
569
        ss->id = operator_id();
521
569
        for (auto& dest : dests_id()) {
522
563
            ss->related_op_ids.insert(dest);
523
563
        }
524
569
        return ss;
525
569
    }
526
569
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
100
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
100
    } else {
519
100
        auto ss = LocalStateType::SharedStateType::create_shared();
520
100
        ss->id = operator_id();
521
100
        for (auto& dest : dests_id()) {
522
100
            ss->related_op_ids.insert(dest);
523
100
        }
524
100
        return ss;
525
100
    }
526
100
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
1.81M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.81M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.81M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.81M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.81M
    return Status::OK();
534
1.81M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
64.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
64.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
64.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
64.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
64.0k
    return Status::OK();
534
64.0k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
227k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
227k
    auto local_state = LocalStateType::create_unique(state, this);
531
227k
    RETURN_IF_ERROR(local_state->init(state, info));
532
227k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
227k
    return Status::OK();
534
227k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
133
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
133
    auto local_state = LocalStateType::create_unique(state, this);
531
133
    RETURN_IF_ERROR(local_state->init(state, info));
532
133
    state->emplace_local_state(operator_id(), std::move(local_state));
533
133
    return Status::OK();
534
133
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.09k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.09k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.09k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.09k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.09k
    return Status::OK();
534
3.09k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.22k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.22k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.22k
    return Status::OK();
534
8.22k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.16k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.16k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.16k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.16k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.16k
    return Status::OK();
534
8.16k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
35
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
35
    auto local_state = LocalStateType::create_unique(state, this);
531
35
    RETURN_IF_ERROR(local_state->init(state, info));
532
35
    state->emplace_local_state(operator_id(), std::move(local_state));
533
35
    return Status::OK();
534
35
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
153k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
153k
    auto local_state = LocalStateType::create_unique(state, this);
531
153k
    RETURN_IF_ERROR(local_state->init(state, info));
532
153k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
153k
    return Status::OK();
534
153k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
87.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
87.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
87.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
87.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
87.4k
    return Status::OK();
534
87.4k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
71.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
71.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
71.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
71.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
71.7k
    return Status::OK();
534
71.7k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
42
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
42
    auto local_state = LocalStateType::create_unique(state, this);
531
42
    RETURN_IF_ERROR(local_state->init(state, info));
532
42
    state->emplace_local_state(operator_id(), std::move(local_state));
533
42
    return Status::OK();
534
42
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.10k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.10k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.10k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.10k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.10k
    return Status::OK();
534
3.10k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
254k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
254k
    auto local_state = LocalStateType::create_unique(state, this);
531
254k
    RETURN_IF_ERROR(local_state->init(state, info));
532
254k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
254k
    return Status::OK();
534
254k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.26k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.26k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.26k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.26k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.26k
    return Status::OK();
534
1.26k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.96k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.96k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.96k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.96k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.96k
    return Status::OK();
534
5.96k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.53k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.53k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.53k
    return Status::OK();
534
1.53k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
50.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
50.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
50.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
50.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
50.7k
    return Status::OK();
534
50.7k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.38k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.38k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.38k
    return Status::OK();
534
4.38k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
565
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
565
    auto local_state = LocalStateType::create_unique(state, this);
531
565
    RETURN_IF_ERROR(local_state->init(state, info));
532
565
    state->emplace_local_state(operator_id(), std::move(local_state));
533
565
    return Status::OK();
534
565
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.59k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.59k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.59k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.59k
    return Status::OK();
534
2.59k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.48k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.48k
    return Status::OK();
534
2.48k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
311
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
311
    auto local_state = LocalStateType::create_unique(state, this);
531
311
    RETURN_IF_ERROR(local_state->init(state, info));
532
311
    state->emplace_local_state(operator_id(), std::move(local_state));
533
311
    return Status::OK();
534
311
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.57k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.57k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.57k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.57k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.57k
    return Status::OK();
534
1.57k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.31k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.31k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.31k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.31k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.31k
    return Status::OK();
534
4.31k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
562k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
562k
    auto local_state = LocalStateType::create_unique(state, this);
531
562k
    RETURN_IF_ERROR(local_state->init(state, info));
532
562k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
562k
    return Status::OK();
534
562k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
164
    auto local_state = LocalStateType::create_unique(state, this);
531
164
    RETURN_IF_ERROR(local_state->init(state, info));
532
164
    state->emplace_local_state(operator_id(), std::move(local_state));
533
164
    return Status::OK();
534
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.18k
    return Status::OK();
534
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
779
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
779
    auto local_state = LocalStateType::create_unique(state, this);
531
779
    RETURN_IF_ERROR(local_state->init(state, info));
532
779
    state->emplace_local_state(operator_id(), std::move(local_state));
533
779
    return Status::OK();
534
779
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
744
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
744
    auto local_state = LocalStateType::create_unique(state, this);
531
744
    RETURN_IF_ERROR(local_state->init(state, info));
532
744
    state->emplace_local_state(operator_id(), std::move(local_state));
533
744
    return Status::OK();
534
744
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.33k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.33k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.33k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.33k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.33k
    return Status::OK();
534
5.33k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
280k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
280k
    auto local_state = LocalStateType::create_unique(state, this);
531
280k
    RETURN_IF_ERROR(local_state->init(state, info));
532
280k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
280k
    return Status::OK();
534
280k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.51M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.80M
        : _num_rows_returned(0),
542
1.80M
          _rows_returned_counter(nullptr),
543
1.80M
          _parent(parent),
544
1.80M
          _state(state),
545
1.80M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.81M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.81M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.81M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.81M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.81M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1.81M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.81M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.81M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.81M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.81M
    if constexpr (!is_fake_shared) {
560
1.02M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
643k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
643k
                                    .first.get()
563
643k
                                    ->template cast<SharedStateArg>();
564
565
643k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
643k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
643k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
643k
        } else if (info.shared_state) {
569
323k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
323k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
323k
            _dependency = _shared_state->create_source_dependency(
576
323k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
323k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
323k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
323k
        } else {
580
58.0k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
3.44k
                DCHECK(false);
582
3.44k
            }
583
58.0k
        }
584
1.02M
    }
585
586
1.81M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1.81M
    _rows_returned_counter =
591
1.81M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.81M
    _blocks_returned_counter =
593
1.81M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.81M
    _output_block_bytes_counter =
595
1.81M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.81M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.81M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.81M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.81M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.81M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.81M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.81M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.81M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.81M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.81M
    _memory_used_counter =
606
1.81M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.81M
    _common_profile->add_info_string("IsColocate",
608
1.81M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.81M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.81M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.81M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.81M
    return Status::OK();
613
1.81M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
63.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
63.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
63.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
63.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
63.8k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
63.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
63.8k
    _operator_profile->add_child(_common_profile.get(), true);
557
63.8k
    _operator_profile->add_child(_custom_profile.get(), true);
558
63.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
63.8k
    if constexpr (!is_fake_shared) {
560
63.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
10.4k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
10.4k
                                    .first.get()
563
10.4k
                                    ->template cast<SharedStateArg>();
564
565
10.4k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
10.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
10.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
53.4k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
52.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
52.9k
            _dependency = _shared_state->create_source_dependency(
576
52.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
52.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
52.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
52.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
517
        }
584
63.8k
    }
585
586
63.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
63.8k
    _rows_returned_counter =
591
63.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
63.8k
    _blocks_returned_counter =
593
63.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
63.8k
    _output_block_bytes_counter =
595
63.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
63.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
63.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
63.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
63.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
63.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
63.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
63.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
63.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
63.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
63.8k
    _memory_used_counter =
606
63.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
63.8k
    _common_profile->add_info_string("IsColocate",
608
63.8k
                                     std::to_string(_parent->is_colocated_operator()));
609
63.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
63.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
63.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
63.8k
    return Status::OK();
613
63.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
1
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
161k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
161k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
161k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
161k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
161k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
161k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
161k
    _operator_profile->add_child(_common_profile.get(), true);
557
161k
    _operator_profile->add_child(_custom_profile.get(), true);
558
161k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
161k
    if constexpr (!is_fake_shared) {
560
161k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
161k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
157k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
157k
            _dependency = _shared_state->create_source_dependency(
576
157k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
157k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
157k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
157k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
4.18k
        }
584
161k
    }
585
586
161k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
161k
    _rows_returned_counter =
591
161k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
161k
    _blocks_returned_counter =
593
161k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
161k
    _output_block_bytes_counter =
595
161k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
161k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
161k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
161k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
161k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
161k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
161k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
161k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
161k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
161k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
161k
    _memory_used_counter =
606
161k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
161k
    _common_profile->add_info_string("IsColocate",
608
161k
                                     std::to_string(_parent->is_colocated_operator()));
609
161k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
161k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
161k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
161k
    return Status::OK();
613
161k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
35
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
35
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
35
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
35
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
35
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
35
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
35
    _operator_profile->add_child(_common_profile.get(), true);
557
35
    _operator_profile->add_child(_custom_profile.get(), true);
558
35
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
35
    if constexpr (!is_fake_shared) {
560
35
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
35
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
35
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
35
            _dependency = _shared_state->create_source_dependency(
576
35
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
35
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
35
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
35
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
35
    }
585
586
35
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
35
    _rows_returned_counter =
591
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
35
    _blocks_returned_counter =
593
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
35
    _output_block_bytes_counter =
595
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
35
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
35
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
35
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
35
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
35
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
35
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
35
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
35
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
35
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
35
    _memory_used_counter =
606
35
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
35
    _common_profile->add_info_string("IsColocate",
608
35
                                     std::to_string(_parent->is_colocated_operator()));
609
35
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
35
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
35
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
35
    return Status::OK();
613
35
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.92k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.92k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.92k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.92k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.92k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.92k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.92k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.92k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.92k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.92k
    if constexpr (!is_fake_shared) {
560
5.92k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.92k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.82k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.82k
            _dependency = _shared_state->create_source_dependency(
576
5.82k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.82k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.82k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.82k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
102
        }
584
5.92k
    }
585
586
5.92k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.92k
    _rows_returned_counter =
591
5.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.92k
    _blocks_returned_counter =
593
5.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.92k
    _output_block_bytes_counter =
595
5.92k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.92k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.92k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.92k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.92k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.92k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.92k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.92k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.92k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.92k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.92k
    _memory_used_counter =
606
5.92k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.92k
    _common_profile->add_info_string("IsColocate",
608
5.92k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.92k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.92k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.92k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.92k
    return Status::OK();
613
5.92k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.26k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.26k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.26k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.26k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.26k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
8.26k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.26k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.26k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.26k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.26k
    if constexpr (!is_fake_shared) {
560
8.26k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
8.26k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
8.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.19k
            _dependency = _shared_state->create_source_dependency(
576
8.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.19k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
75
        }
584
8.26k
    }
585
586
8.26k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
8.26k
    _rows_returned_counter =
591
8.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.26k
    _blocks_returned_counter =
593
8.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.26k
    _output_block_bytes_counter =
595
8.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.26k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.26k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.26k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.26k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.26k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.26k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.26k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.26k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.26k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.26k
    _memory_used_counter =
606
8.26k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.26k
    _common_profile->add_info_string("IsColocate",
608
8.26k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.26k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.26k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.26k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.26k
    return Status::OK();
613
8.26k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
87.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
87.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
87.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
87.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
87.6k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
87.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
87.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
87.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
87.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
87.6k
    if constexpr (!is_fake_shared) {
560
87.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
87.6k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
86.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
86.5k
            _dependency = _shared_state->create_source_dependency(
576
86.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
86.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
86.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
86.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.08k
        }
584
87.6k
    }
585
586
87.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
87.6k
    _rows_returned_counter =
591
87.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
87.6k
    _blocks_returned_counter =
593
87.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
87.6k
    _output_block_bytes_counter =
595
87.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
87.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
87.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
87.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
87.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
87.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
87.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
87.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
87.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
87.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
87.6k
    _memory_used_counter =
606
87.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
87.6k
    _common_profile->add_info_string("IsColocate",
608
87.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
87.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
87.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
87.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
87.6k
    return Status::OK();
613
87.6k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
71.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
71.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
71.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
71.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
71.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
71.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
71.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
71.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
71.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
71.7k
    if constexpr (!is_fake_shared) {
560
71.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
71.7k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
71.7k
                                    .first.get()
563
71.7k
                                    ->template cast<SharedStateArg>();
564
565
71.7k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
71.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
71.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
71.7k
    }
585
586
71.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
71.7k
    _rows_returned_counter =
591
71.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
71.7k
    _blocks_returned_counter =
593
71.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
71.7k
    _output_block_bytes_counter =
595
71.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
71.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
71.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
71.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
71.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
71.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
71.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
71.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
71.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
71.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
71.7k
    _memory_used_counter =
606
71.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
71.7k
    _common_profile->add_info_string("IsColocate",
608
71.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
71.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
71.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
71.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
71.7k
    return Status::OK();
613
71.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
42
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
42
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
42
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
42
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
42
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
42
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
42
    _operator_profile->add_child(_common_profile.get(), true);
557
42
    _operator_profile->add_child(_custom_profile.get(), true);
558
42
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
42
    if constexpr (!is_fake_shared) {
560
42
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
42
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
42
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
42
            _dependency = _shared_state->create_source_dependency(
576
42
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
42
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
42
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
42
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
42
    }
585
586
42
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
42
    _rows_returned_counter =
591
42
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
42
    _blocks_returned_counter =
593
42
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
42
    _output_block_bytes_counter =
595
42
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
42
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
42
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
42
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
42
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
42
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
42
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
42
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
42
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
42
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
42
    _memory_used_counter =
606
42
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
42
    _common_profile->add_info_string("IsColocate",
608
42
                                     std::to_string(_parent->is_colocated_operator()));
609
42
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
42
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
42
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
42
    return Status::OK();
613
42
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
785k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
785k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
785k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
785k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
785k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
785k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
785k
    _operator_profile->add_child(_common_profile.get(), true);
557
785k
    _operator_profile->add_child(_custom_profile.get(), true);
558
785k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
    if constexpr (!is_fake_shared) {
560
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
                                    .first.get()
563
                                    ->template cast<SharedStateArg>();
564
565
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
            _dependency = _shared_state->create_source_dependency(
576
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
        }
584
    }
585
586
785k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
785k
    _rows_returned_counter =
591
785k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
785k
    _blocks_returned_counter =
593
785k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
785k
    _output_block_bytes_counter =
595
785k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
785k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
785k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
785k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
785k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
785k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
785k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
785k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
785k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
785k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
785k
    _memory_used_counter =
606
785k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
785k
    _common_profile->add_info_string("IsColocate",
608
785k
                                     std::to_string(_parent->is_colocated_operator()));
609
785k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
785k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
785k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
785k
    return Status::OK();
613
785k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
50.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
50.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
50.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
50.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
50.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
50.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
50.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
50.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
50.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
50.7k
    if constexpr (!is_fake_shared) {
560
50.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
50.7k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
2.18k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
2.18k
            _dependency = _shared_state->create_source_dependency(
576
2.18k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
2.18k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
2.18k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
48.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
48.5k
        }
584
50.7k
    }
585
586
50.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
50.7k
    _rows_returned_counter =
591
50.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
50.7k
    _blocks_returned_counter =
593
50.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
50.7k
    _output_block_bytes_counter =
595
50.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
50.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
50.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
50.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
50.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
50.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
50.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
50.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
50.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
50.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
50.7k
    _memory_used_counter =
606
50.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
50.7k
    _common_profile->add_info_string("IsColocate",
608
50.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
50.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
50.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
50.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
50.7k
    return Status::OK();
613
50.7k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.38k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.38k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.38k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.38k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.38k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4.38k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.38k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.38k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.38k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.38k
    if constexpr (!is_fake_shared) {
560
4.38k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4.38k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.34k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.34k
            _dependency = _shared_state->create_source_dependency(
576
4.34k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.34k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.34k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.34k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
41
        }
584
4.38k
    }
585
586
4.38k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4.38k
    _rows_returned_counter =
591
4.38k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.38k
    _blocks_returned_counter =
593
4.38k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.38k
    _output_block_bytes_counter =
595
4.38k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.38k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.38k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.38k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.38k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.38k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.38k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.38k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.38k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.38k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.38k
    _memory_used_counter =
606
4.38k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.38k
    _common_profile->add_info_string("IsColocate",
608
4.38k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.38k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.38k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.38k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.38k
    return Status::OK();
613
4.38k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
666
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
666
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
666
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
666
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
666
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
666
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
666
    _operator_profile->add_child(_common_profile.get(), true);
557
666
    _operator_profile->add_child(_custom_profile.get(), true);
558
666
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
666
    if constexpr (!is_fake_shared) {
560
666
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
666
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
661
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
661
            _dependency = _shared_state->create_source_dependency(
576
661
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
661
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
661
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
661
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
5
        }
584
666
    }
585
586
666
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
666
    _rows_returned_counter =
591
666
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
666
    _blocks_returned_counter =
593
666
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
666
    _output_block_bytes_counter =
595
666
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
666
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
666
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
666
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
666
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
666
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
666
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
666
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
666
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
666
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
666
    _memory_used_counter =
606
666
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
666
    _common_profile->add_info_string("IsColocate",
608
666
                                     std::to_string(_parent->is_colocated_operator()));
609
666
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
666
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
666
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
666
    return Status::OK();
613
666
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.10k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.10k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.10k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.10k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.10k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.10k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.10k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.10k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.10k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.10k
    if constexpr (!is_fake_shared) {
560
5.10k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.10k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.06k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.06k
            _dependency = _shared_state->create_source_dependency(
576
5.06k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.06k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.06k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.06k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
38
        }
584
5.10k
    }
585
586
5.10k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.10k
    _rows_returned_counter =
591
5.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.10k
    _blocks_returned_counter =
593
5.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.10k
    _output_block_bytes_counter =
595
5.10k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.10k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.10k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.10k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.10k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.10k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.10k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.10k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.10k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.10k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.10k
    _memory_used_counter =
606
5.10k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.10k
    _common_profile->add_info_string("IsColocate",
608
5.10k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.10k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.10k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.10k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.10k
    return Status::OK();
613
5.10k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
564k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
564k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
564k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
564k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
564k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
564k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
564k
    _operator_profile->add_child(_common_profile.get(), true);
557
564k
    _operator_profile->add_child(_custom_profile.get(), true);
558
564k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
564k
    if constexpr (!is_fake_shared) {
560
564k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
561k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
561k
                                    .first.get()
563
561k
                                    ->template cast<SharedStateArg>();
564
565
561k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
561k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
561k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
561k
        } else if (info.shared_state) {
569
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
3.44k
        } else {
580
3.44k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
3.44k
                DCHECK(false);
582
3.44k
            }
583
3.44k
        }
584
564k
    }
585
586
564k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
564k
    _rows_returned_counter =
591
564k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
564k
    _blocks_returned_counter =
593
564k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
564k
    _output_block_bytes_counter =
595
564k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
564k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
564k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
564k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
564k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
564k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
564k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
564k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
564k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
564k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
564k
    _memory_used_counter =
606
564k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
564k
    _common_profile->add_info_string("IsColocate",
608
564k
                                     std::to_string(_parent->is_colocated_operator()));
609
564k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
564k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
564k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
564k
    return Status::OK();
613
564k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
164
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
164
    _operator_profile->add_child(_common_profile.get(), true);
557
164
    _operator_profile->add_child(_custom_profile.get(), true);
558
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
164
    if constexpr (!is_fake_shared) {
560
164
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
164
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
164
            _dependency = _shared_state->create_source_dependency(
576
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
164
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
164
    }
585
586
164
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
164
    _rows_returned_counter =
591
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
164
    _blocks_returned_counter =
593
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
164
    _output_block_bytes_counter =
595
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
164
    _memory_used_counter =
606
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
164
    _common_profile->add_info_string("IsColocate",
608
164
                                     std::to_string(_parent->is_colocated_operator()));
609
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
164
    return Status::OK();
613
164
}
614
615
template <typename SharedStateArg>
616
1.82M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.82M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.10M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
279k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
279k
    }
621
1.82M
    if (_parent->has_projection()) {
622
340k
        const auto& projection = *_parent->_projection;
623
340k
        _projections.resize(projection.projections.size());
624
2.11M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.77M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.77M
        }
627
340k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
346k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
6.15k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
38.0k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
31.8k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
31.8k
                        state, _intermediate_projections[i][j]));
633
31.8k
            }
634
6.15k
        }
635
340k
    }
636
1.82M
    return Status::OK();
637
1.82M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
64.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
64.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
65.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
853
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
853
    }
621
64.7k
    if (_parent->has_projection()) {
622
64.7k
        const auto& projection = *_parent->_projection;
623
64.7k
        _projections.resize(projection.projections.size());
624
333k
        for (size_t i = 0; i < _projections.size(); i++) {
625
268k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
268k
        }
627
64.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
65.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
767
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
5.75k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.98k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.98k
                        state, _intermediate_projections[i][j]));
633
4.98k
            }
634
767
        }
635
64.7k
    }
636
64.7k
    return Status::OK();
637
64.7k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
163k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
163k
    _conjuncts.resize(_parent->_conjuncts.size());
618
163k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
163k
    if (_parent->has_projection()) {
622
75
        const auto& projection = *_parent->_projection;
623
75
        _projections.resize(projection.projections.size());
624
371
        for (size_t i = 0; i < _projections.size(); i++) {
625
296
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
296
        }
627
75
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
75
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
75
    }
636
163k
    return Status::OK();
637
163k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
35
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
35
    _conjuncts.resize(_parent->_conjuncts.size());
618
35
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
35
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
35
    return Status::OK();
637
35
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.12k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.12k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.20k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
84
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
84
    }
621
6.12k
    if (_parent->has_projection()) {
622
6.12k
        const auto& projection = *_parent->_projection;
623
6.12k
        _projections.resize(projection.projections.size());
624
26.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
20.8k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
20.8k
        }
627
6.12k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.14k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
19
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
171
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
152
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
152
                        state, _intermediate_projections[i][j]));
633
152
            }
634
19
        }
635
6.12k
    }
636
6.12k
    return Status::OK();
637
6.12k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.29k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.29k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.42k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.12k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.12k
    }
621
8.29k
    if (_parent->has_projection()) {
622
4.42k
        const auto& projection = *_parent->_projection;
623
4.42k
        _projections.resize(projection.projections.size());
624
18.2k
        for (size_t i = 0; i < _projections.size(); i++) {
625
13.8k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
13.8k
        }
627
4.42k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.51k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
94
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
720
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
626
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
626
                        state, _intermediate_projections[i][j]));
633
626
            }
634
94
        }
635
4.42k
    }
636
8.29k
    return Status::OK();
637
8.29k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
88.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
88.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
89.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.55k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.55k
    }
621
88.1k
    if (_parent->has_projection()) {
622
27.5k
        const auto& projection = *_parent->_projection;
623
27.5k
        _projections.resize(projection.projections.size());
624
239k
        for (size_t i = 0; i < _projections.size(); i++) {
625
212k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
212k
        }
627
27.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
27.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
188
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.49k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.30k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.30k
                        state, _intermediate_projections[i][j]));
633
1.30k
            }
634
188
        }
635
27.5k
    }
636
88.1k
    return Status::OK();
637
88.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
71.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
71.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
71.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
23
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
23
    }
621
71.7k
    if (_parent->has_projection()) {
622
141
        const auto& projection = *_parent->_projection;
623
141
        _projections.resize(projection.projections.size());
624
516
        for (size_t i = 0; i < _projections.size(); i++) {
625
375
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
375
        }
627
141
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
141
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
141
    }
636
71.7k
    return Status::OK();
637
71.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
46
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
46
    _conjuncts.resize(_parent->_conjuncts.size());
618
46
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
46
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
46
    return Status::OK();
637
46
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
789k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
789k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.06M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
275k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
275k
    }
621
789k
    if (_parent->has_projection()) {
622
227k
        const auto& projection = *_parent->_projection;
623
227k
        _projections.resize(projection.projections.size());
624
1.40M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.17M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.17M
        }
627
227k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
232k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
5.08k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
29.8k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
24.7k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
24.7k
                        state, _intermediate_projections[i][j]));
633
24.7k
            }
634
5.08k
        }
635
227k
    }
636
789k
    return Status::OK();
637
789k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
50.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
50.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
50.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
50.9k
    if (_parent->has_projection()) {
622
9.72k
        const auto& projection = *_parent->_projection;
623
9.72k
        _projections.resize(projection.projections.size());
624
94.7k
        for (size_t i = 0; i < _projections.size(); i++) {
625
85.0k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
85.0k
        }
627
9.72k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
9.72k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
9.72k
    }
636
50.9k
    return Status::OK();
637
50.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.38k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.38k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.83k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
453
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
453
    }
621
4.38k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
4.38k
    return Status::OK();
637
4.38k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
669
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
669
    _conjuncts.resize(_parent->_conjuncts.size());
618
669
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
669
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
669
    return Status::OK();
637
669
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.10k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.10k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.10k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.10k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
228
        for (size_t i = 0; i < _projections.size(); i++) {
625
168
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
168
        }
627
60
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
60
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
60
    }
636
5.10k
    return Status::OK();
637
5.10k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
568k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
568k
    _conjuncts.resize(_parent->_conjuncts.size());
618
568k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
568k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
568k
    return Status::OK();
637
568k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
164
    _conjuncts.resize(_parent->_conjuncts.size());
618
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
164
    if (_parent->has_projection()) {
622
161
        const auto& projection = *_parent->_projection;
623
161
        _projections.resize(projection.projections.size());
624
480
        for (size_t i = 0; i < _projections.size(); i++) {
625
319
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
319
        }
627
161
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
164
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
161
    }
636
164
    return Status::OK();
637
164
}
638
639
template <typename SharedStateArg>
640
6.07k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.07k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.07k
    _terminated = true;
645
6.07k
    return Status::OK();
646
6.07k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
287
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
287
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
287
    _terminated = true;
645
287
    return Status::OK();
646
287
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
30
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
30
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
30
    _terminated = true;
645
30
    return Status::OK();
646
30
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
22
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
22
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
22
    _terminated = true;
645
22
    return Status::OK();
646
22
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
77
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
77
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
77
    _terminated = true;
645
77
    return Status::OK();
646
77
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4.47k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4.47k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4.47k
    _terminated = true;
645
4.47k
    return Status::OK();
646
4.47k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
9
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9
    _terminated = true;
645
9
    return Status::OK();
646
9
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7
    _terminated = true;
645
7
    return Status::OK();
646
7
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.13k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.13k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.13k
    _terminated = true;
645
1.13k
    return Status::OK();
646
1.13k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
36
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
36
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
36
    _terminated = true;
645
36
    return Status::OK();
646
36
}
647
648
template <typename SharedStateArg>
649
2.01M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.01M
    if (_closed) {
651
191k
        return Status::OK();
652
191k
    }
653
1.82M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.03M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.03M
    }
656
1.82M
    _closed = true;
657
1.82M
    return Status::OK();
658
2.01M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
64.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
64.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
64.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
64.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
64.6k
    }
656
64.6k
    _closed = true;
657
64.6k
    return Status::OK();
658
64.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
324k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
324k
    if (_closed) {
651
162k
        return Status::OK();
652
162k
    }
653
162k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
162k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
162k
    }
656
162k
    _closed = true;
657
162k
    return Status::OK();
658
324k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
35
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
35
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
35
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
35
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
35
    }
656
35
    _closed = true;
657
35
    return Status::OK();
658
35
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.11k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.11k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.11k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.11k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.11k
    }
656
6.11k
    _closed = true;
657
6.11k
    return Status::OK();
658
6.11k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
16.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
16.7k
    if (_closed) {
651
8.45k
        return Status::OK();
652
8.45k
    }
653
8.26k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.26k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.26k
    }
656
8.26k
    _closed = true;
657
8.26k
    return Status::OK();
658
16.7k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
88.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
88.0k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
88.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
88.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
88.0k
    }
656
88.0k
    _closed = true;
657
88.0k
    return Status::OK();
658
88.0k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
71.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
71.4k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
71.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
71.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
71.4k
    }
656
71.4k
    _closed = true;
657
71.4k
    return Status::OK();
658
71.4k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
41
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
41
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
41
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
41
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
41
    }
656
41
    _closed = true;
657
41
    return Status::OK();
658
41
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
804k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
804k
    if (_closed) {
651
13.9k
        return Status::OK();
652
13.9k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
790k
    _closed = true;
657
790k
    return Status::OK();
658
804k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
50.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
50.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
50.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
50.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
50.9k
    }
656
50.9k
    _closed = true;
657
50.9k
    return Status::OK();
658
50.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.36k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.36k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.36k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.36k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.36k
    }
656
4.36k
    _closed = true;
657
4.36k
    return Status::OK();
658
4.36k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.13k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.13k
    if (_closed) {
651
566
        return Status::OK();
652
566
    }
653
565
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
565
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
565
    }
656
565
    _closed = true;
657
565
    return Status::OK();
658
1.13k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.5k
    if (_closed) {
651
5.45k
        return Status::OK();
652
5.45k
    }
653
5.08k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.08k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.08k
    }
656
5.08k
    _closed = true;
657
5.08k
    return Status::OK();
658
10.5k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
569k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
569k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
569k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
569k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
569k
    }
656
569k
    _closed = true;
657
569k
    return Status::OK();
658
569k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
326
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
326
    if (_closed) {
651
171
        return Status::OK();
652
171
    }
653
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
155
    }
656
155
    _closed = true;
657
155
    return Status::OK();
658
326
}
659
660
template <typename SharedState>
661
1.52M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.52M
    _operator_profile =
664
1.52M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.52M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.52M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.52M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.52M
    _operator_profile->add_child(_common_profile, true);
673
1.52M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.52M
    _operator_profile->set_metadata(_parent->node_id());
676
1.52M
    _wait_for_finish_dependency_timer =
677
1.52M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.52M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.52M
    if constexpr (!is_fake_shared) {
680
1.09M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.09M
            info.shared_state_map.end()) {
682
315k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
233k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
233k
            }
685
315k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
315k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
315k
                                                  ? 0
688
315k
                                                  : info.task_idx]
689
315k
                                  .get();
690
315k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
780k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
780k
            _shared_state = info.shared_state->template cast<SharedState>();
696
780k
            _dependency = _shared_state->create_sink_dependency(
697
780k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
780k
        }
699
1.09M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.09M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.09M
    }
702
703
1.52M
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.52M
    _rows_input_counter =
708
1.52M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.52M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.52M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.52M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.52M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.52M
    _memory_used_counter =
714
1.52M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.52M
    _common_profile->add_info_string("IsColocate",
716
1.52M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.52M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.52M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.52M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.52M
    return Status::OK();
721
1.52M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
112k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
112k
    _operator_profile =
664
112k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
112k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
112k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
112k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
112k
    _operator_profile->add_child(_common_profile, true);
673
112k
    _operator_profile->add_child(_custom_profile, true);
674
675
112k
    _operator_profile->set_metadata(_parent->node_id());
676
112k
    _wait_for_finish_dependency_timer =
677
112k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
112k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
112k
    if constexpr (!is_fake_shared) {
680
112k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
112k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
10.5k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
10.5k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
10.5k
                                                  ? 0
688
10.5k
                                                  : info.task_idx]
689
10.5k
                                  .get();
690
10.5k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
101k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
101k
            _shared_state = info.shared_state->template cast<SharedState>();
696
101k
            _dependency = _shared_state->create_sink_dependency(
697
101k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
101k
        }
699
112k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
112k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
112k
    }
702
703
112k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
112k
    _rows_input_counter =
708
112k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
112k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
112k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
112k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
112k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
112k
    _memory_used_counter =
714
112k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
112k
    _common_profile->add_info_string("IsColocate",
716
112k
                                     std::to_string(_parent->is_colocated_operator()));
717
112k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
112k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
112k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
112k
    return Status::OK();
721
112k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2
    _operator_profile =
664
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2
    _operator_profile->add_child(_common_profile, true);
673
2
    _operator_profile->add_child(_custom_profile, true);
674
675
2
    _operator_profile->set_metadata(_parent->node_id());
676
2
    _wait_for_finish_dependency_timer =
677
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2
    if constexpr (!is_fake_shared) {
680
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2
            _shared_state = info.shared_state->template cast<SharedState>();
696
2
            _dependency = _shared_state->create_sink_dependency(
697
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2
        }
699
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2
    }
702
703
2
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2
    _rows_input_counter =
708
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2
    _memory_used_counter =
714
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2
    _common_profile->add_info_string("IsColocate",
716
2
                                     std::to_string(_parent->is_colocated_operator()));
717
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2
    return Status::OK();
721
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
162k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
162k
    _operator_profile =
664
162k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
162k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
162k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
162k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
162k
    _operator_profile->add_child(_common_profile, true);
673
162k
    _operator_profile->add_child(_custom_profile, true);
674
675
162k
    _operator_profile->set_metadata(_parent->node_id());
676
162k
    _wait_for_finish_dependency_timer =
677
162k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
162k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
162k
    if constexpr (!is_fake_shared) {
680
162k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
162k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
162k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
162k
            _shared_state = info.shared_state->template cast<SharedState>();
696
162k
            _dependency = _shared_state->create_sink_dependency(
697
162k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
162k
        }
699
162k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
162k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
162k
    }
702
703
162k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
162k
    _rows_input_counter =
708
162k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
162k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
162k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
162k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
162k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
162k
    _memory_used_counter =
714
162k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
162k
    _common_profile->add_info_string("IsColocate",
716
162k
                                     std::to_string(_parent->is_colocated_operator()));
717
162k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
162k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
162k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
162k
    return Status::OK();
721
162k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
42
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
42
    _operator_profile =
664
42
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
42
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
42
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
42
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
42
    _operator_profile->add_child(_common_profile, true);
673
42
    _operator_profile->add_child(_custom_profile, true);
674
675
42
    _operator_profile->set_metadata(_parent->node_id());
676
42
    _wait_for_finish_dependency_timer =
677
42
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
42
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
42
    if constexpr (!is_fake_shared) {
680
42
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
42
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
42
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
42
            _shared_state = info.shared_state->template cast<SharedState>();
696
42
            _dependency = _shared_state->create_sink_dependency(
697
42
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
42
        }
699
42
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
42
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
42
    }
702
703
42
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
42
    _rows_input_counter =
708
42
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
42
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
42
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
42
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
42
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
42
    _memory_used_counter =
714
42
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
42
    _common_profile->add_info_string("IsColocate",
716
42
                                     std::to_string(_parent->is_colocated_operator()));
717
42
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
42
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
42
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
42
    return Status::OK();
721
42
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.08k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.08k
    _operator_profile =
664
6.08k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.08k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.08k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
6.08k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.08k
    _operator_profile->add_child(_common_profile, true);
673
6.08k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.08k
    _operator_profile->set_metadata(_parent->node_id());
676
6.08k
    _wait_for_finish_dependency_timer =
677
6.08k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.08k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.08k
    if constexpr (!is_fake_shared) {
680
6.08k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.08k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
6.08k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.08k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.08k
            _dependency = _shared_state->create_sink_dependency(
697
6.08k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.08k
        }
699
6.08k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.08k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.08k
    }
702
703
6.08k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
6.08k
    _rows_input_counter =
708
6.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.08k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.08k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.08k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.08k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.08k
    _memory_used_counter =
714
6.08k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.08k
    _common_profile->add_info_string("IsColocate",
716
6.08k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.08k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.08k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.08k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.08k
    return Status::OK();
721
6.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.26k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.26k
    _operator_profile =
664
8.26k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.26k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.26k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.26k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.26k
    _operator_profile->add_child(_common_profile, true);
673
8.26k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.26k
    _operator_profile->set_metadata(_parent->node_id());
676
8.26k
    _wait_for_finish_dependency_timer =
677
8.26k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.26k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.26k
    if constexpr (!is_fake_shared) {
680
8.26k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.26k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.26k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.26k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.26k
            _dependency = _shared_state->create_sink_dependency(
697
8.26k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.26k
        }
699
8.26k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.26k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.26k
    }
702
703
8.26k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.26k
    _rows_input_counter =
708
8.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.26k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.26k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.26k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.26k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.26k
    _memory_used_counter =
714
8.26k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.26k
    _common_profile->add_info_string("IsColocate",
716
8.26k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.26k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.26k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.26k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.26k
    return Status::OK();
721
8.26k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
87.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
87.7k
    _operator_profile =
664
87.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
87.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
87.7k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
87.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
87.7k
    _operator_profile->add_child(_common_profile, true);
673
87.7k
    _operator_profile->add_child(_custom_profile, true);
674
675
87.7k
    _operator_profile->set_metadata(_parent->node_id());
676
87.7k
    _wait_for_finish_dependency_timer =
677
87.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
87.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
87.7k
    if constexpr (!is_fake_shared) {
680
87.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
87.7k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
87.7k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
87.7k
            _shared_state = info.shared_state->template cast<SharedState>();
696
87.7k
            _dependency = _shared_state->create_sink_dependency(
697
87.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
87.7k
        }
699
87.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
87.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
87.7k
    }
702
703
87.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
87.7k
    _rows_input_counter =
708
87.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
87.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
87.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
87.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
87.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
87.7k
    _memory_used_counter =
714
87.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
87.7k
    _common_profile->add_info_string("IsColocate",
716
87.7k
                                     std::to_string(_parent->is_colocated_operator()));
717
87.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
87.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
87.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
87.7k
    return Status::OK();
721
87.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
71.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
71.6k
    _operator_profile =
664
71.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
71.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
71.6k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
71.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
71.6k
    _operator_profile->add_child(_common_profile, true);
673
71.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
71.6k
    _operator_profile->set_metadata(_parent->node_id());
676
71.6k
    _wait_for_finish_dependency_timer =
677
71.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
71.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
71.6k
    if constexpr (!is_fake_shared) {
680
71.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
71.7k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
71.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
71.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
71.7k
                                                  ? 0
688
71.7k
                                                  : info.task_idx]
689
71.7k
                                  .get();
690
71.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
71.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
71.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
71.6k
    }
702
703
71.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
71.6k
    _rows_input_counter =
708
71.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
71.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
71.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
71.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
71.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
71.6k
    _memory_used_counter =
714
71.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
71.6k
    _common_profile->add_info_string("IsColocate",
716
71.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
71.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
71.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
71.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
71.6k
    return Status::OK();
721
71.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
52
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
52
    _operator_profile =
664
52
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
52
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
52
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
52
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
52
    _operator_profile->add_child(_common_profile, true);
673
52
    _operator_profile->add_child(_custom_profile, true);
674
675
52
    _operator_profile->set_metadata(_parent->node_id());
676
52
    _wait_for_finish_dependency_timer =
677
52
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
52
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
52
    if constexpr (!is_fake_shared) {
680
52
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
52
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
52
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
52
            _shared_state = info.shared_state->template cast<SharedState>();
696
52
            _dependency = _shared_state->create_sink_dependency(
697
52
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
52
        }
699
52
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
52
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
52
    }
702
703
52
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
52
    _rows_input_counter =
708
52
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
52
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
52
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
52
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
52
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
52
    _memory_used_counter =
714
52
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
52
    _common_profile->add_info_string("IsColocate",
716
52
                                     std::to_string(_parent->is_colocated_operator()));
717
52
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
52
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
52
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
52
    return Status::OK();
721
52
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
425k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
425k
    _operator_profile =
664
425k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
425k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
425k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
425k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
425k
    _operator_profile->add_child(_common_profile, true);
673
425k
    _operator_profile->add_child(_custom_profile, true);
674
675
425k
    _operator_profile->set_metadata(_parent->node_id());
676
425k
    _wait_for_finish_dependency_timer =
677
425k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
425k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
    if constexpr (!is_fake_shared) {
680
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
                                                  ? 0
688
                                                  : info.task_idx]
689
                                  .get();
690
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
            _shared_state = info.shared_state->template cast<SharedState>();
696
            _dependency = _shared_state->create_sink_dependency(
697
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
        }
699
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
    }
702
703
425k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
425k
    _rows_input_counter =
708
425k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
425k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
425k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
425k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
425k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
425k
    _memory_used_counter =
714
425k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
425k
    _common_profile->add_info_string("IsColocate",
716
425k
                                     std::to_string(_parent->is_colocated_operator()));
717
425k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
425k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
425k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
425k
    return Status::OK();
721
425k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
4.64k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
4.64k
    _operator_profile =
664
4.64k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
4.64k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
4.64k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
4.64k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
4.64k
    _operator_profile->add_child(_common_profile, true);
673
4.64k
    _operator_profile->add_child(_custom_profile, true);
674
675
4.64k
    _operator_profile->set_metadata(_parent->node_id());
676
4.64k
    _wait_for_finish_dependency_timer =
677
4.64k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
4.64k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
4.64k
    if constexpr (!is_fake_shared) {
680
4.64k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
4.64k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
4.64k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
4.64k
            _shared_state = info.shared_state->template cast<SharedState>();
696
4.64k
            _dependency = _shared_state->create_sink_dependency(
697
4.64k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
4.64k
        }
699
4.64k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
4.64k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
4.64k
    }
702
703
4.64k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
4.64k
    _rows_input_counter =
708
4.64k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
4.64k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
4.64k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
4.64k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
4.64k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
4.64k
    _memory_used_counter =
714
4.64k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
4.64k
    _common_profile->add_info_string("IsColocate",
716
4.64k
                                     std::to_string(_parent->is_colocated_operator()));
717
4.64k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
4.64k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
4.64k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
4.64k
    return Status::OK();
721
4.64k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
667
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
667
    _operator_profile =
664
667
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
667
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
667
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
667
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
667
    _operator_profile->add_child(_common_profile, true);
673
667
    _operator_profile->add_child(_custom_profile, true);
674
675
667
    _operator_profile->set_metadata(_parent->node_id());
676
667
    _wait_for_finish_dependency_timer =
677
667
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
667
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
667
    if constexpr (!is_fake_shared) {
680
667
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
667
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
667
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
667
            _shared_state = info.shared_state->template cast<SharedState>();
696
667
            _dependency = _shared_state->create_sink_dependency(
697
667
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
667
        }
699
667
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
667
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
667
    }
702
703
667
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
667
    _rows_input_counter =
708
667
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
667
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
667
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
667
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
667
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
667
    _memory_used_counter =
714
667
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
667
    _common_profile->add_info_string("IsColocate",
716
667
                                     std::to_string(_parent->is_colocated_operator()));
717
667
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
667
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
667
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
667
    return Status::OK();
721
667
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.72k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.72k
    _operator_profile =
664
1.72k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.72k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.72k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.72k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.72k
    _operator_profile->add_child(_common_profile, true);
673
1.72k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.72k
    _operator_profile->set_metadata(_parent->node_id());
676
1.72k
    _wait_for_finish_dependency_timer =
677
1.72k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.72k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.72k
    if constexpr (!is_fake_shared) {
680
1.72k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.72k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.72k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.72k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.72k
            _dependency = _shared_state->create_sink_dependency(
697
1.72k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.72k
        }
699
1.72k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.72k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.72k
    }
702
703
1.72k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.72k
    _rows_input_counter =
708
1.72k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.72k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.72k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.72k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.72k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.72k
    _memory_used_counter =
714
1.72k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.72k
    _common_profile->add_info_string("IsColocate",
716
1.72k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.72k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.72k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.72k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.72k
    return Status::OK();
721
1.72k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.4k
    _operator_profile =
664
12.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.4k
    _operator_profile->add_child(_common_profile, true);
673
12.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.4k
    _operator_profile->set_metadata(_parent->node_id());
676
12.4k
    _wait_for_finish_dependency_timer =
677
12.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.4k
    if constexpr (!is_fake_shared) {
680
12.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.4k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.4k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.4k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.4k
            _dependency = _shared_state->create_sink_dependency(
697
12.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.4k
        }
699
12.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.4k
    }
702
703
12.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.4k
    _rows_input_counter =
708
12.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.4k
    _memory_used_counter =
714
12.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.4k
    _common_profile->add_info_string("IsColocate",
716
12.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.4k
    return Status::OK();
721
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
232k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
232k
    _operator_profile =
664
232k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
232k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
232k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
232k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
232k
    _operator_profile->add_child(_common_profile, true);
673
232k
    _operator_profile->add_child(_custom_profile, true);
674
675
232k
    _operator_profile->set_metadata(_parent->node_id());
676
232k
    _wait_for_finish_dependency_timer =
677
232k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
232k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
232k
    if constexpr (!is_fake_shared) {
680
232k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
233k
            info.shared_state_map.end()) {
682
233k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
233k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
233k
            }
685
233k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
233k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
233k
                                                  ? 0
688
233k
                                                  : info.task_idx]
689
233k
                                  .get();
690
233k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
232k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
232k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
232k
    }
702
703
232k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
232k
    _rows_input_counter =
708
232k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
232k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
232k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
232k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
232k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
232k
    _memory_used_counter =
714
232k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
232k
    _common_profile->add_info_string("IsColocate",
716
232k
                                     std::to_string(_parent->is_colocated_operator()));
717
232k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
232k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
232k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
232k
    return Status::OK();
721
232k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
394k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
394k
    _operator_profile =
664
394k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
394k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
394k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
394k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
394k
    _operator_profile->add_child(_common_profile, true);
673
394k
    _operator_profile->add_child(_custom_profile, true);
674
675
394k
    _operator_profile->set_metadata(_parent->node_id());
676
394k
    _wait_for_finish_dependency_timer =
677
394k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
394k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
394k
    if constexpr (!is_fake_shared) {
680
394k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
394k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
394k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
394k
            _shared_state = info.shared_state->template cast<SharedState>();
696
394k
            _dependency = _shared_state->create_sink_dependency(
697
394k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
394k
        }
699
394k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
394k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
394k
    }
702
703
394k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
394k
    _rows_input_counter =
708
394k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
394k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
394k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
394k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
394k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
394k
    _memory_used_counter =
714
394k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
394k
    _common_profile->add_info_string("IsColocate",
716
394k
                                     std::to_string(_parent->is_colocated_operator()));
717
394k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
394k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
394k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
394k
    return Status::OK();
721
394k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
328
    _operator_profile =
664
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
328
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
328
    _operator_profile->add_child(_common_profile, true);
673
328
    _operator_profile->add_child(_custom_profile, true);
674
675
328
    _operator_profile->set_metadata(_parent->node_id());
676
328
    _wait_for_finish_dependency_timer =
677
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
328
    if constexpr (!is_fake_shared) {
680
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
328
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
328
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
328
            _shared_state = info.shared_state->template cast<SharedState>();
696
328
            _dependency = _shared_state->create_sink_dependency(
697
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
328
        }
699
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
328
    }
702
703
328
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
328
    _rows_input_counter =
708
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
328
    _memory_used_counter =
714
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
328
    _common_profile->add_info_string("IsColocate",
716
328
                                     std::to_string(_parent->is_colocated_operator()));
717
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
328
    return Status::OK();
721
328
}
722
723
template <typename SharedState>
724
1.52M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.52M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.52M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.09M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.09M
    }
731
1.52M
    _closed = true;
732
1.52M
    return Status::OK();
733
1.52M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
112k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
112k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
112k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
112k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
112k
    }
731
112k
    _closed = true;
732
112k
    return Status::OK();
733
112k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
162k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
162k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
162k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
162k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
162k
    }
731
162k
    _closed = true;
732
162k
    return Status::OK();
733
162k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
32
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
32
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
30
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
30
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
30
    }
731
30
    _closed = true;
732
30
    return Status::OK();
733
32
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
6.10k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
6.10k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
6.10k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
6.10k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
6.10k
    }
731
6.10k
    _closed = true;
732
6.10k
    return Status::OK();
733
6.10k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.26k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.26k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.26k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.26k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.26k
    }
731
8.26k
    _closed = true;
732
8.26k
    return Status::OK();
733
8.26k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
87.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
87.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
87.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
87.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
87.8k
    }
731
87.8k
    _closed = true;
732
87.8k
    return Status::OK();
733
87.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
71.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
71.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
71.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
71.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
71.4k
    }
731
71.4k
    _closed = true;
732
71.4k
    return Status::OK();
733
71.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
41
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
41
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
41
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
41
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
41
    }
731
41
    _closed = true;
732
41
    return Status::OK();
733
41
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
429k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
429k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
    }
731
429k
    _closed = true;
732
429k
    return Status::OK();
733
429k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4.65k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4.65k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4.65k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4.65k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4.65k
    }
731
4.65k
    _closed = true;
732
4.65k
    return Status::OK();
733
4.65k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
564
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
564
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
564
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
564
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
564
    }
731
564
    _closed = true;
732
564
    return Status::OK();
733
564
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.75k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.75k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.75k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.75k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.75k
    }
731
1.75k
    _closed = true;
732
1.75k
    return Status::OK();
733
1.75k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.4k
    }
731
12.4k
    _closed = true;
732
12.4k
    return Status::OK();
733
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
233k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
233k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
233k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
233k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
233k
    }
731
233k
    _closed = true;
732
233k
    return Status::OK();
733
233k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
395k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
395k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
395k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
395k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
395k
    }
731
395k
    _closed = true;
732
395k
    return Status::OK();
733
395k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
328
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
328
    }
731
328
    _closed = true;
732
328
    return Status::OK();
733
328
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
3.97k
                                                          bool* eos) {
738
3.97k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
3.96k
    return pull(state, block, eos);
740
3.97k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
38
                                                          bool* eos) {
738
38
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
38
    return pull(state, block, eos);
740
38
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
3.93k
                                                          bool* eos) {
738
3.93k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
3.92k
    return pull(state, block, eos);
740
3.93k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
506k
                                                         bool* eos) {
745
506k
    auto& local_state = get_local_state(state);
746
506k
    if (need_more_input_data(state)) {
747
478k
        local_state._child_block->clear_column_data(
748
478k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
478k
                        .num_materialized_slots());
750
478k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
478k
                state, local_state._child_block.get(), &local_state._child_eos));
752
478k
        *eos = local_state._child_eos;
753
478k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
67.5k
            return Status::OK();
755
67.5k
        }
756
410k
        {
757
410k
            SCOPED_TIMER(local_state.exec_time_counter());
758
410k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
410k
        }
760
410k
    }
761
762
438k
    if (!need_more_input_data(state)) {
763
411k
        SCOPED_TIMER(local_state.exec_time_counter());
764
411k
        bool new_eos = false;
765
411k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
411k
        if (new_eos) {
767
337k
            *eos = true;
768
337k
        } else if (!need_more_input_data(state)) {
769
21.8k
            *eos = false;
770
21.8k
        }
771
411k
    }
772
438k
    return Status::OK();
773
438k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
124k
                                                         bool* eos) {
745
124k
    auto& local_state = get_local_state(state);
746
124k
    if (need_more_input_data(state)) {
747
108k
        local_state._child_block->clear_column_data(
748
108k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
108k
                        .num_materialized_slots());
750
108k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
108k
                state, local_state._child_block.get(), &local_state._child_eos));
752
108k
        *eos = local_state._child_eos;
753
108k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
29.9k
            return Status::OK();
755
29.9k
        }
756
78.1k
        {
757
78.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
78.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
78.1k
        }
760
78.1k
    }
761
762
94.2k
    if (!need_more_input_data(state)) {
763
94.2k
        SCOPED_TIMER(local_state.exec_time_counter());
764
94.2k
        bool new_eos = false;
765
94.2k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
94.2k
        if (new_eos) {
767
40.3k
            *eos = true;
768
53.9k
        } else if (!need_more_input_data(state)) {
769
9.38k
            *eos = false;
770
9.38k
        }
771
94.2k
    }
772
94.2k
    return Status::OK();
773
94.2k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.25k
                                                         bool* eos) {
745
4.25k
    auto& local_state = get_local_state(state);
746
4.25k
    if (need_more_input_data(state)) {
747
2.50k
        local_state._child_block->clear_column_data(
748
2.50k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.50k
                        .num_materialized_slots());
750
2.50k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.50k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.50k
        *eos = local_state._child_eos;
753
2.50k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
649
            return Status::OK();
755
649
        }
756
1.85k
        {
757
1.85k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.85k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.85k
        }
760
1.85k
    }
761
762
3.61k
    if (!need_more_input_data(state)) {
763
3.61k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.61k
        bool new_eos = false;
765
3.61k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.61k
        if (new_eos) {
767
1.26k
            *eos = true;
768
2.35k
        } else if (!need_more_input_data(state)) {
769
1.75k
            *eos = false;
770
1.75k
        }
771
3.61k
    }
772
3.61k
    return Status::OK();
773
3.61k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.83k
                                                         bool* eos) {
745
1.83k
    auto& local_state = get_local_state(state);
746
1.83k
    if (need_more_input_data(state)) {
747
1.83k
        local_state._child_block->clear_column_data(
748
1.83k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.83k
                        .num_materialized_slots());
750
1.83k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.83k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.83k
        *eos = local_state._child_eos;
753
1.83k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
771
            return Status::OK();
755
771
        }
756
1.06k
        {
757
1.06k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.06k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.06k
        }
760
1.06k
    }
761
762
1.06k
    if (!need_more_input_data(state)) {
763
1.06k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.06k
        bool new_eos = false;
765
1.06k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.06k
        if (new_eos) {
767
779
            *eos = true;
768
779
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.06k
    }
772
1.06k
    return Status::OK();
773
1.06k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
13.2k
                                                         bool* eos) {
745
13.2k
    auto& local_state = get_local_state(state);
746
13.3k
    if (need_more_input_data(state)) {
747
13.3k
        local_state._child_block->clear_column_data(
748
13.3k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
13.3k
                        .num_materialized_slots());
750
13.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
13.3k
                state, local_state._child_block.get(), &local_state._child_eos));
752
13.3k
        *eos = local_state._child_eos;
753
13.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
2.97k
            return Status::OK();
755
2.97k
        }
756
10.3k
        {
757
10.3k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.3k
        }
760
10.3k
    }
761
762
10.3k
    if (!need_more_input_data(state)) {
763
5.35k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.35k
        bool new_eos = false;
765
5.35k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.35k
        if (new_eos) {
767
5.31k
            *eos = true;
768
5.31k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
5.35k
    }
772
10.3k
    return Status::OK();
773
10.3k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
334k
                                                         bool* eos) {
745
334k
    auto& local_state = get_local_state(state);
746
335k
    if (need_more_input_data(state)) {
747
335k
        local_state._child_block->clear_column_data(
748
335k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
335k
                        .num_materialized_slots());
750
335k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
335k
                state, local_state._child_block.get(), &local_state._child_eos));
752
335k
        *eos = local_state._child_eos;
753
335k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
31.7k
            return Status::OK();
755
31.7k
        }
756
303k
        {
757
303k
            SCOPED_TIMER(local_state.exec_time_counter());
758
303k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
303k
        }
760
303k
    }
761
762
303k
    if (!need_more_input_data(state)) {
763
281k
        SCOPED_TIMER(local_state.exec_time_counter());
764
281k
        bool new_eos = false;
765
281k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
281k
        if (new_eos) {
767
280k
            *eos = true;
768
280k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
281k
    }
772
303k
    return Status::OK();
773
303k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.7k
                                                         bool* eos) {
745
21.7k
    auto& local_state = get_local_state(state);
746
21.7k
    if (need_more_input_data(state)) {
747
11.4k
        local_state._child_block->clear_column_data(
748
11.4k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
11.4k
                        .num_materialized_slots());
750
11.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
11.4k
                state, local_state._child_block.get(), &local_state._child_eos));
752
11.4k
        *eos = local_state._child_eos;
753
11.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
570
            return Status::OK();
755
570
        }
756
10.8k
        {
757
10.8k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.8k
        }
760
10.8k
    }
761
762
21.1k
    if (!need_more_input_data(state)) {
763
20.6k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.6k
        bool new_eos = false;
765
20.6k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.6k
        if (new_eos) {
767
6.09k
            *eos = true;
768
14.5k
        } else if (!need_more_input_data(state)) {
769
10.3k
            *eos = false;
770
10.3k
        }
771
20.6k
    }
772
21.1k
    return Status::OK();
773
21.1k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
6.10k
                                                         bool* eos) {
745
6.10k
    auto& local_state = get_local_state(state);
746
6.10k
    if (need_more_input_data(state)) {
747
5.74k
        local_state._child_block->clear_column_data(
748
5.74k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
5.74k
                        .num_materialized_slots());
750
5.74k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
5.74k
                state, local_state._child_block.get(), &local_state._child_eos));
752
5.74k
        *eos = local_state._child_eos;
753
5.74k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
944
            return Status::OK();
755
944
        }
756
4.80k
        {
757
4.80k
            SCOPED_TIMER(local_state.exec_time_counter());
758
4.80k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
4.80k
        }
760
4.80k
    }
761
762
5.16k
    if (!need_more_input_data(state)) {
763
5.16k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.16k
        bool new_eos = false;
765
5.16k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.16k
        if (new_eos) {
767
3.06k
            *eos = true;
768
3.06k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
5.16k
    }
772
5.15k
    return Status::OK();
773
5.15k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
42.7k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
42.7k
    RETURN_IF_ERROR(Base::init(state, info));
779
42.7k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
42.7k
                                                         "AsyncWriterDependency", true);
781
42.7k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
42.7k
                             _finish_dependency));
783
784
42.7k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
42.7k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
42.7k
    return Status::OK();
787
42.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
354
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
354
    RETURN_IF_ERROR(Base::init(state, info));
779
354
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
354
                                                         "AsyncWriterDependency", true);
781
354
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
354
                             _finish_dependency));
783
784
354
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
354
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
354
    return Status::OK();
787
354
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
42.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
42.2k
    RETURN_IF_ERROR(Base::init(state, info));
779
42.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
42.2k
                                                         "AsyncWriterDependency", true);
781
42.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
42.2k
                             _finish_dependency));
783
784
42.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
42.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
42.2k
    return Status::OK();
787
42.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
144
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
144
    RETURN_IF_ERROR(Base::init(state, info));
779
144
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
144
                                                         "AsyncWriterDependency", true);
781
144
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
144
                             _finish_dependency));
783
784
144
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
144
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
144
    return Status::OK();
787
144
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
43.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
43.0k
    RETURN_IF_ERROR(Base::open(state));
793
43.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
336k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
293k
        RETURN_IF_ERROR(
796
293k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
293k
    }
798
43.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
43.0k
    return Status::OK();
800
43.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
355
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
355
    RETURN_IF_ERROR(Base::open(state));
793
355
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.84k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
355
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
355
    return Status::OK();
800
355
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
42.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
42.5k
    RETURN_IF_ERROR(Base::open(state));
793
42.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
334k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
291k
        RETURN_IF_ERROR(
796
291k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
291k
    }
798
42.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
42.5k
    return Status::OK();
800
42.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
144
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
144
    RETURN_IF_ERROR(Base::open(state));
793
144
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
432
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
288
        RETURN_IF_ERROR(
796
288
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
288
    }
798
144
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
144
    return Status::OK();
800
144
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
57.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
57.6k
    return _writer->sink(block, eos);
806
57.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.18k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.18k
    return _writer->sink(block, eos);
806
1.18k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
56.3k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
56.3k
    return _writer->sink(block, eos);
806
56.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
135
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
135
    return _writer->sink(block, eos);
806
135
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
43.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
43.1k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
43.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
43.1k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
43.1k
    if (_writer) {
818
43.1k
        Status st = _writer->get_writer_status();
819
43.1k
        if (exec_status.ok()) {
820
43.1k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
43.1k
                                                       : Status::Cancelled("force close"));
822
43.1k
        } else {
823
32
            _writer->force_close(exec_status);
824
32
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
43.1k
        RETURN_IF_ERROR(st);
829
43.1k
    }
830
43.0k
    return Base::close(state, exec_status);
831
43.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
343
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
343
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
343
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
343
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
343
    if (_writer) {
818
343
        Status st = _writer->get_writer_status();
819
343
        if (exec_status.ok()) {
820
343
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
343
                                                       : Status::Cancelled("force close"));
822
343
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
343
        RETURN_IF_ERROR(st);
829
343
    }
830
343
    return Base::close(state, exec_status);
831
343
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
42.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
42.6k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
42.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
42.6k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
42.6k
    if (_writer) {
818
42.6k
        Status st = _writer->get_writer_status();
819
42.6k
        if (exec_status.ok()) {
820
42.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
42.6k
                                                       : Status::Cancelled("force close"));
822
42.6k
        } else {
823
32
            _writer->force_close(exec_status);
824
32
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
42.6k
        RETURN_IF_ERROR(st);
829
42.6k
    }
830
42.5k
    return Base::close(state, exec_status);
831
42.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
136
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
136
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
136
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
136
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
136
    if (_writer) {
818
136
        Status st = _writer->get_writer_status();
819
136
        if (exec_status.ok()) {
820
136
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
136
                                                       : Status::Cancelled("force close"));
822
136
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
136
        RETURN_IF_ERROR(st);
829
136
    }
830
136
    return Base::close(state, exec_status);
831
136
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
850
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
851
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
852
DECLARE_OPERATOR(MCTableSinkLocalState)
853
DECLARE_OPERATOR(AnalyticSinkLocalState)
854
DECLARE_OPERATOR(BlackholeSinkLocalState)
855
DECLARE_OPERATOR(SortSinkLocalState)
856
DECLARE_OPERATOR(SpillSortSinkLocalState)
857
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
858
DECLARE_OPERATOR(AggSinkLocalState)
859
DECLARE_OPERATOR(BucketedAggSinkLocalState)
860
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
861
DECLARE_OPERATOR(ExchangeSinkLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
863
DECLARE_OPERATOR(UnionSinkLocalState)
864
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
865
DECLARE_OPERATOR(PartitionSortSinkLocalState)
866
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
868
DECLARE_OPERATOR(SetSinkLocalState<true>)
869
DECLARE_OPERATOR(SetSinkLocalState<false>)
870
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
871
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
872
DECLARE_OPERATOR(CacheSinkLocalState)
873
DECLARE_OPERATOR(DictSinkLocalState)
874
DECLARE_OPERATOR(RecCTESinkLocalState)
875
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
876
877
#undef DECLARE_OPERATOR
878
879
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
880
DECLARE_OPERATOR(HashJoinProbeLocalState)
881
DECLARE_OPERATOR(OlapScanLocalState)
882
DECLARE_OPERATOR(GroupCommitLocalState)
883
DECLARE_OPERATOR(JDBCScanLocalState)
884
DECLARE_OPERATOR(FileScanLocalState)
885
DECLARE_OPERATOR(AnalyticLocalState)
886
DECLARE_OPERATOR(SortLocalState)
887
DECLARE_OPERATOR(SpillSortLocalState)
888
DECLARE_OPERATOR(LocalMergeSortLocalState)
889
DECLARE_OPERATOR(AggLocalState)
890
DECLARE_OPERATOR(BucketedAggLocalState)
891
DECLARE_OPERATOR(PartitionedAggLocalState)
892
DECLARE_OPERATOR(TableFunctionLocalState)
893
DECLARE_OPERATOR(ExchangeLocalState)
894
DECLARE_OPERATOR(RepeatLocalState)
895
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
896
DECLARE_OPERATOR(AssertNumRowsLocalState)
897
DECLARE_OPERATOR(EmptySetLocalState)
898
DECLARE_OPERATOR(UnionSourceLocalState)
899
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
900
DECLARE_OPERATOR(PartitionSortSourceLocalState)
901
DECLARE_OPERATOR(SetSourceLocalState<true>)
902
DECLARE_OPERATOR(SetSourceLocalState<false>)
903
DECLARE_OPERATOR(DataGenLocalState)
904
DECLARE_OPERATOR(SchemaScanLocalState)
905
DECLARE_OPERATOR(MetaScanLocalState)
906
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
907
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
908
DECLARE_OPERATOR(CacheSourceLocalState)
909
DECLARE_OPERATOR(RecCTESourceLocalState)
910
DECLARE_OPERATOR(RecCTEScanLocalState)
911
912
#ifdef BE_TEST
913
DECLARE_OPERATOR(MockLocalState)
914
DECLARE_OPERATOR(MockScanLocalState)
915
#endif
916
#undef DECLARE_OPERATOR
917
918
template class StreamingOperatorX<AssertNumRowsLocalState>;
919
template class StreamingOperatorX<SelectLocalState>;
920
921
template class StatefulOperatorX<HashJoinProbeLocalState>;
922
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
923
template class StatefulOperatorX<RepeatLocalState>;
924
template class StatefulOperatorX<MaterializationLocalState>;
925
template class StatefulOperatorX<StreamingAggLocalState>;
926
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
927
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
928
template class StatefulOperatorX<TableFunctionLocalState>;
929
930
template class PipelineXSinkLocalState<HashJoinSharedState>;
931
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
932
template class PipelineXSinkLocalState<SortSharedState>;
933
template class PipelineXSinkLocalState<SpillSortSharedState>;
934
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
935
template class PipelineXSinkLocalState<AnalyticSharedState>;
936
template class PipelineXSinkLocalState<AggSharedState>;
937
template class PipelineXSinkLocalState<BucketedAggSharedState>;
938
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
939
template class PipelineXSinkLocalState<FakeSharedState>;
940
template class PipelineXSinkLocalState<UnionSharedState>;
941
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
942
template class PipelineXSinkLocalState<MultiCastSharedState>;
943
template class PipelineXSinkLocalState<SetSharedState>;
944
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
945
template class PipelineXSinkLocalState<BasicSharedState>;
946
template class PipelineXSinkLocalState<DataQueueSharedState>;
947
template class PipelineXSinkLocalState<RecCTESharedState>;
948
949
template class PipelineXLocalState<HashJoinSharedState>;
950
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
951
template class PipelineXLocalState<SortSharedState>;
952
template class PipelineXLocalState<SpillSortSharedState>;
953
template class PipelineXLocalState<NestedLoopJoinSharedState>;
954
template class PipelineXLocalState<AnalyticSharedState>;
955
template class PipelineXLocalState<AggSharedState>;
956
template class PipelineXLocalState<BucketedAggSharedState>;
957
template class PipelineXLocalState<PartitionedAggSharedState>;
958
template class PipelineXLocalState<FakeSharedState>;
959
template class PipelineXLocalState<UnionSharedState>;
960
template class PipelineXLocalState<DataQueueSharedState>;
961
template class PipelineXLocalState<MultiCastSharedState>;
962
template class PipelineXLocalState<PartitionSortNodeSharedState>;
963
template class PipelineXLocalState<SetSharedState>;
964
template class PipelineXLocalState<LocalExchangeSharedState>;
965
template class PipelineXLocalState<BasicSharedState>;
966
template class PipelineXLocalState<RecCTESharedState>;
967
968
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
969
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
970
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
972
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
973
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
977
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
978
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
979
980
#ifdef BE_TEST
981
template class OperatorX<DummyOperatorLocalState>;
982
template class DataSinkOperatorX<DummySinkLocalState>;
983
#endif
984
985
} // namespace doris