Coverage Report

Created: 2026-09-19 08:52

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/paimon_table_sink_operator.h"
68
#include "exec/operator/partition_sort_sink_operator.h"
69
#include "exec/operator/partition_sort_source_operator.h"
70
#include "exec/operator/partitioned_aggregation_sink_operator.h"
71
#include "exec/operator/partitioned_aggregation_source_operator.h"
72
#include "exec/operator/partitioned_hash_join_probe_operator.h"
73
#include "exec/operator/partitioned_hash_join_sink_operator.h"
74
#include "exec/operator/rec_cte_anchor_sink_operator.h"
75
#include "exec/operator/rec_cte_scan_operator.h"
76
#include "exec/operator/rec_cte_sink_operator.h"
77
#include "exec/operator/rec_cte_source_operator.h"
78
#include "exec/operator/repeat_operator.h"
79
#include "exec/operator/result_file_sink_operator.h"
80
#include "exec/operator/result_sink_operator.h"
81
#include "exec/operator/schema_scan_operator.h"
82
#include "exec/operator/select_operator.h"
83
#include "exec/operator/set_probe_sink_operator.h"
84
#include "exec/operator/set_sink_operator.h"
85
#include "exec/operator/set_source_operator.h"
86
#include "exec/operator/sort_sink_operator.h"
87
#include "exec/operator/sort_source_operator.h"
88
#include "exec/operator/spill_iceberg_table_sink_operator.h"
89
#include "exec/operator/spill_sort_sink_operator.h"
90
#include "exec/operator/spill_sort_source_operator.h"
91
#include "exec/operator/streaming_aggregation_operator.h"
92
#include "exec/operator/table_function_operator.h"
93
#include "exec/operator/tvf_table_sink_operator.h"
94
#include "exec/operator/union_sink_operator.h"
95
#include "exec/operator/union_source_operator.h"
96
#include "exec/pipeline/dependency.h"
97
#include "exec/pipeline/pipeline.h"
98
#include "exprs/vexpr.h"
99
#include "exprs/vexpr_context.h"
100
#include "runtime/runtime_profile.h"
101
#include "runtime/runtime_profile_counter_names.h"
102
#include "util/debug_util.h"
103
#include "util/string_util.h"
104
105
namespace doris {
106
class RowDescriptor;
107
class RuntimeState;
108
} // namespace doris
109
110
namespace doris {
111
112
0
Status OperatorBase::close(RuntimeState* state) {
113
0
    if (_is_closed) {
114
0
        return Status::OK();
115
0
    }
116
0
    _is_closed = true;
117
0
    return Status::OK();
118
0
}
119
120
template <typename SharedStateArg>
121
1.92M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.92M
    if (_parent->nereids_id() == -1) {
123
1.01M
        return fmt::format("(id={})", _parent->node_id());
124
1.01M
    } else {
125
910k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
910k
    }
127
1.92M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
68.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
68.4k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
68.4k
    } else {
125
68.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
68.4k
    }
127
68.4k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1
    if (_parent->nereids_id() == -1) {
123
1
        return fmt::format("(id={})", _parent->node_id());
124
1
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
208k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
208k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
208k
    } else {
125
208k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
208k
    }
127
208k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
22
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
22
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
22
    } else {
125
22
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
22
    }
127
22
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
6.27k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.27k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
6.27k
    } else {
125
6.27k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
6.27k
    }
127
6.27k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
8.38k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
8.38k
    if (_parent->nereids_id() == -1) {
123
14
        return fmt::format("(id={})", _parent->node_id());
124
8.37k
    } else {
125
8.37k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
8.37k
    }
127
8.38k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
94.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
94.7k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
94.7k
    } else {
125
94.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
94.7k
    }
127
94.7k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
72.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
72.2k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
72.2k
    } else {
125
72.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
72.2k
    }
127
72.2k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
117
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
117
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
117
    } else {
125
117
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
117
    }
127
117
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
710k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
710k
    if (_parent->nereids_id() == -1) {
123
318k
        return fmt::format("(id={})", _parent->node_id());
124
392k
    } else {
125
392k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
392k
    }
127
710k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
54.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
54.7k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
54.7k
    } else {
125
54.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
54.7k
    }
127
54.7k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
26
    if (_parent->nereids_id() == -1) {
123
26
        return fmt::format("(id={})", _parent->node_id());
124
26
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
6.21k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
6.21k
    if (_parent->nereids_id() == -1) {
123
6.21k
        return fmt::format("(id={})", _parent->node_id());
124
6.21k
    } else {
125
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
0
    }
127
6.21k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
531
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
531
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
429
    } else {
125
429
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
429
    }
127
531
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
4.96k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
4.96k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
4.94k
    } else {
125
4.94k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
4.94k
    }
127
4.96k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
689k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
689k
    if (_parent->nereids_id() == -1) {
123
689k
        return fmt::format("(id={})", _parent->node_id());
124
18.4E
    } else {
125
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
18.4E
    }
127
689k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
169
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
169
    } else {
125
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
169
    }
127
169
}
128
129
template <typename SharedStateArg>
130
1.26M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.26M
    if (_parent->nereids_id() == -1) {
132
747k
        return fmt::format("(id={})", _parent->node_id());
133
747k
    } else {
134
516k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
516k
    }
136
1.26M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
116k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
116k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
116k
    } else {
134
116k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
116k
    }
136
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
2
    if (_parent->nereids_id() == -1) {
132
1
        return fmt::format("(id={})", _parent->node_id());
133
1
    } else {
134
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
1
    }
136
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
209k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
209k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
209k
    } else {
134
209k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
209k
    }
136
209k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
29
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
29
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
29
    } else {
134
29
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
29
    }
136
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
6.27k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
6.27k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
6.27k
    } else {
134
6.27k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
6.27k
    }
136
6.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
8.37k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
8.37k
    if (_parent->nereids_id() == -1) {
132
14
        return fmt::format("(id={})", _parent->node_id());
133
8.36k
    } else {
134
8.36k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
8.36k
    }
136
8.37k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
95.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
95.0k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
95.0k
    } else {
134
95.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
95.0k
    }
136
95.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
72.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
72.0k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
72.0k
    } else {
134
72.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
72.0k
    }
136
72.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
127
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
127
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
127
    } else {
134
127
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
127
    }
136
127
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
21
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
21
    if (_parent->nereids_id() == -1) {
132
21
        return fmt::format("(id={})", _parent->node_id());
133
21
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
21
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.24k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.24k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
9.24k
    } else {
134
9.24k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.24k
    }
136
9.24k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
535
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
535
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
433
    } else {
134
433
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
433
    }
136
535
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.2k
    if (_parent->nereids_id() == -1) {
132
12.2k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
12.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
280k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
281k
    if (_parent->nereids_id() == -1) {
132
281k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
280k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
453k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
453k
    if (_parent->nereids_id() == -1) {
132
453k
        return fmt::format("(id={})", _parent->node_id());
133
18.4E
    } else {
134
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
18.4E
    }
136
453k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
25
    if (_parent->nereids_id() == -1) {
132
25
        return fmt::format("(id={})", _parent->node_id());
133
25
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
338
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
338
    } else {
134
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
338
    }
136
338
}
137
138
template <typename SharedStateArg>
139
29.7k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
29.7k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
29.7k
    _terminated = true;
144
29.7k
    return Status::OK();
145
29.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
24.0k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
24.0k
    _terminated = true;
144
24.0k
    return Status::OK();
145
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2.28k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2.28k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2.28k
    _terminated = true;
144
2.28k
    return Status::OK();
145
2.28k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1
    _terminated = true;
144
1
    return Status::OK();
145
1
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.35k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.35k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.35k
    _terminated = true;
144
1.35k
    return Status::OK();
145
1.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
459
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
459
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
459
    _terminated = true;
144
459
    return Status::OK();
145
459
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
539
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
539
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
539
    _terminated = true;
144
539
    return Status::OK();
145
539
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
367
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
367
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
367
    _terminated = true;
144
367
    return Status::OK();
145
367
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
5
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
5
    _terminated = true;
144
5
    return Status::OK();
145
5
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
232
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
232
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
232
    _terminated = true;
144
232
    return Status::OK();
145
232
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
6
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
6
    _terminated = true;
144
6
    return Status::OK();
145
6
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
320
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
320
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
320
    _terminated = true;
144
320
    return Status::OK();
145
320
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
131
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
131
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
131
    _terminated = true;
144
131
    return Status::OK();
145
131
}
146
147
310k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
310k
    return _child && _child->is_serial_operator() && !is_source()
149
310k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
310k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
310k
}
152
153
26.6k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
26.6k
    if (!_child) {
155
25.3k
        return false;
156
25.3k
    }
157
1.27k
    if (_child->is_serial_operator()) {
158
137
        return true;
159
137
    }
160
1.13k
    const auto child_distribution = _child->required_data_distribution(state);
161
1.13k
    return child_distribution.need_local_exchange() &&
162
1.13k
           !is_shuffled_exchange(child_distribution.distribution_type);
163
1.27k
}
164
165
template <typename SharedStateArg>
166
15.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.8k
    fmt::memory_buffer debug_string_buffer;
168
15.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.8k
    return fmt::to_string(debug_string_buffer);
170
15.8k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
3
    fmt::memory_buffer debug_string_buffer;
168
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
3
    return fmt::to_string(debug_string_buffer);
170
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
166
15.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
15.8k
    fmt::memory_buffer debug_string_buffer;
168
15.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
15.8k
    return fmt::to_string(debug_string_buffer);
170
15.8k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
1
    fmt::memory_buffer debug_string_buffer;
168
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
1
    return fmt::to_string(debug_string_buffer);
170
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
171
172
template <typename SharedStateArg>
173
15.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.8k
    fmt::memory_buffer debug_string_buffer;
175
15.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.8k
    return fmt::to_string(debug_string_buffer);
177
15.8k
}
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
173
15.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
15.8k
    fmt::memory_buffer debug_string_buffer;
175
15.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
15.8k
    return fmt::to_string(debug_string_buffer);
177
15.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
15.8k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
15.8k
    fmt::memory_buffer debug_string_buffer;
181
15.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
15.8k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
15.8k
                   _is_serial_operator);
184
15.8k
    return fmt::to_string(debug_string_buffer);
185
15.8k
}
186
187
15.8k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
15.8k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
15.8k
}
190
191
666k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
666k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
666k
    _nereids_id = tnode.nereids_id;
194
666k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
3.88k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
3.88k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
3.88k
            tnode.intermediate_projections_list.size()) {
200
0
            return Status::InternalError(
201
0
                    "intermediate_output_tuple_id_list size:{} not match "
202
0
                    "intermediate_projections_list size:{}",
203
0
                    tnode.intermediate_output_tuple_id_list.size(),
204
0
                    tnode.intermediate_projections_list.size());
205
0
        }
206
3.88k
    }
207
666k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
666k
    _op_name = substr + "_OPERATOR";
209
210
666k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
666k
    } else if (tnode.__isset.conjuncts) {
213
273k
        for (const auto& conjunct : tnode.conjuncts) {
214
273k
            VExprContextSPtr context;
215
273k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
273k
            _conjuncts.emplace_back(context);
217
273k
        }
218
99.3k
    }
219
220
    // create the projections expr
221
666k
    if (tnode.__isset.projections) {
222
260k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
260k
    }
224
666k
    if (!tnode.intermediate_projections_list.empty()) {
225
3.88k
        DCHECK(has_projection()) << "no final projections";
226
3.88k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
6.57k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
6.57k
            VExprContextSPtrs projections;
229
6.57k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
6.57k
            _projection->intermediate_projections.push_back(projections);
231
6.57k
        }
232
3.88k
    }
233
666k
    return Status::OK();
234
666k
}
235
236
693k
Status OperatorXBase::prepare(RuntimeState* state) {
237
693k
    for (auto& conjunct : _conjuncts) {
238
273k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
273k
    }
240
693k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
643k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
340k
            return a->execute_cost() < b->execute_cost();
243
340k
        });
244
643k
    };
245
246
693k
    if (has_projection()) {
247
260k
        auto& projection = *_projection;
248
267k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
6.57k
            const auto& input_row_desc =
250
6.57k
                    i == 0 ? operator_row_desc_before_projection()
251
6.57k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
6.57k
            RETURN_IF_ERROR(
253
6.57k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
6.57k
        }
255
260k
        const auto& final_projection_input_row_desc =
256
260k
                projection.intermediate_output_row_descriptors.empty()
257
260k
                        ? operator_row_desc_before_projection()
258
260k
                        : projection.intermediate_output_row_descriptors.back();
259
260k
        RETURN_IF_ERROR(
260
260k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
260k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
260k
                                                      projection.output_row_descriptor));
263
260k
    }
264
265
693k
    for (auto& conjunct : _conjuncts) {
266
273k
        RETURN_IF_ERROR(conjunct->open(state));
267
273k
    }
268
693k
    if (has_projection()) {
269
260k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
260k
        for (auto& projections : _projection->intermediate_projections) {
271
6.57k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
6.57k
        }
273
260k
    }
274
693k
    if (_child && !is_source()) {
275
101k
        RETURN_IF_ERROR(_child->prepare(state));
276
101k
    }
277
278
693k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
693k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
693k
    return Status::OK();
284
693k
}
285
286
6.47k
Status OperatorXBase::terminate(RuntimeState* state) {
287
6.47k
    if (_child && !is_source()) {
288
725
        RETURN_IF_ERROR(_child->terminate(state));
289
725
    }
290
6.47k
    auto result = state->get_local_state_result(operator_id());
291
6.47k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
6.47k
    return result.value()->terminate(state);
295
6.47k
}
296
297
5.22M
Status OperatorXBase::close(RuntimeState* state) {
298
5.22M
    if (_child && !is_source()) {
299
912k
        RETURN_IF_ERROR(_child->close(state));
300
912k
    }
301
5.22M
    auto result = state->get_local_state_result(operator_id());
302
5.22M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
5.22M
    return result.value()->close(state);
306
5.22M
}
307
308
283k
void PipelineXLocalStateBase::clear_origin_block() {
309
283k
    _origin_block.clear_column_data(
310
283k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
311
283k
}
312
313
831k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
314
831k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
315
316
831k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
317
831k
    return Status::OK();
318
831k
}
319
320
0
bool PipelineXLocalStateBase::is_blockable() const {
321
0
    return std::any_of(_projections.begin(), _projections.end(),
322
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
323
0
}
324
325
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
326
283k
                                     Block* output_block) const {
327
283k
    auto* local_state = state->get_local_state(operator_id());
328
283k
    SCOPED_TIMER(local_state->exec_time_counter());
329
283k
    SCOPED_TIMER(local_state->_projection_timer);
330
283k
    const size_t rows = origin_block->rows();
331
283k
    if (rows == 0) {
332
148k
        return Status::OK();
333
148k
    }
334
134k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
335
336
134k
    {
337
134k
        Block input_block = *origin_block;
338
339
134k
        ColumnsWithTypeAndName new_columns;
340
134k
        for (const auto& projections : local_state->_intermediate_projections) {
341
3.68k
            if (projections.empty()) {
342
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
343
0
                                             node_id());
344
0
            }
345
3.68k
            new_columns.resize(projections.size());
346
69.6k
            for (int i = 0; i < projections.size(); i++) {
347
66.0k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
348
65.9k
                if (new_columns[i].column->size() != rows) {
349
0
                    return Status::InternalError(
350
0
                            "intermediate projection result column size {} not equal input rows "
351
0
                            "{}, expr: {}",
352
0
                            new_columns[i].column->size(), rows,
353
0
                            projections[i]->root()->debug_string());
354
0
                }
355
65.9k
            }
356
3.67k
            Block tmp_block {new_columns};
357
3.67k
            input_block.swap(tmp_block);
358
3.67k
        }
359
360
134k
        if (input_block.rows() != rows) {
361
0
            return Status::InternalError(
362
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
363
0
                    "input_block: {}",
364
0
                    input_block.rows(), rows, input_block.dump_structure());
365
0
        }
366
367
134k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
368
134k
                output_block, _projection->output_row_descriptor);
