Coverage Report

Created: 2026-04-16 09:07

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