Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Reduced binary size (#1221)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Aug 12, 2022
1 parent 0a1714c commit cc8f4f2
Show file tree
Hide file tree
Showing 4 changed files with 226 additions and 217 deletions.
10 changes: 4 additions & 6 deletions src/io/flight/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,9 @@ pub fn deserialize_message(
)?;
Ok(None)
}
t => {
return Err(Error::nyi(format!(
"Reading types other than record batches not yet supported, unable to read {:?}",
t
)));
}
t => Err(Error::nyi(format!(
"Reading types other than record batches not yet supported, unable to read {:?}",
t
))),
}
}
130 changes: 60 additions & 70 deletions src/io/ipc/read/deserialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,76 +58,66 @@ pub fn read<R: Read + Seek>(
)
.map(|x| x.boxed())
}),
Binary => {
let array = read_binary::<i32, _>(
field_nodes,
data_type,
buffers,
reader,
block_offset,
is_little_endian,
compression,
limit,
scratch,
)?;
Ok(Box::new(array))
}
LargeBinary => {
let array = read_binary::<i64, _>(
field_nodes,
data_type,
buffers,
reader,
block_offset,
is_little_endian,
compression,
limit,
scratch,
)?;
Ok(Box::new(array))
}
FixedSizeBinary => {
let array = read_fixed_size_binary(
field_nodes,
data_type,
buffers,
reader,
block_offset,
is_little_endian,
compression,
limit,
scratch,
)?;
Ok(Box::new(array))
}
Utf8 => {
let array = read_utf8::<i32, _>(
field_nodes,
data_type,
buffers,
reader,
block_offset,
is_little_endian,
compression,
limit,
scratch,
)?;
Ok(Box::new(array))
}
LargeUtf8 => {
let array = read_utf8::<i64, _>(
field_nodes,
data_type,
buffers,
reader,
block_offset,
is_little_endian,
compression,
limit,
scratch,
)?;
Ok(Box::new(array))
}
Binary => read_binary::<i32, _>(
field_nodes,
data_type,
buffers,
reader,
block_offset,
is_little_endian,
compression,
limit,
scratch,
)
.map(|x| x.boxed()),
LargeBinary => read_binary::<i64, _>(
field_nodes,
data_type,
buffers,
reader,
block_offset,
is_little_endian,
compression,
limit,
scratch,
)
.map(|x| x.boxed()),
FixedSizeBinary => read_fixed_size_binary(
field_nodes,
data_type,
buffers,
reader,
block_offset,
is_little_endian,
compression,
limit,
scratch,
)
.map(|x| x.boxed()),
Utf8 => read_utf8::<i32, _>(
field_nodes,
data_type,
buffers,
reader,
block_offset,
is_little_endian,
compression,
limit,
scratch,
)
.map(|x| x.boxed()),
LargeUtf8 => read_utf8::<i64, _>(
field_nodes,
data_type,
buffers,
reader,
block_offset,
is_little_endian,
compression,
limit,
scratch,
)
.map(|x| x.boxed()),
List => read_list::<i32, _>(
field_nodes,
data_type,
Expand Down
Loading

0 comments on commit cc8f4f2

Please sign in to comment.