alamb commented on code in PR #4027:
URL: https://github.com/apache/arrow-rs/pull/4027#discussion_r1160151130
##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -2358,4 +2361,51 @@ mod tests {
let actual = pretty_format_batches(&batches).unwrap().to_string();
assert_eq!(actual, expected);
}
+
+ #[test]
Review Comment:
I verified that these tests fail without the code change:
```
---- arrow::arrow_writer::tests::test_arrow_writer_metadata stdout ----
thread 'arrow::arrow_writer::tests::test_arrow_writer_metadata' panicked at
'called `Result::unwrap()` on an `Err` value: ArrowError("Record batch schema
does not match writer schema")', parquet/src/arrow/arrow_writer/mod.rs:2380:30
stack backtrace:
0: rust_begin_unwind
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:575:5
1: core::panicking::panic_fmt
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:64:14
2: core::result::unwrap_failed
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/result.rs:1790:5
3: core::result::Result<T,E>::unwrap
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/result.rs:1112:23
4: parquet::arrow::arrow_writer::tests::test_arrow_writer_metadata
at ./src/arrow/arrow_writer/mod.rs:2380:9
5:
parquet::arrow::arrow_writer::tests::test_arrow_writer_metadata::{{closure}}
at ./src/arrow/arrow_writer/mod.rs:2363:37
6: core::ops::function::FnOnce::call_once
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/ops/function.rs:250:5
7: core::ops::function::FnOnce::call_once
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.
---- arrow::arrow_writer::tests::test_arrow_writer_nullable stdout ----
thread 'arrow::arrow_writer::tests::test_arrow_writer_nullable' panicked at
'called `Result::unwrap()` on an `Err` value: ArrowError("Record batch schema
does not match writer schema")', parquet/src/arrow/arrow_writer/mod.rs:2399:30
stack backtrace:
0: rust_begin_unwind
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:575:5
1: core::panicking::panic_fmt
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:64:14
2: core::result::unwrap_failed
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/result.rs:1790:5
3: core::result::Result<T,E>::unwrap
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/result.rs:1112:23
4: parquet::arrow::arrow_writer::tests::test_arrow_writer_nullable
at ./src/arrow/arrow_writer/mod.rs:2399:9
5:
parquet::arrow::arrow_writer::tests::test_arrow_writer_nullable::{{closure}}
at ./src/arrow/arrow_writer/mod.rs:2385:37
6: core::ops::function::FnOnce::call_once
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/ops/function.rs:250:5
7: core::ops::function::FnOnce::call_once
at
/rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]