Only require compatible batch schema in ArrowWriter#4027
Merged
tustvold merged 1 commit intoapache:masterfrom Apr 6, 2023
Merged
Only require compatible batch schema in ArrowWriter#4027tustvold merged 1 commit intoapache:masterfrom
tustvold merged 1 commit intoapache:masterfrom
Conversation
alamb
approved these changes
Apr 6, 2023
| assert_eq!(actual, expected); | ||
| } | ||
|
|
||
| #[test] |
Contributor
There was a problem hiding this 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Relates to #4023
Rationale for this change
We should only require that the batches have a compatible schema, not that they necessarily have the exact same schema.
What changes are included in this PR?
Are there any user-facing changes?