369
134k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
370
134k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
371
134k
        Columns shared_columns(mutable_columns.size());
372
373
765k
        for (int i = 0; i < mutable_columns.size(); ++i) {
374
630k
            ColumnPtr column_ptr;
375
630k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
376
630k
            if (column_ptr->size() != rows) {
377
0
                return Status::InternalError(
378
0
                        "projection result column size {} not equal input rows {}, expr: {}",
379
0
                        column_ptr->size(), rows,
380
0
                        local_state->_projections[i]->root()->debug_string());
381
0
            }
382
630k
            column_ptr = column_ptr->convert_to_full_column_if_const();
383
630k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
384
0
                column_ptr = make_nullable(column_ptr, false);
385
0
            }
386
630k
            if (column_ptr->is_exclusive()) {
387
225k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
388
404k
            } else {
389
404k
                shared_columns[i] = std::move(column_ptr);
390
404k
            }
391
630k
        }
392
393
134k
        scoped_mutable_block.restore();
394
765k
        for (int i = 0; i < shared_columns.size(); ++i) {
395
630k
            if (shared_columns[i]) {
396
404k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
397
404k
            }
398
630k
        }
399
134k
    }
400
401
0
    origin_block->clear_column_data(
402
134k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
403
134k
    DCHECK_EQ(output_block->rows(), rows);
404
405
134k
    return Status::OK();
406
134k
}
407
408
4.28M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
409
4.28M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
410
4.28M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
411
4.28M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
412
4.28M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
413
4.28M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
414
4.28M
            if (_debug_point_count++ % 2 == 0) {
415
4.28M
                return Status::OK();
416
4.28M
            }
417
4.28M
        }
418
4.28M
    });
419
420
4.28M
    Status status;
421
4.28M
    auto* local_state = state->get_local_state(operator_id());
422
4.28M
    Defer defer([&]() {
423
4.28M
        if (status.ok()) {
424
4.28M
            local_state->update_output_block_counters(*block);
425
4.28M
        }
426
4.28M
    });
427
4.28M
    if (has_projection()) {
428
283k
        local_state->clear_origin_block();
429
283k
        status = get_block(state, &local_state->_origin_block, eos);
430
283k
        if (UNLIKELY(!status.ok())) {
431
29
            return status;
432
29
        }
433
283k
        status = do_projections(state, &local_state->_origin_block, block);
434
283k
        return status;
435
283k
    }
436
4.00M
    status = get_block(state, block, eos);
437
4.00M
    RETURN_IF_ERROR(block->check_type_and_column());
438
4.00M
    return status;
439
4.00M
}
440
441
2.76M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
442
2.76M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
443
9.60k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
444
9.60k
        *eos = true;
445
9.60k
    }
446
447
2.76M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
448
2.76M
        auto op_name = to_lower(_parent->_op_name);
449
2.76M
        auto arg_op_name = dp->param<std::string>("op_name");
450
2.76M
        arg_op_name = to_lower(arg_op_name);
451
452
2.76M
        if (op_name == arg_op_name) {
453
2.76M
            *eos = true;
454
2.76M
        }
455
2.76M
    });
456
457
2.76M
    if (auto rows = block->rows()) {
458
735k
        _num_rows_returned += rows;
459
735k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
460
735k
    }
461
2.76M
}
462
463
29.7k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
464
29.7k
    auto result = state->get_sink_local_state_result();
465
29.7k
    if (!result) {
466
0
        return result.error();
467
0
    }
468
29.7k
    return result.value()->terminate(state);
469
29.7k
}
470
471
15.8k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
472
15.8k
    fmt::memory_buffer debug_string_buffer;
473
474
15.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
475
15.8k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
476
15.8k
    return fmt::to_string(debug_string_buffer);
477
15.8k
}
478
479
15.8k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
480
15.8k
    return state->get_sink_local_state()->debug_string(indentation_level);
481
15.8k
}
482
483
343k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
484
343k
    std::string op_name = "UNKNOWN_SINK";
485
343k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
486
487
344k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
488
344k
        op_name = it->second;
489
344k
    }
490
343k
    _name = op_name + "_OPERATOR";
491
343k
    return Status::OK();
492
343k
}
493
494
294k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
495
294k
    std::string op_name = print_plan_node_type(tnode.node_type);
496
294k
    _nereids_id = tnode.nereids_id;
497
294k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
498
294k
    _name = substr + "_SINK_OPERATOR";
499
294k
    return Status::OK();
500
294k
}
501
502
template <typename LocalStateType>
503
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
504
1.79M
                                                            LocalSinkStateInfo& info) {
505
1.79M
    auto local_state = LocalStateType::create_unique(this, state);
506
1.79M
    RETURN_IF_ERROR(local_state->init(state, info));
507
1.79M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
1.79M
    return Status::OK();
509
1.79M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
116k
                                                            LocalSinkStateInfo& info) {
505
116k
    auto local_state = LocalStateType::create_unique(this, state);
506
116k
    RETURN_IF_ERROR(local_state->init(state, info));
507
116k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
116k
    return Status::OK();
509
116k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
405k
                                                            LocalSinkStateInfo& info) {
505
405k
    auto local_state = LocalStateType::create_unique(this, state);
506
405k
    RETURN_IF_ERROR(local_state->init(state, info));
507
405k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
405k
    return Status::OK();
509
405k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
3
                                                            LocalSinkStateInfo& info) {
505
3
    auto local_state = LocalStateType::create_unique(this, state);
506
3
    RETURN_IF_ERROR(local_state->init(state, info));
507
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
3
    return Status::OK();
509
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
349
                                                            LocalSinkStateInfo& info) {
505
349
    auto local_state = LocalStateType::create_unique(this, state);
506
349
    RETURN_IF_ERROR(local_state->init(state, info));
507
349
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
349
    return Status::OK();
509
349
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
48.2k
                                                            LocalSinkStateInfo& info) {
505
48.2k
    auto local_state = LocalStateType::create_unique(this, state);
506
48.2k
    RETURN_IF_ERROR(local_state->init(state, info));
507
48.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
48.2k
    return Status::OK();
509
48.2k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
18
                                                            LocalSinkStateInfo& info) {
505
18
    auto local_state = LocalStateType::create_unique(this, state);
506
18
    RETURN_IF_ERROR(local_state->init(state, info));
507
18
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
18
    return Status::OK();
509
18
}
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_25PaimonTableSinkLocalStateEE17setup_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
504
8.38k
                                                            LocalSinkStateInfo& info) {
505
8.38k
    auto local_state = LocalStateType::create_unique(this, state);
506
8.38k
    RETURN_IF_ERROR(local_state->init(state, info));
507
8.38k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
8.38k
    return Status::OK();
509
8.38k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
18
                                                            LocalSinkStateInfo& info) {
505
18
    auto local_state = LocalStateType::create_unique(this, state);
506
18
    RETURN_IF_ERROR(local_state->init(state, info));
507
18
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
18
    return Status::OK();
509
18
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
209k
                                                            LocalSinkStateInfo& info) {
505
209k
    auto local_state = LocalStateType::create_unique(this, state);
506
209k
    RETURN_IF_ERROR(local_state->init(state, info));
507
209k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
209k
    return Status::OK();
509
209k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
29
                                                            LocalSinkStateInfo& info) {
505
29
    auto local_state = LocalStateType::create_unique(this, state);
506
29
    RETURN_IF_ERROR(local_state->init(state, info));
507
29
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
29
    return Status::OK();
509
29
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
280k
                                                            LocalSinkStateInfo& info) {
505
280k
    auto local_state = LocalStateType::create_unique(this, state);
506
280k
    RETURN_IF_ERROR(local_state->init(state, info));
507
280k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
280k
    return Status::OK();
509
280k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
95.0k
                                                            LocalSinkStateInfo& info) {
505
95.0k
    auto local_state = LocalStateType::create_unique(this, state);
506
95.0k
    RETURN_IF_ERROR(local_state->init(state, info));
507
95.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
95.0k
    return Status::OK();
509
95.0k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
72.0k
                                                            LocalSinkStateInfo& info) {
505
72.0k
    auto local_state = LocalStateType::create_unique(this, state);
506
72.0k
    RETURN_IF_ERROR(local_state->init(state, info));
507
72.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
72.0k
    return Status::OK();
509
72.0k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
127
                                                            LocalSinkStateInfo& info) {
505
127
    auto local_state = LocalStateType::create_unique(this, state);
506
127
    RETURN_IF_ERROR(local_state->init(state, info));
507
127
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
127
    return Status::OK();
509
127
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
530k
                                                            LocalSinkStateInfo& info) {
505
530k
    auto local_state = LocalStateType::create_unique(this, state);
506
530k
    RETURN_IF_ERROR(local_state->init(state, info));
507
530k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
530k
    return Status::OK();
509
530k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
6.28k
                                                            LocalSinkStateInfo& info) {
505
6.28k
    auto local_state = LocalStateType::create_unique(this, state);
506
6.28k
    RETURN_IF_ERROR(local_state->init(state, info));
507
6.28k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
6.28k
    return Status::OK();
509
6.28k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
9.24k
                                                            LocalSinkStateInfo& info) {
505
9.24k
    auto local_state = LocalStateType::create_unique(this, state);
506
9.24k
    RETURN_IF_ERROR(local_state->init(state, info));
507
9.24k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
9.24k
    return Status::OK();
509
9.24k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
2.40k
                                                            LocalSinkStateInfo& info) {
505
2.40k
    auto local_state = LocalStateType::create_unique(this, state);
506
2.40k
    RETURN_IF_ERROR(local_state->init(state, info));
507
2.40k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
2.40k
    return Status::OK();
509
2.40k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
431
                                                            LocalSinkStateInfo& info) {
505
431
    auto local_state = LocalStateType::create_unique(this, state);
506
431
    RETURN_IF_ERROR(local_state->init(state, info));
507
431
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
431
    return Status::OK();
509
431
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
4.67k
                                                            LocalSinkStateInfo& info) {
505
4.67k
    auto local_state = LocalStateType::create_unique(this, state);
506
4.67k
    RETURN_IF_ERROR(local_state->init(state, info));
507
4.67k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
4.67k
    return Status::OK();
509
4.67k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
2.52k
                                                            LocalSinkStateInfo& info) {
505
2.52k
    auto local_state = LocalStateType::create_unique(this, state);
506
2.52k
    RETURN_IF_ERROR(local_state->init(state, info));
507
2.52k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
2.52k
    return Status::OK();
509
2.52k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
2.52k
                                                            LocalSinkStateInfo& info) {
505
2.52k
    auto local_state = LocalStateType::create_unique(this, state);
506
2.52k
    RETURN_IF_ERROR(local_state->init(state, info));
507
2.52k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
2.52k
    return Status::OK();
509
2.52k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
2.46k
                                                            LocalSinkStateInfo& info) {
505
2.46k
    auto local_state = LocalStateType::create_unique(this, state);
506
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
507
2.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
2.46k
    return Status::OK();
509
2.46k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
1
                                                            LocalSinkStateInfo& info) {
505
1
    auto local_state = LocalStateType::create_unique(this, state);
506
1
    RETURN_IF_ERROR(local_state->init(state, info));
507
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
1
    return Status::OK();
509
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
564
                                                            LocalSinkStateInfo& info) {
505
564
    auto local_state = LocalStateType::create_unique(this, state);
506
564
    RETURN_IF_ERROR(local_state->init(state, info));
507
564
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
564
    return Status::OK();
509
564
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
14
                                                            LocalSinkStateInfo& info) {
505
14
    auto local_state = LocalStateType::create_unique(this, state);
506
14
    RETURN_IF_ERROR(local_state->init(state, info));
507
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
14
    return Status::OK();
509
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
106
                                                            LocalSinkStateInfo& info) {
505
106
    auto local_state = LocalStateType::create_unique(this, state);
506
106
    RETURN_IF_ERROR(local_state->init(state, info));
507
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
106
    return Status::OK();
509
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
169
                                                            LocalSinkStateInfo& info) {
505
169
    auto local_state = LocalStateType::create_unique(this, state);
506
169
    RETURN_IF_ERROR(local_state->init(state, info));
507
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
169
    return Status::OK();
509
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
504
169
                                                            LocalSinkStateInfo& info) {
505
169
    auto local_state = LocalStateType::create_unique(this, state);
506
169
    RETURN_IF_ERROR(local_state->init(state, info));
507
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
508
169
    return Status::OK();
509
169
}
510
511
template <typename LocalStateType>
512
1.41M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
0
                                 LocalExchangeSharedState>) {
515
0
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
0
                                        MultiCastSharedState>) {
518
0
        throw Exception(Status::FatalError("should not reach here!"));
519
1.41M
    } else {
520
1.41M
        auto ss = LocalStateType::SharedStateType::create_shared();
521
1.41M
        ss->id = operator_id();
522
1.41M
        for (auto& dest : dests_id()) {
523
1.41M
            ss->related_op_ids.insert(dest);
524
1.41M
        }
525
1.41M
        return ss;
526
1.41M
    }
527
1.41M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
104k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
104k
    } else {
520
104k
        auto ss = LocalStateType::SharedStateType::create_shared();
521
104k
        ss->id = operator_id();
522
104k
        for (auto& dest : dests_id()) {
523
104k
            ss->related_op_ids.insert(dest);
524
104k
        }
525
104k
        return ss;
526
104k
    }
527
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
405k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
405k
    } else {
520
405k
        auto ss = LocalStateType::SharedStateType::create_shared();
521
405k
        ss->id = operator_id();
522
405k
        for (auto& dest : dests_id()) {
523
405k
            ss->related_op_ids.insert(dest);
524
405k
        }
525
405k
        return ss;
526
405k
    }
527
405k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
3
    } else {
520
3
        auto ss = LocalStateType::SharedStateType::create_shared();
521
3
        ss->id = operator_id();
522
3
        for (auto& dest : dests_id()) {
523
3
            ss->related_op_ids.insert(dest);
524
3
        }
525
3
        return ss;
526
3
    }
527
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
349
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
349
    } else {
520
349
        auto ss = LocalStateType::SharedStateType::create_shared();
521
349
        ss->id = operator_id();
522
349
        for (auto& dest : dests_id()) {
523
347
            ss->related_op_ids.insert(dest);
524
347
        }
525
349
        return ss;
526
349
    }
527
349
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
48.3k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
48.3k
    } else {
520
48.3k
        auto ss = LocalStateType::SharedStateType::create_shared();
521
48.3k
        ss->id = operator_id();
522
48.3k
        for (auto& dest : dests_id()) {
523
48.1k
            ss->related_op_ids.insert(dest);
524
48.1k
        }
525
48.3k
        return ss;
526
48.3k
    }
527
48.3k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
512
18
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
18
    } else {
520
18
        auto ss = LocalStateType::SharedStateType::create_shared();
521
18
        ss->id = operator_id();
522
18
        for (auto& dest : dests_id()) {
523
18
            ss->related_op_ids.insert(dest);
524
18
        }
525
18
        return ss;
526
18
    }
527
18
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_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
512
8.42k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
8.42k
    } else {
520
8.42k
        auto ss = LocalStateType::SharedStateType::create_shared();
521
8.42k
        ss->id = operator_id();
522
8.43k
        for (auto& dest : dests_id()) {
523
8.43k
            ss->related_op_ids.insert(dest);
524
8.43k
        }
525
8.42k
        return ss;
526
8.42k
    }
527
8.42k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
18
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
18
    } else {
520
18
        auto ss = LocalStateType::SharedStateType::create_shared();
521
18
        ss->id = operator_id();
522
18
        for (auto& dest : dests_id()) {
523
18
            ss->related_op_ids.insert(dest);
524
18
        }
525
18
        return ss;
526
18
    }
527
18
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
210k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
210k
    } else {
520
210k
        auto ss = LocalStateType::SharedStateType::create_shared();
521
210k
        ss->id = operator_id();
522
210k
        for (auto& dest : dests_id()) {
523
210k
            ss->related_op_ids.insert(dest);
524
210k
        }
525
210k
        return ss;
526
210k
    }
527
210k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
31
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
31
    } else {
520
31
        auto ss = LocalStateType::SharedStateType::create_shared();
521
31
        ss->id = operator_id();
522
31
        for (auto& dest : dests_id()) {
523
31
            ss->related_op_ids.insert(dest);
524
31
        }
525
31
        return ss;
526
31
    }
527
31
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
95.4k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
95.4k
    } else {
520
95.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
521
95.4k
        ss->id = operator_id();
522
95.5k
        for (auto& dest : dests_id()) {
523
95.5k
            ss->related_op_ids.insert(dest);
524
95.5k
        }
525
95.4k
        return ss;
526
95.4k
    }
527
95.4k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
126
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
126
    } else {
520
126
        auto ss = LocalStateType::SharedStateType::create_shared();
521
126
        ss->id = operator_id();
522
126
        for (auto& dest : dests_id()) {
523
126
            ss->related_op_ids.insert(dest);
524
126
        }
525
126
        return ss;
526
126
    }
527
126
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
531k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
531k
    } else {
520
531k
        auto ss = LocalStateType::SharedStateType::create_shared();
521
531k
        ss->id = operator_id();
522
531k
        for (auto& dest : dests_id()) {
523
530k
            ss->related_op_ids.insert(dest);
524
530k
        }
525
531k
        return ss;
526
531k
    }
527
531k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
6.28k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
6.28k
    } else {
520
6.28k
        auto ss = LocalStateType::SharedStateType::create_shared();
521
6.28k
        ss->id = operator_id();
522
6.28k
        for (auto& dest : dests_id()) {
523
6.27k
            ss->related_op_ids.insert(dest);
524
6.27k
        }
525
6.28k
        return ss;
526
6.28k
    }
527
6.28k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
535
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
535
    } else {
520
535
        auto ss = LocalStateType::SharedStateType::create_shared();
521
535
        ss->id = operator_id();
522
537
        for (auto& dest : dests_id()) {
523
537
            ss->related_op_ids.insert(dest);
524
537
        }
525
535
        return ss;
526
535
    }
527
535
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
512
2.53k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
2.53k
    } else {
520
2.53k
        auto ss = LocalStateType::SharedStateType::create_shared();
521
2.53k
        ss->id = operator_id();
522
2.54k
        for (auto& dest : dests_id()) {
523
2.54k
            ss->related_op_ids.insert(dest);
524
2.54k
        }
525
2.53k
        return ss;
526
2.53k
    }
527
2.53k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
512
2.50k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
2.50k
    } else {
520
2.50k
        auto ss = LocalStateType::SharedStateType::create_shared();
521
2.50k
        ss->id = operator_id();
522
2.50k
        for (auto& dest : dests_id()) {
523
2.49k
            ss->related_op_ids.insert(dest);
524
2.49k
        }
525
2.50k
        return ss;
526
2.50k
    }
527
2.50k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
566
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
566
    } else {
520
566
        auto ss = LocalStateType::SharedStateType::create_shared();
521
566
        ss->id = operator_id();
522
566
        for (auto& dest : dests_id()) {
523
563
            ss->related_op_ids.insert(dest);
524
563
        }
525
566
        return ss;
526
566
    }
527
566
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
512
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
513
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
514
                                 LocalExchangeSharedState>) {
515
        return nullptr;
516
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
517
                                        MultiCastSharedState>) {
518
        throw Exception(Status::FatalError("should not reach here!"));
519
106
    } else {
520
106
        auto ss = LocalStateType::SharedStateType::create_shared();
521
106
        ss->id = operator_id();
522
106
        for (auto& dest : dests_id()) {
523
106
            ss->related_op_ids.insert(dest);
524
106
        }
525
106
        return ss;
526
106
    }
527
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
528
529
template <typename LocalStateType>
530
2.17M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
2.17M
    auto local_state = LocalStateType::create_unique(state, this);
532
2.17M
    RETURN_IF_ERROR(local_state->init(state, info));
533
2.17M
    state->emplace_local_state(operator_id(), std::move(local_state));
534
2.17M
    return Status::OK();
535
2.17M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
68.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
68.5k
    auto local_state = LocalStateType::create_unique(state, this);
532
68.5k
    RETURN_IF_ERROR(local_state->init(state, info));
533
68.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
68.5k
    return Status::OK();
535
68.5k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
244k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
244k
    auto local_state = LocalStateType::create_unique(state, this);
532
244k
    RETURN_IF_ERROR(local_state->init(state, info));
533
244k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
244k
    return Status::OK();
535
244k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
122
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
122
    auto local_state = LocalStateType::create_unique(state, this);
532
122
    RETURN_IF_ERROR(local_state->init(state, info));
533
122
    state->emplace_local_state(operator_id(), std::move(local_state));
534
122
    return Status::OK();
535
122
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
3.09k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
3.09k
    auto local_state = LocalStateType::create_unique(state, this);
532
3.09k
    RETURN_IF_ERROR(local_state->init(state, info));
533
3.09k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
3.09k
    return Status::OK();
535
3.09k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
8.34k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
8.34k
    auto local_state = LocalStateType::create_unique(state, this);
532
8.34k
    RETURN_IF_ERROR(local_state->init(state, info));
533
8.34k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
8.34k
    return Status::OK();
535
8.34k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
8.19k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
8.19k
    auto local_state = LocalStateType::create_unique(state, this);
532
8.19k
    RETURN_IF_ERROR(local_state->init(state, info));
533
8.19k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
8.19k
    return Status::OK();
535
8.19k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
22
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
22
    auto local_state = LocalStateType::create_unique(state, this);
532
22
    RETURN_IF_ERROR(local_state->init(state, info));
533
22
    state->emplace_local_state(operator_id(), std::move(local_state));
534
22
    return Status::OK();
535
22
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
201k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
201k
    auto local_state = LocalStateType::create_unique(state, this);
532
201k
    RETURN_IF_ERROR(local_state->init(state, info));
533
201k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
201k
    return Status::OK();
535
201k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
94.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
94.9k
    auto local_state = LocalStateType::create_unique(state, this);
532
94.9k
    RETURN_IF_ERROR(local_state->init(state, info));
533
94.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
94.9k
    return Status::OK();
535
94.9k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
72.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
72.3k
    auto local_state = LocalStateType::create_unique(state, this);
532
72.3k
    RETURN_IF_ERROR(local_state->init(state, info));
533
72.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
72.3k
    return Status::OK();
535
72.3k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
117
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
117
    auto local_state = LocalStateType::create_unique(state, this);
532
117
    RETURN_IF_ERROR(local_state->init(state, info));
533
117
    state->emplace_local_state(operator_id(), std::move(local_state));
534
117
    return Status::OK();
535
117
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
4.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
4.44k
    auto local_state = LocalStateType::create_unique(state, this);
532
4.44k
    RETURN_IF_ERROR(local_state->init(state, info));
533
4.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
4.44k
    return Status::OK();
535
4.44k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
318k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
318k
    auto local_state = LocalStateType::create_unique(state, this);
532
318k
    RETURN_IF_ERROR(local_state->init(state, info));
533
318k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
318k
    return Status::OK();
535
318k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
1.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
1.39k
    auto local_state = LocalStateType::create_unique(state, this);
532
1.39k
    RETURN_IF_ERROR(local_state->init(state, info));
533
1.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
1.39k
    return Status::OK();
535
1.39k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
6.26k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
6.26k
    auto local_state = LocalStateType::create_unique(state, this);
532
6.26k
    RETURN_IF_ERROR(local_state->init(state, info));
533
6.26k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
6.26k
    return Status::OK();
535
6.26k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
27
    auto local_state = LocalStateType::create_unique(state, this);
532
27
    RETURN_IF_ERROR(local_state->init(state, info));
533
27
    state->emplace_local_state(operator_id(), std::move(local_state));
534
27
    return Status::OK();
535
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
532
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
533
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
1.60k
    return Status::OK();
535
1.60k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
54.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
54.8k
    auto local_state = LocalStateType::create_unique(state, this);
532
54.8k
    RETURN_IF_ERROR(local_state->init(state, info));
533
54.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
54.8k
    return Status::OK();
535
54.8k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
6.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
6.22k
    auto local_state = LocalStateType::create_unique(state, this);
532
6.22k
    RETURN_IF_ERROR(local_state->init(state, info));
533
6.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
6.22k
    return Status::OK();
535
6.22k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
429
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
429
    auto local_state = LocalStateType::create_unique(state, this);
532
429
    RETURN_IF_ERROR(local_state->init(state, info));
533
429
    state->emplace_local_state(operator_id(), std::move(local_state));
534
429
    return Status::OK();
535
429
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
2.51k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
2.51k
    auto local_state = LocalStateType::create_unique(state, this);
532
2.51k
    RETURN_IF_ERROR(local_state->init(state, info));
533
2.51k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
2.51k
    return Status::OK();
535
2.51k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
2.46k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
2.46k
    auto local_state = LocalStateType::create_unique(state, this);
532
2.46k
    RETURN_IF_ERROR(local_state->init(state, info));
533
2.46k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
2.46k
    return Status::OK();
535
2.46k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
327
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
327
    auto local_state = LocalStateType::create_unique(state, this);
532
327
    RETURN_IF_ERROR(local_state->init(state, info));
533
327
    state->emplace_local_state(operator_id(), std::move(local_state));
534
327
    return Status::OK();
535
327
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
532
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
533
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
1.60k
    return Status::OK();
535
1.60k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
10.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
10.4k
    auto local_state = LocalStateType::create_unique(state, this);
532
10.4k
    RETURN_IF_ERROR(local_state->init(state, info));
533
10.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
10.4k
    return Status::OK();
535
10.4k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
692k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
692k
    auto local_state = LocalStateType::create_unique(state, this);
532
692k
    RETURN_IF_ERROR(local_state->init(state, info));
533
692k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
692k
    return Status::OK();
535
692k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
14
    auto local_state = LocalStateType::create_unique(state, this);
532
14
    RETURN_IF_ERROR(local_state->init(state, info));
533
14
    state->emplace_local_state(operator_id(), std::move(local_state));
534
14
    return Status::OK();
535
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
169
    auto local_state = LocalStateType::create_unique(state, this);
532
169
    RETURN_IF_ERROR(local_state->init(state, info));
533
169
    state->emplace_local_state(operator_id(), std::move(local_state));
534
169
    return Status::OK();
535
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
2.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
532
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
533
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
2.20k
    return Status::OK();
535
2.20k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
785
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
785
    auto local_state = LocalStateType::create_unique(state, this);
532
785
    RETURN_IF_ERROR(local_state->init(state, info));
533
785
    state->emplace_local_state(operator_id(), std::move(local_state));
534
785
    return Status::OK();
535
785
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
1.06k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
1.06k
    auto local_state = LocalStateType::create_unique(state, this);
532
1.06k
    RETURN_IF_ERROR(local_state->init(state, info));
533
1.06k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
1.06k
    return Status::OK();
535
1.06k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
5.84k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
5.84k
    auto local_state = LocalStateType::create_unique(state, this);
532
5.84k
    RETURN_IF_ERROR(local_state->init(state, info));
533
5.84k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
5.84k
    return Status::OK();
535
5.84k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
530
364k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
531
364k
    auto local_state = LocalStateType::create_unique(state, this);
532
364k
    RETURN_IF_ERROR(local_state->init(state, info));
533
364k
    state->emplace_local_state(operator_id(), std::move(local_state));
534
364k
    return Status::OK();
535
364k
}
536
537
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
538
                                                         RuntimeState* state)
539
1.79M
        : _parent(parent), _state(state) {}
540
541
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
542
2.17M
        : _num_rows_returned(0),
543
2.17M
          _rows_returned_counter(nullptr),
544
2.17M
          _parent(parent),
545
2.17M
          _state(state),
546
2.17M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
547
548
template <typename SharedStateArg>
549
2.18M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
2.18M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
2.18M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
2.18M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
2.18M
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
2.18M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
2.18M
    _operator_profile->add_child(_common_profile.get(), true);
558
2.18M
    _operator_profile->add_child(_custom_profile.get(), true);
559
2.18M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
2.18M
    if constexpr (!is_fake_shared) {
561
1.22M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
774k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
774k
                                    .first.get()
564
774k
                                    ->template cast<SharedStateArg>();
565
566
774k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
774k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
774k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
774k
        } else if (info.shared_state) {
570
384k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
0
                DCHECK(false);
572
0
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
384k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
384k
            _dependency = _shared_state->create_source_dependency(
577
384k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
384k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
384k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
384k
        } else {
581
65.5k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
5.80k
                DCHECK(false);
583
5.80k
            }
584
65.5k
        }
585
1.22M
    }
586
587
2.18M
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
2.18M
    _rows_returned_counter =
592
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
2.18M
    _blocks_returned_counter =
594
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
2.18M
    _output_block_bytes_counter =
596
2.18M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
2.18M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
2.18M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
2.18M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
2.18M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
2.18M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
2.18M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
2.18M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
2.18M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
2.18M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
2.18M
    _memory_used_counter =
607
2.18M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
2.18M
    _common_profile->add_info_string("IsColocate",
609
2.18M
                                     std::to_string(_parent->is_colocated_operator()));
610
2.18M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
2.18M
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
2.18M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
2.18M
    return Status::OK();
614
2.18M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
68.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
68.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
68.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
68.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
68.7k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
68.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
68.7k
    _operator_profile->add_child(_common_profile.get(), true);
558
68.7k
    _operator_profile->add_child(_custom_profile.get(), true);
559
68.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
68.7k
    if constexpr (!is_fake_shared) {
561
68.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
11.7k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
11.7k
                                    .first.get()
564
11.7k
                                    ->template cast<SharedStateArg>();
565
566
11.7k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
11.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
11.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
56.9k
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
56.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
56.4k
            _dependency = _shared_state->create_source_dependency(
577
56.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
56.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
56.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
56.4k
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
561
        }
585
68.7k
    }
586
587
68.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
68.7k
    _rows_returned_counter =
592
68.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
68.7k
    _blocks_returned_counter =
594
68.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
68.7k
    _output_block_bytes_counter =
596
68.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
68.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
68.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
68.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
68.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
68.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
68.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
68.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
68.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
68.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
68.7k
    _memory_used_counter =
607
68.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
68.7k
    _common_profile->add_info_string("IsColocate",
609
68.7k
                                     std::to_string(_parent->is_colocated_operator()));
610
68.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
68.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
68.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
68.7k
    return Status::OK();
614
68.7k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
1
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
1
    _operator_profile->add_child(_common_profile.get(), true);
558
1
    _operator_profile->add_child(_custom_profile.get(), true);
559
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
1
    if constexpr (!is_fake_shared) {
561
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
1
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
1
            _dependency = _shared_state->create_source_dependency(
577
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
1
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
0
        }
585
1
    }
586
587
1
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
1
    _rows_returned_counter =
592
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
1
    _blocks_returned_counter =
594
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
1
    _output_block_bytes_counter =
596
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
1
    _memory_used_counter =
607
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
1
    _common_profile->add_info_string("IsColocate",
609
1
                                     std::to_string(_parent->is_colocated_operator()));
610
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
1
    return Status::OK();
614
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
210k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
210k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
210k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
210k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
210k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
210k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
210k
    _operator_profile->add_child(_common_profile.get(), true);
558
210k
    _operator_profile->add_child(_custom_profile.get(), true);
559
210k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
210k
    if constexpr (!is_fake_shared) {
561
210k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
210k
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
203k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
203k
            _dependency = _shared_state->create_source_dependency(
577
203k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
203k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
203k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
203k
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
6.61k
        }
585
210k
    }
586
587
210k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
210k
    _rows_returned_counter =
592
210k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
210k
    _blocks_returned_counter =
594
210k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
210k
    _output_block_bytes_counter =
596
210k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
210k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
210k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
210k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
210k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
210k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
210k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
210k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
210k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
210k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
210k
    _memory_used_counter =
607
210k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
210k
    _common_profile->add_info_string("IsColocate",
609
210k
                                     std::to_string(_parent->is_colocated_operator()));
610
210k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
210k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
210k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
210k
    return Status::OK();
614
210k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
22
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
22
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
22
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
22
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
22
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
22
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
22
    _operator_profile->add_child(_common_profile.get(), true);
558
22
    _operator_profile->add_child(_custom_profile.get(), true);
559
22
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
22
    if constexpr (!is_fake_shared) {
561
22
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
22
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
22
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
22
            _dependency = _shared_state->create_source_dependency(
577
22
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
22
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
22
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
22
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
0
        }
585
22
    }
586
587
22
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
22
    _rows_returned_counter =
592
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
22
    _blocks_returned_counter =
594
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
22
    _output_block_bytes_counter =
596
22
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
22
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
22
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
22
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
22
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
22
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
22
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
22
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
22
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
22
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
22
    _memory_used_counter =
607
22
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
22
    _common_profile->add_info_string("IsColocate",
609
22
                                     std::to_string(_parent->is_colocated_operator()));
610
22
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
22
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
22
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
22
    return Status::OK();
614
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
6.28k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
6.28k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
6.28k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
6.28k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
6.28k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
6.28k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
6.28k
    _operator_profile->add_child(_common_profile.get(), true);
558
6.28k
    _operator_profile->add_child(_custom_profile.get(), true);
559
6.28k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
6.28k
    if constexpr (!is_fake_shared) {
561
6.28k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
6.28k
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
6.22k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
6.22k
            _dependency = _shared_state->create_source_dependency(
577
6.22k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
6.22k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
6.22k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
6.22k
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
63
        }
585
6.28k
    }
586
587
6.28k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
6.28k
    _rows_returned_counter =
592
6.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
6.28k
    _blocks_returned_counter =
594
6.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
6.28k
    _output_block_bytes_counter =
596
6.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
6.28k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
6.28k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
6.28k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
6.28k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
6.28k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
6.28k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
6.28k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
6.28k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
6.28k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
6.28k
    _memory_used_counter =
607
6.28k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
6.28k
    _common_profile->add_info_string("IsColocate",
609
6.28k
                                     std::to_string(_parent->is_colocated_operator()));
610
6.28k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
6.28k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
6.28k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
6.28k
    return Status::OK();
614
6.28k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
8.42k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
8.42k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
8.42k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
8.42k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
8.42k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
8.42k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
8.42k
    _operator_profile->add_child(_common_profile.get(), true);
558
8.42k
    _operator_profile->add_child(_custom_profile.get(), true);
559
8.42k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
8.42k
    if constexpr (!is_fake_shared) {
561
8.42k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
8.42k
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
8.33k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
8.33k
            _dependency = _shared_state->create_source_dependency(
577
8.33k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
8.33k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
8.33k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
8.33k
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
96
        }
585
8.42k
    }
586
587
8.42k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
8.42k
    _rows_returned_counter =
592
8.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
8.42k
    _blocks_returned_counter =
594
8.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
8.42k
    _output_block_bytes_counter =
596
8.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
8.42k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
8.42k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
8.42k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
8.42k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
8.42k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
8.42k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
8.42k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
8.42k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
8.42k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
8.42k
    _memory_used_counter =
607
8.42k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
8.42k
    _common_profile->add_info_string("IsColocate",
609
8.42k
                                     std::to_string(_parent->is_colocated_operator()));
610
8.42k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
8.42k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
8.42k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
8.42k
    return Status::OK();
614
8.42k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
95.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
95.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
95.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
95.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
95.3k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
95.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
95.3k
    _operator_profile->add_child(_common_profile.get(), true);
558
95.3k
    _operator_profile->add_child(_custom_profile.get(), true);
559
95.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
95.3k
    if constexpr (!is_fake_shared) {
561
95.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
95.3k
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
93.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
93.9k
            _dependency = _shared_state->create_source_dependency(
577
93.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
93.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
93.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
93.9k
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
1.42k
        }
585
95.3k
    }
586
587
95.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
95.3k
    _rows_returned_counter =
592
95.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
95.3k
    _blocks_returned_counter =
594
95.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
95.3k
    _output_block_bytes_counter =
596
95.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
95.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
95.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
95.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
95.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
95.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
95.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
95.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
95.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
95.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
95.3k
    _memory_used_counter =
607
95.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
95.3k
    _common_profile->add_info_string("IsColocate",
609
95.3k
                                     std::to_string(_parent->is_colocated_operator()));
610
95.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
95.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
95.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
95.3k
    return Status::OK();
614
95.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
72.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
72.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
72.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
72.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
72.3k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
72.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
72.3k
    _operator_profile->add_child(_common_profile.get(), true);
558
72.3k
    _operator_profile->add_child(_custom_profile.get(), true);
559
72.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
72.3k
    if constexpr (!is_fake_shared) {
561
72.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
72.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
72.3k
                                    .first.get()
564
72.3k
                                    ->template cast<SharedStateArg>();
565
566
72.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
72.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
72.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
72.3k
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
0
            _dependency = _shared_state->create_source_dependency(
577
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
22
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
22
        }
585
72.3k
    }
586
587
72.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
72.3k
    _rows_returned_counter =
592
72.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
72.3k
    _blocks_returned_counter =
594
72.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
72.3k
    _output_block_bytes_counter =
596
72.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
72.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
72.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
72.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
72.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
72.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
72.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
72.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
72.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
72.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
72.3k
    _memory_used_counter =
607
72.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
72.3k
    _common_profile->add_info_string("IsColocate",
609
72.3k
                                     std::to_string(_parent->is_colocated_operator()));
610
72.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
72.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
72.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
72.3k
    return Status::OK();
614
72.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
117
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
117
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
117
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
117
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
117
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
117
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
117
    _operator_profile->add_child(_common_profile.get(), true);
558
117
    _operator_profile->add_child(_custom_profile.get(), true);
559
117
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
117
    if constexpr (!is_fake_shared) {
561
117
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
117
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
117
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
117
            _dependency = _shared_state->create_source_dependency(
577
117
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
117
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
117
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
117
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
0
        }
585
117
    }
586
587
117
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
117
    _rows_returned_counter =
592
117
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
117
    _blocks_returned_counter =
594
117
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
117
    _output_block_bytes_counter =
596
117
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
117
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
117
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
117
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
117
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
117
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
117
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
117
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
117
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
117
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
117
    _memory_used_counter =
607
117
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
117
    _common_profile->add_info_string("IsColocate",
609
117
                                     std::to_string(_parent->is_colocated_operator()));
610
117
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
117
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
117
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
117
    return Status::OK();
614
117
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
959k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
959k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
959k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
959k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
959k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
959k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
959k
    _operator_profile->add_child(_common_profile.get(), true);
558
959k
    _operator_profile->add_child(_custom_profile.get(), true);
559
959k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
    if constexpr (!is_fake_shared) {
561
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
                                    .first.get()
564
                                    ->template cast<SharedStateArg>();
565
566
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
            _dependency = _shared_state->create_source_dependency(
577
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
        }
585
    }
586
587
959k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
959k
    _rows_returned_counter =
592
959k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
959k
    _blocks_returned_counter =
594
959k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
959k
    _output_block_bytes_counter =
596
959k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
959k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
959k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
959k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
959k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
959k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
959k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
959k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
959k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
959k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
959k
    _memory_used_counter =
607
959k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
959k
    _common_profile->add_info_string("IsColocate",
609
959k
                                     std::to_string(_parent->is_colocated_operator()));
610
959k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
959k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
959k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
959k
    return Status::OK();
614
959k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
54.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
54.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
54.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
54.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
54.8k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
54.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
54.8k
    _operator_profile->add_child(_common_profile.get(), true);
558
54.8k
    _operator_profile->add_child(_custom_profile.get(), true);
559
54.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
54.8k
    if constexpr (!is_fake_shared) {
561
54.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
54.8k
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
4.14k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
4.14k
            _dependency = _shared_state->create_source_dependency(
577
4.14k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
4.14k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
4.14k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
50.6k
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
50.6k
        }
585
54.8k
    }
586
587
54.8k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
54.8k
    _rows_returned_counter =
592
54.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
54.8k
    _blocks_returned_counter =
594
54.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
54.8k
    _output_block_bytes_counter =
596
54.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
54.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
54.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
54.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
54.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
54.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
54.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
54.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
54.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
54.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
54.8k
    _memory_used_counter =
607
54.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
54.8k
    _common_profile->add_info_string("IsColocate",
609
54.8k
                                     std::to_string(_parent->is_colocated_operator()));
610
54.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
54.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
54.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
54.8k
    return Status::OK();
614
54.8k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
26
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
26
    _operator_profile->add_child(_common_profile.get(), true);
558
26
    _operator_profile->add_child(_custom_profile.get(), true);
559
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
26
    if constexpr (!is_fake_shared) {
561
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
26
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
26
            _dependency = _shared_state->create_source_dependency(
577
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
26
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
0
        }
585
26
    }
586
587
26
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
26
    _rows_returned_counter =
592
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
26
    _blocks_returned_counter =
594
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
26
    _output_block_bytes_counter =
596
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
26
    _memory_used_counter =
607
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
26
    _common_profile->add_info_string("IsColocate",
609
26
                                     std::to_string(_parent->is_colocated_operator()));
610
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
26
    return Status::OK();
614
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
6.22k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
6.22k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
6.22k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
6.22k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
6.22k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
6.22k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
6.22k
    _operator_profile->add_child(_common_profile.get(), true);
558
6.22k
    _operator_profile->add_child(_custom_profile.get(), true);
559
6.22k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
6.22k
    if constexpr (!is_fake_shared) {
561
6.22k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
6.22k
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
6.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
6.19k
            _dependency = _shared_state->create_source_dependency(
577
6.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
6.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
6.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
6.19k
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
30
        }
585
6.22k
    }
586
587
6.22k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
6.22k
    _rows_returned_counter =
592
6.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
6.22k
    _blocks_returned_counter =
594
6.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
6.22k
    _output_block_bytes_counter =
596
6.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
6.22k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
6.22k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
6.22k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
6.22k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
6.22k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
6.22k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
6.22k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
6.22k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
6.22k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
6.22k
    _memory_used_counter =
607
6.22k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
6.22k
    _common_profile->add_info_string("IsColocate",
609
6.22k
                                     std::to_string(_parent->is_colocated_operator()));
610
6.22k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
6.22k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
6.22k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
6.22k
    return Status::OK();
614
6.22k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
533
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
533
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
533
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
533
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
533
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
533
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
533
    _operator_profile->add_child(_common_profile.get(), true);
558
533
    _operator_profile->add_child(_custom_profile.get(), true);
559
533
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
533
    if constexpr (!is_fake_shared) {
561
533
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
533
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
531
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
531
            _dependency = _shared_state->create_source_dependency(
577
531
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
531
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
531
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
531
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
2
        }
585
533
    }
586
587
533
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
533
    _rows_returned_counter =
592
533
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
533
    _blocks_returned_counter =
594
533
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
533
    _output_block_bytes_counter =
596
533
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
533
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
533
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
533
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
533
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
533
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
533
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
533
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
533
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
533
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
533
    _memory_used_counter =
607
533
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
533
    _common_profile->add_info_string("IsColocate",
609
533
                                     std::to_string(_parent->is_colocated_operator()));
610
533
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
533
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
533
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
533
    return Status::OK();
614
533
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
5.04k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
5.04k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
5.04k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
5.04k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
5.04k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
5.04k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
5.04k
    _operator_profile->add_child(_common_profile.get(), true);
558
5.04k
    _operator_profile->add_child(_custom_profile.get(), true);
559
5.04k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
5.04k
    if constexpr (!is_fake_shared) {
561
5.04k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
5.04k
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
4.81k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
4.81k
            _dependency = _shared_state->create_source_dependency(
577
4.81k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
4.81k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
4.81k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
4.81k
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
228
        }
585
5.04k
    }
586
587
5.04k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
5.04k
    _rows_returned_counter =
592
5.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
5.04k
    _blocks_returned_counter =
594
5.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
5.04k
    _output_block_bytes_counter =
596
5.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
5.04k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
5.04k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
5.04k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
5.04k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
5.04k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
5.04k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
5.04k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
5.04k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
5.04k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
5.04k
    _memory_used_counter =
607
5.04k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
5.04k
    _common_profile->add_info_string("IsColocate",
609
5.04k
                                     std::to_string(_parent->is_colocated_operator()));
610
5.04k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
5.04k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
5.04k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
5.04k
    return Status::OK();
614
5.04k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
695k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
695k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
695k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
695k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
695k
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
695k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
695k
    _operator_profile->add_child(_common_profile.get(), true);
558
695k
    _operator_profile->add_child(_custom_profile.get(), true);
559
695k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
695k
    if constexpr (!is_fake_shared) {
561
695k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
690k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
690k
                                    .first.get()
564
690k
                                    ->template cast<SharedStateArg>();
565
566
690k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
690k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
690k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
690k
        } else if (info.shared_state) {
570
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
0
                DCHECK(false);
572
0
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
0
            _dependency = _shared_state->create_source_dependency(
577
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
5.80k
        } else {
581
5.80k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
5.80k
                DCHECK(false);
583
5.80k
            }
584
5.80k
        }
585
695k
    }
586
587
695k
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
695k
    _rows_returned_counter =
592
695k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
695k
    _blocks_returned_counter =
594
695k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
695k
    _output_block_bytes_counter =
596
695k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
695k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
695k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
695k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
695k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
695k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
695k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
695k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
695k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
695k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
695k
    _memory_used_counter =
607
695k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
695k
    _common_profile->add_info_string("IsColocate",
609
695k
                                     std::to_string(_parent->is_colocated_operator()));
610
695k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
695k
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
695k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
695k
    return Status::OK();
614
695k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
549
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
550
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
551
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
552
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
553
169
    _operator_profile->set_metadata(_parent->node_id());
554
    // indent is false so that source operator will have same
555
    // indentation_level with its parent operator.
556
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
557
169
    _operator_profile->add_child(_common_profile.get(), true);
558
169
    _operator_profile->add_child(_custom_profile.get(), true);
559
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
560
169
    if constexpr (!is_fake_shared) {
561
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
562
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
563
0
                                    .first.get()
564
0
                                    ->template cast<SharedStateArg>();
565
566
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
567
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
568
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
569
169
        } else if (info.shared_state) {
570
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
571
                DCHECK(false);
572
            }
573
            // For UnionSourceOperator without children, there is no shared state.
574
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
575
576
169
            _dependency = _shared_state->create_source_dependency(
577
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
578
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
579
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
580
169
        } else {
581
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
582
                DCHECK(false);
583
            }
584
0
        }
585
169
    }
586
587
169
    if (must_set_shared_state() && _shared_state == nullptr) {
588
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
589
0
    }
590
591
169
    _rows_returned_counter =
