File tree 1 file changed +8
-0
lines changed
datafusion/functions-aggregate-common/src/aggregate/groups_accumulator
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ pub struct Blocks<B: Block> {
44
44
}
45
45
46
46
impl < B : Block > Blocks < B > {
47
+ #[ inline]
47
48
pub fn new ( block_size : Option < usize > ) -> Self {
48
49
Self {
49
50
inner : Vec :: new ( ) ,
@@ -121,6 +122,7 @@ impl<B: Block> Blocks<B> {
121
122
}
122
123
}
123
124
125
+ #[ inline]
124
126
pub fn pop_block ( & mut self ) -> Option < B > {
125
127
if self . next_emit_block_id >= self . inner . len ( ) {
126
128
return None ;
@@ -133,18 +135,22 @@ impl<B: Block> Blocks<B> {
133
135
Some ( emit_blk)
134
136
}
135
137
138
+ #[ inline]
136
139
pub fn len ( & self ) -> usize {
137
140
self . inner . len ( )
138
141
}
139
142
143
+ #[ inline]
140
144
pub fn is_empty ( & self ) -> bool {
141
145
self . inner . is_empty ( )
142
146
}
143
147
148
+ #[ inline]
144
149
pub fn iter ( & self ) -> impl Iterator < Item = & B > {
145
150
self . inner . iter ( )
146
151
}
147
152
153
+ #[ inline]
148
154
pub fn clear ( & mut self ) {
149
155
self . inner . clear ( ) ;
150
156
self . next_emit_block_id = 0 ;
@@ -154,12 +160,14 @@ impl<B: Block> Blocks<B> {
154
160
impl < B : Block > Index < usize > for Blocks < B > {
155
161
type Output = B ;
156
162
163
+ #[ inline]
157
164
fn index ( & self , index : usize ) -> & Self :: Output {
158
165
& self . inner [ index]
159
166
}
160
167
}
161
168
162
169
impl < B : Block > IndexMut < usize > for Blocks < B > {
170
+ #[ inline]
163
171
fn index_mut ( & mut self , index : usize ) -> & mut Self :: Output {
164
172
& mut self . inner [ index]
165
173
}
You can’t perform that action at this time.
0 commit comments