File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
datafusion/functions-aggregate-common/src/aggregate/groups_accumulator Expand file tree Collapse file tree 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> {
4444}
4545
4646impl < B : Block > Blocks < B > {
47+ #[ inline]
4748 pub fn new ( block_size : Option < usize > ) -> Self {
4849 Self {
4950 inner : Vec :: new ( ) ,
@@ -121,6 +122,7 @@ impl<B: Block> Blocks<B> {
121122 }
122123 }
123124
125+ #[ inline]
124126 pub fn pop_block ( & mut self ) -> Option < B > {
125127 if self . next_emit_block_id >= self . inner . len ( ) {
126128 return None ;
@@ -133,18 +135,22 @@ impl<B: Block> Blocks<B> {
133135 Some ( emit_blk)
134136 }
135137
138+ #[ inline]
136139 pub fn len ( & self ) -> usize {
137140 self . inner . len ( )
138141 }
139142
143+ #[ inline]
140144 pub fn is_empty ( & self ) -> bool {
141145 self . inner . is_empty ( )
142146 }
143147
148+ #[ inline]
144149 pub fn iter ( & self ) -> impl Iterator < Item = & B > {
145150 self . inner . iter ( )
146151 }
147152
153+ #[ inline]
148154 pub fn clear ( & mut self ) {
149155 self . inner . clear ( ) ;
150156 self . next_emit_block_id = 0 ;
@@ -154,12 +160,14 @@ impl<B: Block> Blocks<B> {
154160impl < B : Block > Index < usize > for Blocks < B > {
155161 type Output = B ;
156162
163+ #[ inline]
157164 fn index ( & self , index : usize ) -> & Self :: Output {
158165 & self . inner [ index]
159166 }
160167}
161168
162169impl < B : Block > IndexMut < usize > for Blocks < B > {
170+ #[ inline]
163171 fn index_mut ( & mut self , index : usize ) -> & mut Self :: Output {
164172 & mut self . inner [ index]
165173 }
You can’t perform that action at this time.
0 commit comments