592
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
593
169
    _blocks_returned_counter =
594
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
595
169
    _output_block_bytes_counter =
596
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
597
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
598
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
599
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
600
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
601
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
602
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
603
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
604
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
605
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
606
169
    _memory_used_counter =
607
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
608
169
    _common_profile->add_info_string("IsColocate",
609
169
                                     std::to_string(_parent->is_colocated_operator()));
610
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
611
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
612
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
613
169
    return Status::OK();
614
169
}
615
616
template <typename SharedStateArg>
617
2.19M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
2.19M
    _conjuncts.resize(_parent->_conjuncts.size());
619
2.49M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
303k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
303k
    }
622
2.19M
    if (_parent->has_projection()) {
623
380k
        const auto& projection = *_parent->_projection;
624
380k
        _projections.resize(projection.projections.size());
625
2.37M
        for (size_t i = 0; i < _projections.size(); i++) {
626
1.99M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
1.99M
        }
628
380k
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
397k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
16.1k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
218k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
201k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
201k
                        state, _intermediate_projections[i][j]));
634
201k
            }
635
16.1k
        }
636
380k
    }
637
2.19M
    return Status::OK();
638
2.19M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
68.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
68.8k
    _conjuncts.resize(_parent->_conjuncts.size());
619
70.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
1.57k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
1.57k
    }
622
68.8k
    if (_parent->has_projection()) {
623
68.8k
        const auto& projection = *_parent->_projection;
624
68.8k
        _projections.resize(projection.projections.size());
625
366k
        for (size_t i = 0; i < _projections.size(); i++) {
626
297k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
297k
        }
628
68.8k
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
76.2k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
7.40k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
163k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
155k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
155k
                        state, _intermediate_projections[i][j]));
634
155k
            }
635
7.40k
        }
636
68.8k
    }
637
68.8k
    return Status::OK();
638
68.8k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
3
    _conjuncts.resize(_parent->_conjuncts.size());
619
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
0
    }
622
3
    if (_parent->has_projection()) {
623
0
        const auto& projection = *_parent->_projection;
624
0
        _projections.resize(projection.projections.size());
625
0
        for (size_t i = 0; i < _projections.size(); i++) {
626
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
0
        }
628
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
0
                        state, _intermediate_projections[i][j]));
634
0
            }
635
0
        }
636
0
    }
637
3
    return Status::OK();
638
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
211k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
211k
    _conjuncts.resize(_parent->_conjuncts.size());
619
211k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
0
    }
622
211k
    if (_parent->has_projection()) {
623
79
        const auto& projection = *_parent->_projection;
624
79
        _projections.resize(projection.projections.size());
625
400
        for (size_t i = 0; i < _projections.size(); i++) {
626
321
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
321
        }
628
79
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
79
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
0
                        state, _intermediate_projections[i][j]));
634
0
            }
635
0
        }
636
79
    }
637
211k
    return Status::OK();
638
211k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
22
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
22
    _conjuncts.resize(_parent->_conjuncts.size());
619
22
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
0
    }
622
22
    if (_parent->has_projection()) {
623
0
        const auto& projection = *_parent->_projection;
624
0
        _projections.resize(projection.projections.size());
625
0
        for (size_t i = 0; i < _projections.size(); i++) {
626
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
0
        }
628
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
0
                        state, _intermediate_projections[i][j]));
634
0
            }
635
0
        }
636
0
    }
637
22
    return Status::OK();
638
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
6.28k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
6.28k
    _conjuncts.resize(_parent->_conjuncts.size());
619
6.39k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
106
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
106
    }
622
6.29k
    if (_parent->has_projection()) {
623
6.29k
        const auto& projection = *_parent->_projection;
624
6.29k
        _projections.resize(projection.projections.size());
625
28.2k
        for (size_t i = 0; i < _projections.size(); i++) {
626
21.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
21.9k
        }
628
6.29k
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
6.31k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
25
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
196
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
171
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
171
                        state, _intermediate_projections[i][j]));
634
171
            }
635
25
        }
636
6.29k
    }
637
6.28k
    return Status::OK();
638
6.28k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
8.44k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
8.44k
    _conjuncts.resize(_parent->_conjuncts.size());
619
9.32k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
882
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
882
    }
622
8.44k
    if (_parent->has_projection()) {
623
4.96k
        const auto& projection = *_parent->_projection;
624
4.96k
        _projections.resize(projection.projections.size());
625
19.7k
        for (size_t i = 0; i < _projections.size(); i++) {
626
14.7k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
14.7k
        }
628
4.96k
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
5.05k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
87
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
656
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
569
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
569
                        state, _intermediate_projections[i][j]));
634
569
            }
635
87
        }
636
4.96k
    }
637
8.44k
    return Status::OK();
638
8.44k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
95.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
95.5k
    _conjuncts.resize(_parent->_conjuncts.size());
619
96.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
1.33k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
1.33k
    }
622
95.5k
    if (_parent->has_projection()) {
623
30.9k
        const auto& projection = *_parent->_projection;
624
30.9k
        _projections.resize(projection.projections.size());
625
278k
        for (size_t i = 0; i < _projections.size(); i++) {
626
247k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
247k
        }
628
30.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
31.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
197
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
1.30k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
1.11k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
1.11k
                        state, _intermediate_projections[i][j]));
634
1.11k
            }
635
197
        }
636
30.9k
    }
637
95.5k
    return Status::OK();
638
95.5k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
72.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
72.4k
    _conjuncts.resize(_parent->_conjuncts.size());
619
72.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
17
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
17
    }
622
72.4k
    if (_parent->has_projection()) {
623
130
        const auto& projection = *_parent->_projection;
624
130
        _projections.resize(projection.projections.size());
625
501
        for (size_t i = 0; i < _projections.size(); i++) {
626
371
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
371
        }
628
130
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
130
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
0
                        state, _intermediate_projections[i][j]));
634
0
            }
635
0
        }
636
130
    }
637
72.4k
    return Status::OK();
638
72.4k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
121
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
121
    _conjuncts.resize(_parent->_conjuncts.size());
619
121
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
0
    }
622
121
    if (_parent->has_projection()) {
623
104
        const auto& projection = *_parent->_projection;
624
104
        _projections.resize(projection.projections.size());
625
312
        for (size_t i = 0; i < _projections.size(); i++) {
626
208
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
208
        }
628
104
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
104
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
0
                        state, _intermediate_projections[i][j]));
634
0
            }
635
0
        }
636
104
    }
637
121
    return Status::OK();
638
121
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
962k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
962k
    _conjuncts.resize(_parent->_conjuncts.size());
619
1.26M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
297k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
297k
    }
622
962k
    if (_parent->has_projection()) {
623
257k
        const auto& projection = *_parent->_projection;
624
257k
        _projections.resize(projection.projections.size());
625
1.56M
        for (size_t i = 0; i < _projections.size(); i++) {
626
1.31M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
1.31M
        }
628
257k
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
266k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
8.34k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
50.3k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
41.9k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
41.9k
                        state, _intermediate_projections[i][j]));
634
41.9k
            }
635
8.34k
        }
636
257k
    }
637
962k
    return Status::OK();
638
962k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
54.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
54.9k
    _conjuncts.resize(_parent->_conjuncts.size());
619
54.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
0
    }
622
54.9k
    if (_parent->has_projection()) {
623
11.4k
        const auto& projection = *_parent->_projection;
624
11.4k
        _projections.resize(projection.projections.size());
625
110k
        for (size_t i = 0; i < _projections.size(); i++) {
626
99.1k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
99.1k
        }
628
11.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
11.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
133
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
2.36k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
2.22k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
2.22k
                        state, _intermediate_projections[i][j]));
634
2.22k
            }
635
133
        }
636
11.4k
    }
637
54.9k
    return Status::OK();
638
54.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
25
    _conjuncts.resize(_parent->_conjuncts.size());
619
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
0
    }
622
25
    if (_parent->has_projection()) {
623
0
        const auto& projection = *_parent->_projection;
624
0
        _projections.resize(projection.projections.size());
625
0
        for (size_t i = 0; i < _projections.size(); i++) {
626
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
0
        }
628
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
0
                        state, _intermediate_projections[i][j]));
634
0
            }
635
0
        }
636
0
    }
637
25
    return Status::OK();
638
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
6.19k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
6.19k
    _conjuncts.resize(_parent->_conjuncts.size());
619
7.31k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
1.12k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
1.12k
    }
622
6.19k
    if (_parent->has_projection()) {
623
0
        const auto& projection = *_parent->_projection;
624
0
        _projections.resize(projection.projections.size());
625
0
        for (size_t i = 0; i < _projections.size(); i++) {
626
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
0
        }
628
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
0
                        state, _intermediate_projections[i][j]));
634
0
            }
635
0
        }
636
0
    }
637
6.19k
    return Status::OK();
638
6.19k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
538
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
538
    _conjuncts.resize(_parent->_conjuncts.size());
619
538
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
0
    }
622
538
    if (_parent->has_projection()) {
623
0
        const auto& projection = *_parent->_projection;
624
0
        _projections.resize(projection.projections.size());
625
0
        for (size_t i = 0; i < _projections.size(); i++) {
626
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
0
        }
628
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
0
                        state, _intermediate_projections[i][j]));
634
0
            }
635
0
        }
636
0
    }
637
538
    return Status::OK();
638
538
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
5.09k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
5.09k
    _conjuncts.resize(_parent->_conjuncts.size());
619
5.09k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
0
    }
622
5.09k
    if (_parent->has_projection()) {
623
60
        const auto& projection = *_parent->_projection;
624
60
        _projections.resize(projection.projections.size());
625
228
        for (size_t i = 0; i < _projections.size(); i++) {
626
168
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
168
        }
628
60
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
60
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
0
                        state, _intermediate_projections[i][j]));
634
0
            }
635
0
        }
636
60
    }
637
5.09k
    return Status::OK();
638
5.09k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
698k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
698k
    _conjuncts.resize(_parent->_conjuncts.size());
619
698k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
0
    }
622
698k
    if (_parent->has_projection()) {
623
0
        const auto& projection = *_parent->_projection;
624
0
        _projections.resize(projection.projections.size());
625
0
        for (size_t i = 0; i < _projections.size(); i++) {
626
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
0
        }
628
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
0
                        state, _intermediate_projections[i][j]));
634
0
            }
635
0
        }
636
0
    }
637
698k
    return Status::OK();
638
698k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
617
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
618
169
    _conjuncts.resize(_parent->_conjuncts.size());
619
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
620
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
621
7
    }
622
169
    if (_parent->has_projection()) {
623
166
        const auto& projection = *_parent->_projection;
624
166
        _projections.resize(projection.projections.size());
625
491
        for (size_t i = 0; i < _projections.size(); i++) {
626
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
627
325
        }
628
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
629
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
630
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
631
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
632
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
633
8
                        state, _intermediate_projections[i][j]));
634
8
            }
635
3
        }
636
166
    }
637
169
    return Status::OK();
638
169
}
639
640
template <typename SharedStateArg>
641
6.48k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
6.48k
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
6.48k
    _terminated = true;
646
6.48k
    return Status::OK();
647
6.48k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
641
408
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
408
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
408
    _terminated = true;
646
408
    return Status::OK();
647
408
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
641
25
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
25
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
25
    _terminated = true;
646
25
    return Status::OK();
647
25
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
641
24
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
24
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
24
    _terminated = true;
646
24
    return Status::OK();
647
24
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
641
55
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
55
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
55
    _terminated = true;
646
55
    return Status::OK();
647
55
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
641
4.57k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
4.57k
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
4.57k
    _terminated = true;
646
4.57k
    return Status::OK();
647
4.57k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
641
61
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
61
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
61
    _terminated = true;
646
61
    return Status::OK();
647
61
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
641
11
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
11
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
11
    _terminated = true;
646
11
    return Status::OK();
647
11
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
641
132
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
132
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
132
    _terminated = true;
646
132
    return Status::OK();
647
132
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
641
1.15k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
1.15k
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
1.15k
    _terminated = true;
646
1.15k
    return Status::OK();
647
1.15k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
641
36
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
642
36
    if (_terminated) {
643
0
        return Status::OK();
644
0
    }
645
36
    _terminated = true;
646
36
    return Status::OK();
647
36
}
648
649
template <typename SharedStateArg>
650
2.43M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
2.43M
    if (_closed) {
652
241k
        return Status::OK();
653
241k
    }
654
2.19M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
1.22M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
1.22M
    }
657
2.19M
    _closed = true;
658
2.19M
    return Status::OK();
659
2.43M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
68.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
68.7k
    if (_closed) {
652
0
        return Status::OK();
653
0
    }
654
68.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
68.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
68.7k
    }
657
68.7k
    _closed = true;
658
68.7k
    return Status::OK();
659
68.7k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
4
    if (_closed) {
652
0
        return Status::OK();
653
0
    }
654
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
4
    }
657
4
    _closed = true;
658
4
    return Status::OK();
659
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
419k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
419k
    if (_closed) {
652
210k
        return Status::OK();
653
210k
    }
654
209k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
209k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
209k
    }
657
209k
    _closed = true;
658
209k
    return Status::OK();
659
419k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
22
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
22
    if (_closed) {
652
0
        return Status::OK();
653
0
    }
654
22
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
22
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
22
    }
657
22
    _closed = true;
658
22
    return Status::OK();
659
22
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
6.28k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
6.28k
    if (_closed) {
652
0
        return Status::OK();
653
0
    }
654
6.28k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
6.28k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
6.28k
    }
657
6.28k
    _closed = true;
658
6.28k
    return Status::OK();
659
6.28k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
17.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
17.1k
    if (_closed) {
652
8.75k
        return Status::OK();
653
8.75k
    }
654
8.41k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
8.41k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
8.41k
    }
657
8.41k
    _closed = true;
658
8.41k
    return Status::OK();
659
17.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
95.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
95.3k
    if (_closed) {
652
0
        return Status::OK();
653
0
    }
654
95.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
95.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
95.3k
    }
657
95.3k
    _closed = true;
658
95.3k
    return Status::OK();
659
95.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
72.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
72.0k
    if (_closed) {
652
0
        return Status::OK();
653
0
    }
654
72.0k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
72.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
72.0k
    }
657
72.0k
    _closed = true;
658
72.0k
    return Status::OK();
659
72.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
116
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
116
    if (_closed) {
652
0
        return Status::OK();
653
0
    }
654
116
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
116
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
116
    }
657
116
    _closed = true;
658
116
    return Status::OK();
659
116
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
979k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
979k
    if (_closed) {
652
16.3k
        return Status::OK();
653
16.3k
    }
654
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
    }
657
963k
    _closed = true;
658
963k
    return Status::OK();
659
979k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
54.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
54.9k
    if (_closed) {
652
0
        return Status::OK();
653
0
    }
654
54.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
54.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
54.9k
    }
657
54.9k
    _closed = true;
658
54.9k
    return Status::OK();
659
54.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
28
    if (_closed) {
652
14
        return Status::OK();
653
14
    }
654
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
14
    }
657
14
    _closed = true;
658
14
    return Status::OK();
659
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
6.20k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
6.20k
    if (_closed) {
652
0
        return Status::OK();
653
0
    }
654
6.20k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
6.20k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
6.20k
    }
657
6.20k
    _closed = true;
658
6.20k
    return Status::OK();
659
6.20k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
868
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
868
    if (_closed) {
652
436
        return Status::OK();
653
436
    }
654
432
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
432
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
432
    }
657
432
    _closed = true;
658
432
    return Status::OK();
659
868
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
10.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
10.4k
    if (_closed) {
652
5.37k
        return Status::OK();
653
5.37k
    }
654
5.07k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
5.07k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
5.07k
    }
657
5.07k
    _closed = true;
658
5.07k
    return Status::OK();
659
10.4k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
700k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
700k
    if (_closed) {
652
0
        return Status::OK();
653
0
    }
654
700k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
700k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
700k
    }
657
700k
    _closed = true;
658
700k
    return Status::OK();
659
700k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
650
334
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
651
334
    if (_closed) {
652
174
        return Status::OK();
653
174
    }
654
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
655
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
656
160
    }
657
160
    _closed = true;
658
160
    return Status::OK();
659
334
}
660
661
template <typename SharedState>
662
1.80M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
1.80M
    _operator_profile =
665
1.80M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
1.80M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
1.80M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
1.80M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
1.80M
    _operator_profile->add_child(_common_profile, true);
674
1.80M
    _operator_profile->add_child(_custom_profile, true);
675
676
1.80M
    _operator_profile->set_metadata(_parent->node_id());
677
1.80M
    _wait_for_finish_dependency_timer =
678
1.80M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
1.80M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
1.80M
    if constexpr (!is_fake_shared) {
681
1.27M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
1.27M
            info.shared_state_map.end()) {
683
365k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
281k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
281k
            }
686
365k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
365k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
365k
                                                  ? 0
689
365k
                                                  : info.task_idx]
690
365k
                                  .get();
691
365k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
905k
        } else {
693
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
18.4E
                DCHECK(false);
695
18.4E
            }
696
905k
            _shared_state = info.shared_state->template cast<SharedState>();
697
905k
            _dependency = _shared_state->create_sink_dependency(
698
905k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
905k
        }
700
1.27M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
1.27M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
1.27M
    }
703
704
1.80M
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
1.80M
    _rows_input_counter =
709
1.80M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
1.80M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
1.80M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
1.80M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
1.80M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
1.80M
    _memory_used_counter =
715
1.80M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
1.80M
    _common_profile->add_info_string("IsColocate",
717
1.80M
                                     std::to_string(_parent->is_colocated_operator()));
718
1.80M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
1.80M
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
1.80M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
1.80M
    return Status::OK();
722
1.80M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
116k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
116k
    _operator_profile =
665
116k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
116k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
116k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
116k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
116k
    _operator_profile->add_child(_common_profile, true);
674
116k
    _operator_profile->add_child(_custom_profile, true);
675
676
116k
    _operator_profile->set_metadata(_parent->node_id());
677
116k
    _wait_for_finish_dependency_timer =
678
116k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
116k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
116k
    if constexpr (!is_fake_shared) {
681
116k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
116k
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
11.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
11.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
11.9k
                                                  ? 0
689
11.9k
                                                  : info.task_idx]
690
11.9k
                                  .get();
691
11.9k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
104k
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
104k
            _shared_state = info.shared_state->template cast<SharedState>();
697
104k
            _dependency = _shared_state->create_sink_dependency(
698
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
104k
        }
700
116k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
116k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
116k
    }
703
704
116k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
116k
    _rows_input_counter =
709
116k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
116k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
116k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
116k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
116k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
116k
    _memory_used_counter =
715
116k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
116k
    _common_profile->add_info_string("IsColocate",
717
116k
                                     std::to_string(_parent->is_colocated_operator()));
718
116k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
116k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
116k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
116k
    return Status::OK();
722
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
2
    _operator_profile =
665
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
2
    _operator_profile->add_child(_common_profile, true);
674
2
    _operator_profile->add_child(_custom_profile, true);
675
676
2
    _operator_profile->set_metadata(_parent->node_id());
677
2
    _wait_for_finish_dependency_timer =
678
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
2
    if constexpr (!is_fake_shared) {
681
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
2
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
2
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
2
            _shared_state = info.shared_state->template cast<SharedState>();
697
2
            _dependency = _shared_state->create_sink_dependency(
698
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
2
        }
700
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
2
    }
703
704
2
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
2
    _rows_input_counter =
709
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
2
    _memory_used_counter =
715
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
2
    _common_profile->add_info_string("IsColocate",
717
2
                                     std::to_string(_parent->is_colocated_operator()));
718
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
2
    return Status::OK();
722
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
210k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
210k
    _operator_profile =
665
210k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
210k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
210k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
210k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
210k
    _operator_profile->add_child(_common_profile, true);
674
210k
    _operator_profile->add_child(_custom_profile, true);
675
676
210k
    _operator_profile->set_metadata(_parent->node_id());
677
210k
    _wait_for_finish_dependency_timer =
678
210k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
210k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
210k
    if constexpr (!is_fake_shared) {
681
210k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
210k
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
210k
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
210k
            _shared_state = info.shared_state->template cast<SharedState>();
697
210k
            _dependency = _shared_state->create_sink_dependency(
698
210k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
210k
        }
700
210k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
210k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
210k
    }
703
704
210k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
210k
    _rows_input_counter =
709
210k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
210k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
210k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
210k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
210k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
210k
    _memory_used_counter =
715
210k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
210k
    _common_profile->add_info_string("IsColocate",
717
210k
                                     std::to_string(_parent->is_colocated_operator()));
718
210k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
210k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
210k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
210k
    return Status::OK();
722
210k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
29
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
29
    _operator_profile =
665
29
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
29
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
29
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
29
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
29
    _operator_profile->add_child(_common_profile, true);
674
29
    _operator_profile->add_child(_custom_profile, true);
675
676
29
    _operator_profile->set_metadata(_parent->node_id());
677
29
    _wait_for_finish_dependency_timer =
678
29
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
29
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
29
    if constexpr (!is_fake_shared) {
681
29
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
29
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
29
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
29
            _shared_state = info.shared_state->template cast<SharedState>();
697
29
            _dependency = _shared_state->create_sink_dependency(
698
29
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
29
        }
700
29
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
29
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
29
    }
703
704
29
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
29
    _rows_input_counter =
709
29
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
29
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
29
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
29
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
29
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
29
    _memory_used_counter =
715
29
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
29
    _common_profile->add_info_string("IsColocate",
717
29
                                     std::to_string(_parent->is_colocated_operator()));
718
29
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
29
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
29
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
29
    return Status::OK();
722
29
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
6.28k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
6.28k
    _operator_profile =
665
6.28k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
6.28k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
6.28k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
6.28k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
6.28k
    _operator_profile->add_child(_common_profile, true);
674
6.28k
    _operator_profile->add_child(_custom_profile, true);
675
676
6.28k
    _operator_profile->set_metadata(_parent->node_id());
677
6.28k
    _wait_for_finish_dependency_timer =
678
6.28k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
6.28k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
6.28k
    if constexpr (!is_fake_shared) {
681
6.28k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
6.28k
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
6.28k
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
6.28k
            _shared_state = info.shared_state->template cast<SharedState>();
697
6.28k
            _dependency = _shared_state->create_sink_dependency(
698
6.28k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
6.28k
        }
700
6.28k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
6.28k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
6.28k
    }
703
704
6.28k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
6.28k
    _rows_input_counter =
709
6.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
6.28k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
6.28k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
6.28k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
6.28k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
6.28k
    _memory_used_counter =
715
6.28k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
6.28k
    _common_profile->add_info_string("IsColocate",
717
6.28k
                                     std::to_string(_parent->is_colocated_operator()));
718
6.28k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
6.28k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
6.28k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
6.28k
    return Status::OK();
722
6.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
8.41k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
8.41k
    _operator_profile =
665
8.41k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
8.41k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
8.41k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
8.41k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
8.41k
    _operator_profile->add_child(_common_profile, true);
674
8.41k
    _operator_profile->add_child(_custom_profile, true);
675
676
8.41k
    _operator_profile->set_metadata(_parent->node_id());
677
8.41k
    _wait_for_finish_dependency_timer =
678
8.41k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
8.41k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
8.41k
    if constexpr (!is_fake_shared) {
681
8.41k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
8.41k
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
8.41k
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
8.41k
            _shared_state = info.shared_state->template cast<SharedState>();
697
8.41k
            _dependency = _shared_state->create_sink_dependency(
698
8.41k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
8.41k
        }
700
8.41k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
8.41k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
8.41k
    }
703
704
8.41k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
8.41k
    _rows_input_counter =
709
8.41k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
8.41k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
8.41k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
8.41k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
8.41k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
8.41k
    _memory_used_counter =
715
8.41k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
8.41k
    _common_profile->add_info_string("IsColocate",
717
8.41k
                                     std::to_string(_parent->is_colocated_operator()));
718
8.41k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
8.41k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
8.41k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
8.41k
    return Status::OK();
722
8.41k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
95.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
95.3k
    _operator_profile =
665
95.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
95.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
95.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
95.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
95.3k
    _operator_profile->add_child(_common_profile, true);
674
95.3k
    _operator_profile->add_child(_custom_profile, true);
675
676
95.3k
    _operator_profile->set_metadata(_parent->node_id());
677
95.3k
    _wait_for_finish_dependency_timer =
678
95.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
95.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
95.3k
    if constexpr (!is_fake_shared) {
681
95.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
95.3k
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
95.3k
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
95.3k
            _shared_state = info.shared_state->template cast<SharedState>();
697
95.3k
            _dependency = _shared_state->create_sink_dependency(
698
95.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
95.3k
        }
700
95.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
95.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
95.3k
    }
703
704
95.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
95.3k
    _rows_input_counter =
709
95.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
95.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
95.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
95.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
95.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
95.3k
    _memory_used_counter =
715
95.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
95.3k
    _common_profile->add_info_string("IsColocate",
717
95.3k
                                     std::to_string(_parent->is_colocated_operator()));
718
95.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
95.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
95.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
95.3k
    return Status::OK();
722
95.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
72.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
72.3k
    _operator_profile =
665
72.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
72.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
72.3k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
72.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
72.3k
    _operator_profile->add_child(_common_profile, true);
674
72.3k
    _operator_profile->add_child(_custom_profile, true);
675
676
72.3k
    _operator_profile->set_metadata(_parent->node_id());
677
72.3k
    _wait_for_finish_dependency_timer =
678
72.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
72.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
72.3k
    if constexpr (!is_fake_shared) {
681
72.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
72.3k
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
72.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
72.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
72.2k
                                                  ? 0
689
72.2k
                                                  : info.task_idx]
690
72.2k
                                  .get();
691
72.2k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
72.2k
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
23
            _shared_state = info.shared_state->template cast<SharedState>();
697
23
            _dependency = _shared_state->create_sink_dependency(
698
23
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
23
        }
700
72.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
72.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
72.3k
    }
703
704
72.3k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
72.3k
    _rows_input_counter =
709
72.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
72.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
72.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
72.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
72.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
72.3k
    _memory_used_counter =
715
72.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
72.3k
    _common_profile->add_info_string("IsColocate",
717
72.3k
                                     std::to_string(_parent->is_colocated_operator()));
718
72.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
72.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
72.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
72.3k
    return Status::OK();
722
72.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
127
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
127
    _operator_profile =
665
127
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
127
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
127
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
127
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
127
    _operator_profile->add_child(_common_profile, true);
674
127
    _operator_profile->add_child(_custom_profile, true);
675
676
127
    _operator_profile->set_metadata(_parent->node_id());
677
127
    _wait_for_finish_dependency_timer =
678
127
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
127
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
127
    if constexpr (!is_fake_shared) {
681
127
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
127
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
127
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
127
            _shared_state = info.shared_state->template cast<SharedState>();
697
127
            _dependency = _shared_state->create_sink_dependency(
698
127
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
127
        }
700
127
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
127
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
127
    }
703
704
127
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
127
    _rows_input_counter =
709
127
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
127
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
127
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
127
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
127
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
127
    _memory_used_counter =
715
127
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
127
    _common_profile->add_info_string("IsColocate",
717
127
                                     std::to_string(_parent->is_colocated_operator()));
718
127
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
127
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
127
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
127
    return Status::OK();
722
127
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
531k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
531k
    _operator_profile =
665
531k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
531k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
531k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
531k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
531k
    _operator_profile->add_child(_common_profile, true);
674
531k
    _operator_profile->add_child(_custom_profile, true);
675
676
531k
    _operator_profile->set_metadata(_parent->node_id());
677
531k
    _wait_for_finish_dependency_timer =
678
531k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
531k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
    if constexpr (!is_fake_shared) {
681
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
                                                  ? 0
689
                                                  : info.task_idx]
690
                                  .get();
691
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
            _shared_state = info.shared_state->template cast<SharedState>();
697
            _dependency = _shared_state->create_sink_dependency(
698
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
        }
700
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
    }
703
704
531k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
531k
    _rows_input_counter =
709
531k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
531k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
531k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
531k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
531k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
531k
    _memory_used_counter =
715
531k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
531k
    _common_profile->add_info_string("IsColocate",
717
531k
                                     std::to_string(_parent->is_colocated_operator()));
718
531k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
531k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
531k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
531k
    return Status::OK();
722
531k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
9.28k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
9.28k
    _operator_profile =
665
9.28k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
9.28k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
9.28k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
9.28k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
9.28k
    _operator_profile->add_child(_common_profile, true);
674
9.28k
    _operator_profile->add_child(_custom_profile, true);
675
676
9.28k
    _operator_profile->set_metadata(_parent->node_id());
677
9.28k
    _wait_for_finish_dependency_timer =
678
9.28k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
9.28k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
9.28k
    if constexpr (!is_fake_shared) {
681
9.28k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
9.28k
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
9.28k
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
9.28k
            _shared_state = info.shared_state->template cast<SharedState>();
697
9.28k
            _dependency = _shared_state->create_sink_dependency(
698
9.28k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
9.28k
        }
700
9.28k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
9.28k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
9.28k
    }
703
704
9.28k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
9.28k
    _rows_input_counter =
709
9.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
9.28k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
9.28k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
9.28k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
9.28k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
9.28k
    _memory_used_counter =
715
9.28k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
9.28k
    _common_profile->add_info_string("IsColocate",
717
9.28k
                                     std::to_string(_parent->is_colocated_operator()));
718
9.28k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
9.28k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
9.28k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
9.28k
    return Status::OK();
722
9.28k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
536
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
536
    _operator_profile =
665
536
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
536
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
536
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
536
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
536
    _operator_profile->add_child(_common_profile, true);
674
536
    _operator_profile->add_child(_custom_profile, true);
675
676
536
    _operator_profile->set_metadata(_parent->node_id());
677
536
    _wait_for_finish_dependency_timer =
678
536
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
536
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
536
    if constexpr (!is_fake_shared) {
681
536
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
536
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
536
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
536
            _shared_state = info.shared_state->template cast<SharedState>();
697
536
            _dependency = _shared_state->create_sink_dependency(
698
536
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
536
        }
700
536
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
536
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
536
    }
703
704
536
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
536
    _rows_input_counter =
709
536
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
536
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
536
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
536
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
536
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
536
    _memory_used_counter =
715
536
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
536
    _common_profile->add_info_string("IsColocate",
717
536
                                     std::to_string(_parent->is_colocated_operator()));
718
536
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
536
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
536
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
536
    return Status::OK();
722
536
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
2.41k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
2.41k
    _operator_profile =
665
2.41k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
2.41k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
2.41k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
2.41k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
2.41k
    _operator_profile->add_child(_common_profile, true);
674
2.41k
    _operator_profile->add_child(_custom_profile, true);
675
676
2.41k
    _operator_profile->set_metadata(_parent->node_id());
677
2.41k
    _wait_for_finish_dependency_timer =
678
2.41k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
2.41k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
2.41k
    if constexpr (!is_fake_shared) {
681
2.41k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
2.41k
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
2.41k
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
2.41k
            _shared_state = info.shared_state->template cast<SharedState>();
697
2.41k
            _dependency = _shared_state->create_sink_dependency(
698
2.41k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
2.41k
        }
700
2.41k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
2.41k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
2.41k
    }
703
704
2.41k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
2.41k
    _rows_input_counter =
