@@ -5,8 +5,8 @@ use arrow::{
5
5
array:: {
6
6
ArrayBuilder , ArrowPrimitiveType , BooleanBuilder , FixedSizeListBuilder , Float32Builder ,
7
7
Float64Builder , Int8Builder , Int16Builder , Int32Builder , Int64Builder , ListBuilder ,
8
- PrimitiveBuilder , StringBuilder , StructBuilder , UInt8Builder , UInt16Builder , UInt32Builder ,
9
- UInt64Builder ,
8
+ NullBuilder , PrimitiveBuilder , StringBuilder , StructBuilder , UInt8Builder , UInt16Builder ,
9
+ UInt32Builder , UInt64Builder ,
10
10
} ,
11
11
datatypes:: {
12
12
DataType , Field , Fields , Float32Type , Float64Type , Int8Type , Int16Type , Int32Type ,
@@ -204,22 +204,19 @@ fn create_empty_message_chunk(
204
204
num_rows : usize ,
205
205
archetype_name : & str ,
206
206
) -> anyhow:: Result < Chunk > {
207
- let empty_list = arrow:: array:: ListArray :: new_null (
208
- std:: sync:: Arc :: new ( Field :: new (
209
- "empty" ,
210
- DataType :: FixedSizeList ( Arc :: new ( Field :: new ( "item" , DataType :: Null , true ) ) , 1 ) ,
211
- true ,
212
- ) ) ,
213
- num_rows,
214
- ) ;
207
+ let mut empty_list = ListBuilder :: with_capacity ( NullBuilder :: new ( ) , num_rows) ;
208
+ for _ in 0 ..num_rows {
209
+ empty_list. values ( ) . append_null ( ) ;
210
+ empty_list. append ( true ) ;
211
+ }
215
212
216
213
let chunk = Chunk :: from_auto_row_ids (
217
214
ChunkId :: new ( ) ,
218
215
entity_path,
219
216
timelines,
220
217
std:: iter:: once ( (
221
218
ComponentDescriptor :: partial ( "empty" ) . with_builtin_archetype ( archetype_name) ,
222
- empty_list,
219
+ empty_list. finish ( ) ,
223
220
) )
224
221
. collect ( ) ,
225
222
)
0 commit comments