From c80b3990f3679603ef720eea326a945cedfd2c10 Mon Sep 17 00:00:00 2001 From: Benjamin Kietzman Date: Wed, 28 Aug 2024 15:01:26 -0500 Subject: [PATCH] remove failing assertion, format, lint --- .../src/bin/arrow-json-integration-test.rs | 7 ++++--- arrow-ipc/src/writer.rs | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arrow-integration-testing/src/bin/arrow-json-integration-test.rs b/arrow-integration-testing/src/bin/arrow-json-integration-test.rs index 9ac3451e573..523e1c8bab3 100644 --- a/arrow-integration-testing/src/bin/arrow-json-integration-test.rs +++ b/arrow-integration-testing/src/bin/arrow-json-integration-test.rs @@ -180,16 +180,17 @@ fn validate(arrow_name: &str, json_name: &str, verbose: bool) -> Result<()> { )); } - let mut arrow_file = File::open(arrow_name)?; arrow_file.seek(SeekFrom::Start(8))?; let arrow_stream_reader = StreamReader::try_new(arrow_file, None)?; - if canonicalize_schema(&json_file.schema) != canonicalize_schema(&arrow_stream_reader.schema()) { + if canonicalize_schema(&json_file.schema) != canonicalize_schema(&arrow_stream_reader.schema()) + { return Err(ArrowError::ComputeError(format!( "Schemas do not match. JSON: {:?}. Embedded stream: {:?}", - json_file.schema, arrow_stream_reader.schema() + json_file.schema, + arrow_stream_reader.schema() ))); } diff --git a/arrow-ipc/src/writer.rs b/arrow-ipc/src/writer.rs index 0f4740ee707..ba86e452f33 100644 --- a/arrow-ipc/src/writer.rs +++ b/arrow-ipc/src/writer.rs @@ -974,7 +974,6 @@ impl FileWriter { // write EOS self.written_len += write_continuation(&mut self.writer, &self.write_options, 0)?; - assert_eq!(self.written_len % 8, 0); let mut fbb = FlatBufferBuilder::new(); let dictionaries = fbb.create_vector(&self.dictionary_blocks); @@ -1303,7 +1302,7 @@ fn write_message_at_offset( writer.write_all(&PADDING[..padding_size])?; // write arrow data - let body_len = if encoded.arrow_data.len() > 0 { + let body_len = if !encoded.arrow_data.is_empty() { write_body_buffers(&mut writer, &encoded.arrow_data, write_options.alignment)? } else { 0