709
2.41k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
2.41k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
2.41k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
2.41k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
2.41k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
2.41k
    _memory_used_counter =
715
2.41k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
2.41k
    _common_profile->add_info_string("IsColocate",
717
2.41k
                                     std::to_string(_parent->is_colocated_operator()));
718
2.41k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
2.41k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
2.41k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
2.41k
    return Status::OK();
722
2.41k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
12.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
12.2k
    _operator_profile =
665
12.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
12.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
12.2k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
12.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
12.2k
    _operator_profile->add_child(_common_profile, true);
674
12.2k
    _operator_profile->add_child(_custom_profile, true);
675
676
12.2k
    _operator_profile->set_metadata(_parent->node_id());
677
12.2k
    _wait_for_finish_dependency_timer =
678
12.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
12.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
12.2k
    if constexpr (!is_fake_shared) {
681
12.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
12.2k
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
12.2k
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
12.2k
            _shared_state = info.shared_state->template cast<SharedState>();
697
12.2k
            _dependency = _shared_state->create_sink_dependency(
698
12.2k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
12.2k
        }
700
12.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
12.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
12.2k
    }
703
704
12.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
12.2k
    _rows_input_counter =
709
12.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
12.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
12.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
12.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
12.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
12.2k
    _memory_used_counter =
715
12.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
12.2k
    _common_profile->add_info_string("IsColocate",
717
12.2k
                                     std::to_string(_parent->is_colocated_operator()));
718
12.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
12.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
12.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
12.2k
    return Status::OK();
722
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
281k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
281k
    _operator_profile =
665
281k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
281k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
281k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
281k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
281k
    _operator_profile->add_child(_common_profile, true);
674
281k
    _operator_profile->add_child(_custom_profile, true);
675
676
281k
    _operator_profile->set_metadata(_parent->node_id());
677
281k
    _wait_for_finish_dependency_timer =
678
281k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
281k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
281k
    if constexpr (!is_fake_shared) {
681
281k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
281k
            info.shared_state_map.end()) {
683
281k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
281k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
281k
            }
686
281k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
281k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
281k
                                                  ? 0
689
281k
                                                  : info.task_idx]
690
281k
                                  .get();
691
281k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
18.4E
        } else {
693
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
18.4E
                DCHECK(false);
695
18.4E
            }
696
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
697
18.4E
            _dependency = _shared_state->create_sink_dependency(
698
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
18.4E
        }
700
281k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
281k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
281k
    }
703
704
281k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
281k
    _rows_input_counter =
709
281k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
281k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
281k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
281k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
281k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
281k
    _memory_used_counter =
715
281k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
281k
    _common_profile->add_info_string("IsColocate",
717
281k
                                     std::to_string(_parent->is_colocated_operator()));
718
281k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
281k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
281k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
281k
    return Status::OK();
722
281k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
454k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
454k
    _operator_profile =
665
454k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
454k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
454k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
454k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
454k
    _operator_profile->add_child(_common_profile, true);
674
454k
    _operator_profile->add_child(_custom_profile, true);
675
676
454k
    _operator_profile->set_metadata(_parent->node_id());
677
454k
    _wait_for_finish_dependency_timer =
678
454k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
454k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
454k
    if constexpr (!is_fake_shared) {
681
454k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
454k
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
454k
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
454k
            _shared_state = info.shared_state->template cast<SharedState>();
697
454k
            _dependency = _shared_state->create_sink_dependency(
698
454k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
454k
        }
700
454k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
454k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
454k
    }
703
704
454k
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
454k
    _rows_input_counter =
709
454k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
454k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
454k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
454k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
454k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
454k
    _memory_used_counter =
715
454k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
454k
    _common_profile->add_info_string("IsColocate",
717
454k
                                     std::to_string(_parent->is_colocated_operator()));
718
454k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
454k
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
454k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
454k
    return Status::OK();
722
454k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
25
    _operator_profile =
665
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
25
    _operator_profile->add_child(_common_profile, true);
674
25
    _operator_profile->add_child(_custom_profile, true);
675
676
25
    _operator_profile->set_metadata(_parent->node_id());
677
25
    _wait_for_finish_dependency_timer =
678
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
25
    if constexpr (!is_fake_shared) {
681
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
25
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
25
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
25
            _shared_state = info.shared_state->template cast<SharedState>();
697
25
            _dependency = _shared_state->create_sink_dependency(
698
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
25
        }
700
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
25
    }
703
704
25
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
25
    _rows_input_counter =
709
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
25
    _memory_used_counter =
715
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
25
    _common_profile->add_info_string("IsColocate",
717
25
                                     std::to_string(_parent->is_colocated_operator()));
718
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
25
    return Status::OK();
722
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
662
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
663
    // create profile
664
338
    _operator_profile =
665
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
666
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
667
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
668
669
    // indentation is true
670
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
671
    // So we should set the indentation to true.
672
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
673
338
    _operator_profile->add_child(_common_profile, true);
674
338
    _operator_profile->add_child(_custom_profile, true);
675
676
338
    _operator_profile->set_metadata(_parent->node_id());
677
338
    _wait_for_finish_dependency_timer =
678
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
679
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
680
338
    if constexpr (!is_fake_shared) {
681
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
682
338
            info.shared_state_map.end()) {
683
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
684
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
685
            }
686
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
687
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
688
0
                                                  ? 0
689
0
                                                  : info.task_idx]
690
0
                                  .get();
691
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
692
338
        } else {
693
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
694
                DCHECK(false);
695
            }
696
338
            _shared_state = info.shared_state->template cast<SharedState>();
697
338
            _dependency = _shared_state->create_sink_dependency(
698
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
699
338
        }
700
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
701
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
702
338
    }
703
704
338
    if (must_set_shared_state() && _shared_state == nullptr) {
705
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
706
0
    }
707
708
338
    _rows_input_counter =
709
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
710
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
711
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
712
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
713
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
714
338
    _memory_used_counter =
715
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
716
338
    _common_profile->add_info_string("IsColocate",
717
338
                                     std::to_string(_parent->is_colocated_operator()));
718
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
719
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
720
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
721
338
    return Status::OK();
722
338
}
723
724
template <typename SharedState>
725
1.80M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
1.80M
    if (_closed) {
727
2
        return Status::OK();
728
2
    }
729
1.80M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
1.27M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
1.27M
    }
732
1.80M
    _closed = true;
733
1.80M
    return Status::OK();
734
1.80M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
116k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
116k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
116k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
116k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
116k
    }
732
116k
    _closed = true;
733
116k
    return Status::OK();
734
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
1
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
1
    }
732
1
    _closed = true;
733
1
    return Status::OK();
734
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
210k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
210k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
210k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
210k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
210k
    }
732
210k
    _closed = true;
733
210k
    return Status::OK();
734
210k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
20
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
20
    if (_closed) {
727
2
        return Status::OK();
728
2
    }
729
18
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
18
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
18
    }
732
18
    _closed = true;
733
18
    return Status::OK();
734
20
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
6.27k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
6.27k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
6.27k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
6.27k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
6.27k
    }
732
6.27k
    _closed = true;
733
6.27k
    return Status::OK();
734
6.27k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
8.41k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
8.41k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
8.41k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
8.41k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
8.41k
    }
732
8.41k
    _closed = true;
733
8.41k
    return Status::OK();
734
8.41k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
95.2k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
95.2k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
95.2k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
95.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
95.2k
    }
732
95.2k
    _closed = true;
733
95.2k
    return Status::OK();
734
95.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
72.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
72.1k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
72.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
72.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
72.1k
    }
732
72.1k
    _closed = true;
733
72.1k
    return Status::OK();
734
72.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
116
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
116
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
116
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
116
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
116
    }
732
116
    _closed = true;
733
116
    return Status::OK();
734
116
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
534k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
534k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
    }
732
534k
    _closed = true;
733
534k
    return Status::OK();
734
534k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
9.30k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
9.30k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
9.30k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
9.30k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
9.30k
    }
732
9.30k
    _closed = true;
733
9.30k
    return Status::OK();
734
9.30k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
432
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
432
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
432
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
432
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
432
    }
732
432
    _closed = true;
733
432
    return Status::OK();
734
432
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
2.42k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
2.42k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
2.42k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
2.42k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
2.42k
    }
732
2.42k
    _closed = true;
733
2.42k
    return Status::OK();
734
2.42k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
12.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
12.3k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
12.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
12.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
12.3k
    }
732
12.3k
    _closed = true;
733
12.3k
    return Status::OK();
734
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
282k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
282k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
282k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
282k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
282k
    }
732
282k
    _closed = true;
733
282k
    return Status::OK();
734
282k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
456k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
456k
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
456k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
456k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
456k
    }
732
456k
    _closed = true;
733
456k
    return Status::OK();
734
456k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
14
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
14
    }
732
14
    _closed = true;
733
14
    return Status::OK();
734
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
725
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
726
338
    if (_closed) {
727
0
        return Status::OK();
728
0
    }
729
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
730
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
731
338
    }
732
338
    _closed = true;
733
338
    return Status::OK();
734
338
}
735
736
template <typename LocalStateType>
737
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
738
7.05k
                                                          bool* eos) {
739
7.05k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
740
7.04k
    return pull(state, block, eos);
741
7.05k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
37
                                                          bool* eos) {
739
37
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
740
37
    return pull(state, block, eos);
741
37
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
738
7.01k
                                                          bool* eos) {
739
7.01k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
740
7.01k
    return pull(state, block, eos);
741
7.01k
}
742
743
template <typename LocalStateType>
744
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
745
608k
                                                         bool* eos) {
746
608k
    auto& local_state = get_local_state(state);
747
608k
    if (need_more_input_data(state)) {
748
578k
        local_state._child_block->clear_column_data(
749
578k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
750
578k
                        .num_materialized_slots());
751
578k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
752
578k
                state, local_state._child_block.get(), &local_state._child_eos));
753
578k
        *eos = local_state._child_eos;
754
578k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
755
75.0k
            return Status::OK();
756
75.0k
        }
757
503k
        {
758
503k
            SCOPED_TIMER(local_state.exec_time_counter());
759
503k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
760
503k
        }
761
503k
    }
762
763
533k
    if (!need_more_input_data(state)) {
764
504k
        SCOPED_TIMER(local_state.exec_time_counter());
765
504k
        bool new_eos = false;
766
504k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
767
504k
        if (new_eos) {
768
427k
            *eos = true;
769
427k
        } else if (!need_more_input_data(state)) {
770
23.6k
            *eos = false;
771
23.6k
        }
772
504k
    }
773
533k
    return Status::OK();
774
533k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
745
138k
                                                         bool* eos) {
746
138k
    auto& local_state = get_local_state(state);
747
138k
    if (need_more_input_data(state)) {
748
119k
        local_state._child_block->clear_column_data(
749
119k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
750
119k
                        .num_materialized_slots());
751
119k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
752
119k
                state, local_state._child_block.get(), &local_state._child_eos));
753
119k
        *eos = local_state._child_eos;
754
119k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
755
36.3k
            return Status::OK();
756
36.3k
        }
757
83.3k
        {
758
83.3k
            SCOPED_TIMER(local_state.exec_time_counter());
759
83.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
760
83.3k
        }
761
83.3k
    }
762
763
101k
    if (!need_more_input_data(state)) {
764
101k
        SCOPED_TIMER(local_state.exec_time_counter());
765
101k
        bool new_eos = false;
766
101k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
767
101k
        if (new_eos) {
768
44.5k
            *eos = true;
769
57.2k
        } else if (!need_more_input_data(state)) {
770
10.9k
            *eos = false;
771
10.9k
        }
772
101k
    }
773
101k
    return Status::OK();
774
101k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
745
4.27k
                                                         bool* eos) {
746
4.27k
    auto& local_state = get_local_state(state);
747
4.27k
    if (need_more_input_data(state)) {
748
2.25k
        local_state._child_block->clear_column_data(
749
2.25k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
750
2.25k
                        .num_materialized_slots());
751
2.25k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
752
2.25k
                state, local_state._child_block.get(), &local_state._child_eos));
753
2.25k
        *eos = local_state._child_eos;
754
2.25k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
755
311
            return Status::OK();
756
311
        }
757
1.93k
        {
758
1.93k
            SCOPED_TIMER(local_state.exec_time_counter());
759
1.93k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
760
1.93k
        }
761
1.93k
    }
762
763
3.99k
    if (!need_more_input_data(state)) {
764
3.99k
        SCOPED_TIMER(local_state.exec_time_counter());
765
3.99k
        bool new_eos = false;
766
3.99k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
767
3.99k
        if (new_eos) {
768
1.39k
            *eos = true;
769
2.59k
        } else if (!need_more_input_data(state)) {
770
2.02k
            *eos = false;
771
2.02k
        }
772
3.99k
    }
773
3.96k
    return Status::OK();
774
3.96k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
745
1.87k
                                                         bool* eos) {
746
1.87k
    auto& local_state = get_local_state(state);
747
1.87k
    if (need_more_input_data(state)) {
748
1.87k
        local_state._child_block->clear_column_data(
749
1.87k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
750
1.87k
                        .num_materialized_slots());
751
1.87k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
752
1.87k
                state, local_state._child_block.get(), &local_state._child_eos));
753
1.87k
        *eos = local_state._child_eos;
754
1.87k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
755
776
            return Status::OK();
756
776
        }
757
1.09k
        {
758
1.09k
            SCOPED_TIMER(local_state.exec_time_counter());
759
1.09k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
760
1.09k
        }
761
1.09k
    }
762
763
1.09k
    if (!need_more_input_data(state)) {
764
1.09k
        SCOPED_TIMER(local_state.exec_time_counter());
765
1.09k
        bool new_eos = false;
766
1.09k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
767
1.09k
        if (new_eos) {
768
785
            *eos = true;
769
785
        } else if (!need_more_input_data(state)) {
770
0
            *eos = false;
771
0
        }
772
1.09k
    }
773
1.09k
    return Status::OK();
774
1.09k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
745
16.3k
                                                         bool* eos) {
746
16.3k
    auto& local_state = get_local_state(state);
747
16.3k
    if (need_more_input_data(state)) {
748
16.3k
        local_state._child_block->clear_column_data(
749
16.3k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
750
16.3k
                        .num_materialized_slots());
751
16.3k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
752
16.3k
                state, local_state._child_block.get(), &local_state._child_eos));
753
16.3k
        *eos = local_state._child_eos;
754
16.3k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
755
4.28k
            return Status::OK();
756
4.28k
        }
757
12.0k
        {
758
12.0k
            SCOPED_TIMER(local_state.exec_time_counter());
759
12.0k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
760
12.0k
        }
761
12.0k
    }
762
763
12.0k
    if (!need_more_input_data(state)) {
764
5.90k
        SCOPED_TIMER(local_state.exec_time_counter());
765
5.90k
        bool new_eos = false;
766
5.90k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
767
5.90k
        if (new_eos) {
768
5.86k
            *eos = true;
769
5.86k
        } else if (!need_more_input_data(state)) {
770
16
            *eos = false;
771
16
        }
772
5.90k
    }
773
12.0k
    return Status::OK();
774
12.0k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
745
419k
                                                         bool* eos) {
746
419k
    auto& local_state = get_local_state(state);
747
420k
    if (need_more_input_data(state)) {
748
420k
        local_state._child_block->clear_column_data(
749
420k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
750
420k
                        .num_materialized_slots());
751
420k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
752
420k
                state, local_state._child_block.get(), &local_state._child_eos));
753
420k
        *eos = local_state._child_eos;
754
420k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
755
32.0k
            return Status::OK();
756
32.0k
        }
757
388k
        {
758
388k
            SCOPED_TIMER(local_state.exec_time_counter());
759
388k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
760
388k
        }
