From 1e34a842a6ac5cc28d281ac9e6c89160588868c8 Mon Sep 17 00:00:00 2001 From: "Jorge C. Leitao" Date: Fri, 1 Jul 2022 13:51:26 +0000 Subject: [PATCH] Fixed error --- integration-testing/src/bin/arrow-file-to-stream.rs | 2 +- .../src/bin/arrow-json-integration-test.rs | 4 ++-- .../src/flight_server_scenarios/integration_test.rs | 1 + src/io/ipc/mod.rs | 8 ++++---- tests/it/io/ipc/read/file.rs | 6 +++--- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/integration-testing/src/bin/arrow-file-to-stream.rs b/integration-testing/src/bin/arrow-file-to-stream.rs index ae8ed094fdc..c63606e28c3 100644 --- a/integration-testing/src/bin/arrow-file-to-stream.rs +++ b/integration-testing/src/bin/arrow-file-to-stream.rs @@ -32,7 +32,7 @@ fn main() -> Result<()> { let filename = args.file_name; let mut f = File::open(filename)?; let metadata = read::read_file_metadata(&mut f)?; - let mut reader = read::FileReader::new(f, metadata.clone(), None); + let mut reader = read::FileReader::new(f, metadata.clone(), None, None); let options = write::WriteOptions { compression: None }; let mut writer = write::StreamWriter::new(std::io::stdout(), options); diff --git a/integration-testing/src/bin/arrow-json-integration-test.rs b/integration-testing/src/bin/arrow-json-integration-test.rs index 82de2e435d3..9d889195c27 100644 --- a/integration-testing/src/bin/arrow-json-integration-test.rs +++ b/integration-testing/src/bin/arrow-json-integration-test.rs @@ -80,7 +80,7 @@ fn arrow_to_json(arrow_name: &str, json_name: &str, verbose: bool) -> Result<()> let mut arrow_file = File::open(arrow_name)?; let metadata = read::read_file_metadata(&mut arrow_file)?; - let reader = read::FileReader::new(arrow_file, metadata.clone(), None); + let reader = read::FileReader::new(arrow_file, metadata.clone(), None, None); let names = metadata .schema @@ -118,7 +118,7 @@ fn validate(arrow_name: &str, json_name: &str, verbose: bool) -> Result<()> { // open Arrow file let mut arrow_file = File::open(arrow_name)?; let metadata = read::read_file_metadata(&mut arrow_file)?; - let reader = read::FileReader::new(arrow_file, metadata, None); + let reader = read::FileReader::new(arrow_file, metadata, None, None); let arrow_schema = reader.schema(); // compare schemas diff --git a/integration-testing/src/flight_server_scenarios/integration_test.rs b/integration-testing/src/flight_server_scenarios/integration_test.rs index 10424759e87..c81706ed2b3 100644 --- a/integration-testing/src/flight_server_scenarios/integration_test.rs +++ b/integration-testing/src/flight_server_scenarios/integration_test.rs @@ -291,6 +291,7 @@ async fn record_batch_from_message( fields, ipc_schema, None, + None, dictionaries, arrow_format::ipc::MetadataVersion::V5, &mut reader, diff --git a/src/io/ipc/mod.rs b/src/io/ipc/mod.rs index 68124c8bfa0..3d8a8ccb994 100644 --- a/src/io/ipc/mod.rs +++ b/src/io/ipc/mod.rs @@ -58,10 +58,10 @@ //! // Fetch some of the data and get the reader back //! let mut reader = File::open(&path)?; //! let metadata = read_file_metadata(&mut reader)?; -//! let mut filereader = FileReader::new(reader, metadata, None); -//! let row1 = filereader.next().unwrap(); // [[-1, 1], [1, -1]] -//! let row2 = filereader.next().unwrap(); // [[-1, 1], [1, -1]] -//! let mut reader = filereader.into_inner(); +//! let mut reader = FileReader::new(reader, metadata, None, None); +//! let row1 = reader.next().unwrap(); // [[-1, 1], [1, -1]] +//! let row2 = reader.next().unwrap(); // [[-1, 1], [1, -1]] +//! let mut reader = reader.into_inner(); //! // Do more stuff with the reader, like seeking ahead. //! # Ok::<(), Error>(()) //! ``` diff --git a/tests/it/io/ipc/read/file.rs b/tests/it/io/ipc/read/file.rs index a30fe03cd14..9d21d051f2a 100644 --- a/tests/it/io/ipc/read/file.rs +++ b/tests/it/io/ipc/read/file.rs @@ -269,8 +269,8 @@ fn read_limited() -> Result<()> { test_limit("1.0.0-littleendian", "generated_primitive", 2)?; test_limit("1.0.0-littleendian", "generated_dictionary", 2)?; test_limit("1.0.0-littleendian", "generated_union", 2)?; - //test_limit("1.0.0-littleendian", "generated_map", 2)?; - //test_limit("1.0.0-littleendian", "generated_nested_dictionary", 2)?; - //test_limit("1.0.0-littleendian", "generated_nested", 2)?; + test_limit("1.0.0-littleendian", "generated_map", 2)?; + test_limit("1.0.0-littleendian", "generated_nested_dictionary", 2)?; + test_limit("1.0.0-littleendian", "generated_nested", 2)?; Ok(()) }