Coverage Report

Created: 2026-05-18 15:26

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