File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
storages/fuse/src/io/write Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,11 @@ impl DataBlock {
209209 & self . columns
210210 }
211211
212+ #[ inline]
213+ pub fn take_columns ( self ) -> Vec < BlockEntry > {
214+ self . columns
215+ }
216+
212217 #[ inline]
213218 pub fn columns_mut ( & mut self ) -> & mut [ BlockEntry ] {
214219 & mut self . columns
Original file line number Diff line number Diff line change @@ -227,11 +227,11 @@ impl DataBlock {
227227 let mut arrays = Vec :: with_capacity ( self . columns ( ) . len ( ) ) ;
228228 for ( entry, arrow_field) in self
229229 . consume_convert_to_full ( )
230- . columns ( )
231- . iter ( )
230+ . take_columns ( )
231+ . into_iter ( )
232232 . zip ( arrow_schema. fields ( ) )
233233 {
234- let column = entry. value . to_owned ( ) . into_column ( ) . unwrap ( ) ;
234+ let column = entry. value . into_column ( ) . unwrap ( ) ;
235235 let column = column. maybe_gc ( ) ;
236236 let array = column. into_arrow_rs ( ) ;
237237
Original file line number Diff line number Diff line change @@ -97,9 +97,9 @@ pub fn serialize_block(
9797
9898 let block = block. consume_convert_to_full ( ) ;
9999 let batch: Vec < Column > = block
100- . columns ( )
101- . iter ( )
102- . map ( |x| x. value . as_column ( ) . unwrap ( ) . clone ( ) )
100+ . take_columns ( )
101+ . into_iter ( )
102+ . map ( |x| x. value . into_column ( ) . unwrap ( ) )
103103 . collect ( ) ;
104104
105105 writer. start ( ) ?;
You can’t perform that action at this time.
0 commit comments