Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
liukun4515 committed Aug 31, 2022
1 parent eacb730 commit 0c72501
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions arrow-flight/src/lib.rs
Expand Up @@ -452,16 +452,16 @@ mod tests {
Field::new("c5", DataType::Timestamp(TimeUnit::Millisecond, None), true),
Field::new("c6", DataType::Time32(TimeUnit::Second), false),
]);
// V5
// V5 with write_legacy_ipc_format = false
// this will write the continuation marker
let option = IpcWriteOptions::default();
let schema_ipc = SchemaAsIpc::new(&schema, &option);
let result: SchemaResult = schema_ipc.try_into().unwrap();
//
let des_schema: Schema = (&result).try_into().unwrap();
assert_eq!(schema, des_schema);

// V4 with write_legacy_ipc_format = true
// This will write the continuation marker
// this will not write the continuation marker
let option = IpcWriteOptions::try_new(8, true, MetadataVersion::V4).unwrap();
let schema_ipc = SchemaAsIpc::new(&schema, &option);
let result: SchemaResult = schema_ipc.try_into().unwrap();
Expand Down
6 changes: 3 additions & 3 deletions arrow/src/ipc/convert.rs
Expand Up @@ -188,9 +188,9 @@ pub fn try_schema_from_ipc_buffer(buffer: &[u8]) -> Result<Schema> {
})?;
Ok(fb_to_schema(ipc_schema))
} else {
Err(ArrowError::ParseError(format!(
"The buffer length is less than 4, parser buffer to Schema"
)))
Err(ArrowError::ParseError(
"The buffer length is less than 4 and missing the continuation maker or length of buffer".to_string()
))
}
}

Expand Down

0 comments on commit 0c72501

Please sign in to comment.