761
388k
    }
762
763
387k
    if (!need_more_input_data(state)) {
764
365k
        SCOPED_TIMER(local_state.exec_time_counter());
765
365k
        bool new_eos = false;
766
365k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
767
365k
        if (new_eos) {
768
363k
            *eos = true;
769
363k
        } else if (!need_more_input_data(state)) {
770
0
            *eos = false;
771
0
        }
772
365k
    }
773
387k
    return Status::OK();
774
387k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
745
21.5k
                                                         bool* eos) {
746
21.5k
    auto& local_state = get_local_state(state);
747
21.5k
    if (need_more_input_data(state)) {
748
11.2k
        local_state._child_block->clear_column_data(
749
11.2k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
750
11.2k
                        .num_materialized_slots());
751
11.2k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
752
11.2k
                state, local_state._child_block.get(), &local_state._child_eos));
753
11.2k
        *eos = local_state._child_eos;
754
11.2k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
755
737
            return Status::OK();
756
737
        }
757
10.5k
        {
758
10.5k
            SCOPED_TIMER(local_state.exec_time_counter());
759
10.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
760
10.5k
        }
761
10.5k
    }
762
763
20.8k
    if (!need_more_input_data(state)) {
764
20.3k
        SCOPED_TIMER(local_state.exec_time_counter());
765
20.3k
        bool new_eos = false;
766
20.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
767
20.3k
        if (new_eos) {
768
6.25k
            *eos = true;
769
14.0k
        } else if (!need_more_input_data(state)) {
770
10.3k
            *eos = false;
771
10.3k
        }
772
20.3k
    }
773
20.8k
    return Status::OK();
774
20.8k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
745
7.09k
                                                         bool* eos) {
746
7.09k
    auto& local_state = get_local_state(state);
747
7.09k
    if (need_more_input_data(state)) {
748
6.73k
        local_state._child_block->clear_column_data(
749
6.73k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
750
6.73k
                        .num_materialized_slots());
751
6.73k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
752
6.73k
                state, local_state._child_block.get(), &local_state._child_eos));
753
6.73k
        *eos = local_state._child_eos;
754
6.73k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
755
605
            return Status::OK();
756
605
        }
757
6.12k
        {
758
6.12k
            SCOPED_TIMER(local_state.exec_time_counter());
759
6.12k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
760
6.12k
        }
761
6.12k
    }
762
763
6.49k
    if (!need_more_input_data(state)) {
764
6.49k
        SCOPED_TIMER(local_state.exec_time_counter());
765
6.49k
        bool new_eos = false;
766
6.49k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
767
6.48k
        if (new_eos) {
768
4.43k
            *eos = true;
769
4.43k
        } else if (!need_more_input_data(state)) {
770
366
            *eos = false;
771
366
        }
772
6.48k
    }
773
6.48k
    return Status::OK();
774
6.48k
}
775
776
template <typename Writer, typename Parent>
777
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
778
48.3k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
779
48.3k
    RETURN_IF_ERROR(Base::init(state, info));
780
48.3k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
781
48.3k
                                                         "AsyncWriterDependency", true);
782
48.3k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
783
48.3k
                             _finish_dependency));
784
785
48.3k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
786
48.3k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
787
48.3k
    return Status::OK();
788
48.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
778
348
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
779
348
    RETURN_IF_ERROR(Base::init(state, info));
780
348
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
781
348
                                                         "AsyncWriterDependency", true);
782
348
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
783
348
                             _finish_dependency));
784
785
348
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
786
348
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
787
348
    return Status::OK();
788
348
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
778
47.9k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
779
47.9k
    RETURN_IF_ERROR(Base::init(state, info));
780
47.9k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
781
47.9k
                                                         "AsyncWriterDependency", true);
782
47.9k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
783
47.9k
                             _finish_dependency));
784
785
47.9k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
786
47.9k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
787
47.9k
    return Status::OK();
788
47.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
778
18
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
779
18
    RETURN_IF_ERROR(Base::init(state, info));
780
18
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
781
18
                                                         "AsyncWriterDependency", true);
782
18
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
783
18
                             _finish_dependency));
784
785
18
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
786
18
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
787
18
    return Status::OK();
788
18
}
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
789
790
template <typename Writer, typename Parent>
791
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
792
48.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
793
48.7k
    RETURN_IF_ERROR(Base::open(state));
794
48.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
795
389k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
796
340k
        RETURN_IF_ERROR(
797
340k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
798
340k
    }
799
48.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
800
48.7k
    return Status::OK();
801
48.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
792
349
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
793
349
    RETURN_IF_ERROR(Base::open(state));
794
349
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
795
1.82k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
796
1.47k
        RETURN_IF_ERROR(
797
1.47k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
798
1.47k
    }
799
349
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
800
349
    return Status::OK();
801
349
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
792
48.4k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
793
48.4k
    RETURN_IF_ERROR(Base::open(state));
794
48.4k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
795
387k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
796
339k
        RETURN_IF_ERROR(
797
339k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
798
339k
    }
799
48.4k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
800
48.4k
    return Status::OK();
801
48.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
792
18
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
793
18
    RETURN_IF_ERROR(Base::open(state));
794
18
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
795
324
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
796
306
        RETURN_IF_ERROR(
797
306
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
798
306
    }
799
18
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
800
18
    return Status::OK();
801
18
}
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
802
803
template <typename Writer, typename Parent>
804
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
805
63.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
806
63.9k
    return _writer->sink(block, eos);
807
63.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
805
1.22k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
806
1.22k
    return _writer->sink(block, eos);
807
1.22k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
805
62.7k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
806
62.7k
    return _writer->sink(block, eos);
807
62.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
805
18
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
806
18
    return _writer->sink(block, eos);
807
18
}
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
808
809
template <typename Writer, typename Parent>
810
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
811
48.8k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
812
48.8k
    if (_closed) {
813
0
        return Status::OK();
814
0
    }
815
48.8k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
816
48.8k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
817
    // if the init failed, the _writer may be nullptr. so here need check
818
48.9k
    if (_writer) {
819
48.9k
        Status st = _writer->get_writer_status();
820
48.9k
        if (exec_status.ok()) {
821
48.8k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
822
48.8k
                                                       : Status::Cancelled("force close"));
823
48.8k
        } else {
824
59
            _writer->force_close(exec_status);
825
59
        }
826
        // If there is an error in process_block thread, then we should get the writer
827
        // status before call force_close. For example, the thread may failed in commit
828
        // transaction.
829
48.9k
        RETURN_IF_ERROR(st);
830
48.9k
    }
831
48.8k
    return Base::close(state, exec_status);
832
48.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
811
337
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
812
337
    if (_closed) {
813
0
        return Status::OK();
814
0
    }
815
337
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
816
337
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
817
    // if the init failed, the _writer may be nullptr. so here need check
818
337
    if (_writer) {
819
337
        Status st = _writer->get_writer_status();
820
337
        if (exec_status.ok()) {
821
337
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
822
337
                                                       : Status::Cancelled("force close"));
823
337
        } else {
824
0
            _writer->force_close(exec_status);
825
0
        }
826
        // If there is an error in process_block thread, then we should get the writer
827
        // status before call force_close. For example, the thread may failed in commit
828
        // transaction.
829
337
        RETURN_IF_ERROR(st);
830
337
    }
831
337
    return Base::close(state, exec_status);
832
337
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
811
48.5k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
812
48.5k
    if (_closed) {
813
0
        return Status::OK();
814
0
    }
815
48.5k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
816
48.5k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
817
    // if the init failed, the _writer may be nullptr. so here need check
818
48.5k
    if (_writer) {
819
48.5k
        Status st = _writer->get_writer_status();
820
48.5k
        if (exec_status.ok()) {
821
48.4k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
822
48.4k
                                                       : Status::Cancelled("force close"));
823
48.4k
        } else {
824
59
            _writer->force_close(exec_status);
825
59
        }
826
        // If there is an error in process_block thread, then we should get the writer
827
        // status before call force_close. For example, the thread may failed in commit
828
        // transaction.
829
48.5k
        RETURN_IF_ERROR(st);
830
48.5k
    }
831
48.4k
    return Base::close(state, exec_status);
832
48.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
811
18
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
812
18
    if (_closed) {
813
0
        return Status::OK();
814
0
    }
815
18
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
816
18
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
817
    // if the init failed, the _writer may be nullptr. so here need check
818
18
    if (_writer) {
819
18
        Status st = _writer->get_writer_status();
820
18
        if (exec_status.ok()) {
821
18
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
822
18
                                                       : Status::Cancelled("force close"));
823
18
        } else {
824
0
            _writer->force_close(exec_status);
825
0
        }
826
        // If there is an error in process_block thread, then we should get the writer
827
        // status before call force_close. For example, the thread may failed in commit
828
        // transaction.
829
18
        RETURN_IF_ERROR(st);
830
18
    }
831
18
    return Base::close(state, exec_status);
832
18
}
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
833
834
// An instantiation added outside the macros below needs the matching
835
// 'extern template' declaration in the operator's header (enforced by
836
// build-support/check-extern-template-pairing.py). Instantiations expanded
837
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
838
// skipped -- so their extern pairing has to be kept in sync by hand.
839
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
840
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
841
DECLARE_OPERATOR(ResultSinkLocalState)
842
DECLARE_OPERATOR(JdbcTableSinkLocalState)
843
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
844
DECLARE_OPERATOR(ResultFileSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkLocalState)
846
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
847
DECLARE_OPERATOR(HiveTableSinkLocalState)
848
DECLARE_OPERATOR(TVFTableSinkLocalState)
849
DECLARE_OPERATOR(IcebergTableSinkLocalState)
850
DECLARE_OPERATOR(PaimonTableSinkLocalState)
851
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
852
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
853
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
854
DECLARE_OPERATOR(MCTableSinkLocalState)
855
DECLARE_OPERATOR(AnalyticSinkLocalState)
856
DECLARE_OPERATOR(BlackholeSinkLocalState)
857
DECLARE_OPERATOR(SortSinkLocalState)
858
DECLARE_OPERATOR(SpillSortSinkLocalState)
859
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
860
DECLARE_OPERATOR(AggSinkLocalState)
861
DECLARE_OPERATOR(BucketedAggSinkLocalState)
862
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
863
DECLARE_OPERATOR(ExchangeSinkLocalState)
864
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
865
DECLARE_OPERATOR(UnionSinkLocalState)
866
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
867
DECLARE_OPERATOR(PartitionSortSinkLocalState)
868
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
869
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
870
DECLARE_OPERATOR(SetSinkLocalState<true>)
871
DECLARE_OPERATOR(SetSinkLocalState<false>)
872
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
873
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
874
DECLARE_OPERATOR(CacheSinkLocalState)
875
DECLARE_OPERATOR(DictSinkLocalState)
876
DECLARE_OPERATOR(RecCTESinkLocalState)
877
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
878
879
#undef DECLARE_OPERATOR
880
881
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
882
DECLARE_OPERATOR(HashJoinProbeLocalState)
883
DECLARE_OPERATOR(OlapScanLocalState)
884
DECLARE_OPERATOR(GroupCommitLocalState)
885
DECLARE_OPERATOR(JDBCScanLocalState)
886
DECLARE_OPERATOR(FileScanLocalState)
887
DECLARE_OPERATOR(AnalyticLocalState)
888
DECLARE_OPERATOR(SortLocalState)
889
DECLARE_OPERATOR(SpillSortLocalState)
890
DECLARE_OPERATOR(LocalMergeSortLocalState)
891
DECLARE_OPERATOR(AggLocalState)
892
DECLARE_OPERATOR(BucketedAggLocalState)
893
DECLARE_OPERATOR(PartitionedAggLocalState)
894
DECLARE_OPERATOR(TableFunctionLocalState)
895
DECLARE_OPERATOR(ExchangeLocalState)
896
DECLARE_OPERATOR(RepeatLocalState)
897
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
898
DECLARE_OPERATOR(AssertNumRowsLocalState)
899
DECLARE_OPERATOR(EmptySetLocalState)
900
DECLARE_OPERATOR(UnionSourceLocalState)
901
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
902
DECLARE_OPERATOR(PartitionSortSourceLocalState)
903
DECLARE_OPERATOR(SetSourceLocalState<true>)
904
DECLARE_OPERATOR(SetSourceLocalState<false>)
905
DECLARE_OPERATOR(DataGenLocalState)
906
DECLARE_OPERATOR(SchemaScanLocalState)
907
DECLARE_OPERATOR(MetaScanLocalState)
908
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
909
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
910
DECLARE_OPERATOR(CacheSourceLocalState)
911
DECLARE_OPERATOR(RecCTESourceLocalState)
912
DECLARE_OPERATOR(RecCTEScanLocalState)
913
914
#ifdef BE_TEST
915
DECLARE_OPERATOR(MockLocalState)
916
DECLARE_OPERATOR(MockScanLocalState)
917
#endif
918
#undef DECLARE_OPERATOR
919
920
template class StreamingOperatorX<AssertNumRowsLocalState>;
921
template class StreamingOperatorX<SelectLocalState>;
922
923
template class StatefulOperatorX<HashJoinProbeLocalState>;
924
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
925
template class StatefulOperatorX<RepeatLocalState>;
926
template class StatefulOperatorX<MaterializationLocalState>;
927
template class StatefulOperatorX<StreamingAggLocalState>;
928
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
929
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
930
template class StatefulOperatorX<TableFunctionLocalState>;
931
932
template class PipelineXSinkLocalState<HashJoinSharedState>;
933
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
934
template class PipelineXSinkLocalState<SortSharedState>;
935
template class PipelineXSinkLocalState<SpillSortSharedState>;
936
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
937
template class PipelineXSinkLocalState<AnalyticSharedState>;
938
template class PipelineXSinkLocalState<AggSharedState>;
939
template class PipelineXSinkLocalState<BucketedAggSharedState>;
940
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
941
template class PipelineXSinkLocalState<FakeSharedState>;
942
template class PipelineXSinkLocalState<UnionSharedState>;
943
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
944
template class PipelineXSinkLocalState<MultiCastSharedState>;
945
template class PipelineXSinkLocalState<SetSharedState>;
946
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
947
template class PipelineXSinkLocalState<BasicSharedState>;
948
template class PipelineXSinkLocalState<DataQueueSharedState>;
949
template class PipelineXSinkLocalState<RecCTESharedState>;
950
951
template class PipelineXLocalState<HashJoinSharedState>;
952
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
953
template class PipelineXLocalState<SortSharedState>;
954
template class PipelineXLocalState<SpillSortSharedState>;
955
template class PipelineXLocalState<NestedLoopJoinSharedState>;
956
template class PipelineXLocalState<AnalyticSharedState>;
957
template class PipelineXLocalState<AggSharedState>;
958
template class PipelineXLocalState<BucketedAggSharedState>;
959
template class PipelineXLocalState<PartitionedAggSharedState>;
960
template class PipelineXLocalState<FakeSharedState>;
961
template class PipelineXLocalState<UnionSharedState>;
962
template class PipelineXLocalState<DataQueueSharedState>;
963
template class PipelineXLocalState<MultiCastSharedState>;
964
template class PipelineXLocalState<PartitionSortNodeSharedState>;
965
template class PipelineXLocalState<SetSharedState>;
966
template class PipelineXLocalState<LocalExchangeSharedState>;
967
template class PipelineXLocalState<BasicSharedState>;
968
template class PipelineXLocalState<RecCTESharedState>;
969
970
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
971
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
972
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
973
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
974
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
977
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
978
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
979
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
980
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
981
982
#ifdef BE_TEST
983
template class OperatorX<DummyOperatorLocalState>;
984
template class DataSinkOperatorX<DummySinkLocalState>;
985
#endif
986
987
} // namespace doris