Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate arrow ipc tests and increase coverage #3427

Merged
merged 2 commits into from
Jan 5, 2023

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jan 2, 2023

Which issue does this PR close?

re #3389

Rationale for this change

I want to ensure that the Arrow IPC writer had sufficient test coverage before I potentially messed around with it

What changes are included in this PR?

  1. Reduce duplication in arrow-ipc read/write tests
  2. Add additional coverage
  3. remove redundant arrow/ipc integration test

Are there any user-facing changes?

No this is all test changes

@github-actions github-actions bot added arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate labels Jan 2, 2023
@github-actions github-actions bot removed the arrow-flight Changes to the arrow-flight crate label Jan 2, 2023
.unwrap();

let mut reader = FileReader::try_new(file, None).unwrap();
verify_arrow_file(&testdata, version, path);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I consolidated the tests so the streams and file tests are in the same function, which both reduces code duplication as well as making it easier to audit which files were included in the test

let testdata = arrow_test_data();
let version = "0.17.1";
let paths = vec!["generated_union"];
paths.iter().for_each(|path| {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This used to be (partially) covered in arrow/tests/ipc.rs

"generated_datetime",
"generated_custom_metadata",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was quite pleased to find that the reader/writer works for many more integration tests :bowtie:

});
}

#[test]
fn read_generated_streams_014() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the stream tests have been incorporated into the same test as the file tests (so I didn't have to audit two separate lists of files)

});
}

#[test]
fn read_and_rewrite_generated_streams_014() {
fn write_0_1_7() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This used to be (partially) covered in arrow/tests/ipc.rs

@@ -1,61 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now completely covered by arrow-integration-testing/tests/ipc_writer.rs and arrow-integration-testing/tests/ipc_reader.rs in a uniform manner

@alamb alamb requested a review from tustvold January 4, 2023 21:45
@@ -102,163 +95,119 @@ fn read_generated_be_files_should_work() {
.unwrap();

FileReader::try_new(file, None).unwrap();

// While the the reader doesn't error but the values are not read correctly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we file a ticket for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend filing tickets for the remaining failures, but looks good to me

"generated_map",
// fails with
// thread 'read_1_0_0_littleendian' panicked at 'assertion failed: `(left == right)`
//"generated_map_non_canonical",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be worth a ticket for this test, it seems to fail in multiple places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alamb alamb merged commit 81abc1a into apache:master Jan 5, 2023
@alamb alamb deleted the alamb/cleanup_ipc_tests branch January 5, 2023 11:37
@ursabot
Copy link

ursabot commented Jan 5, 2023

Benchmark runs are scheduled for baseline = e256e3d and contender = 81abc1a. 81abc1a is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants