Skip to content

Move variant interop test to Rust integration test #7602

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

Merged
merged 4 commits into from
Jun 9, 2025

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jun 4, 2025

Which issue does this PR close?

Rationale for this change

Rust integration tests (in parquet-variant/tests) are compiled as a external program would be compiled and thus can only use the exposed API. This helps verify that the crate is usable

What changes are included in this PR?

  1. Move the tests that read/write variant values into variant_interop test (cargo test --test variant_interop)
  2. Publically expose pub structures

Are there any user-facing changes?

There are now pub APIs in the parquet-variant crate

@@ -327,6 +327,10 @@ impl<'m, 'v> VariantArray<'m, 'v> {
todo!()
}

pub fn is_empty(&self) -> bool {
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 required by clippy

@@ -88,7 +88,7 @@ impl OffsetSizeBytes {
}

#[derive(Clone, Debug, Copy, PartialEq)]
pub(crate) struct VariantMetadataHeader {
pub struct VariantMetadataHeader {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this in the public API, it needs to be pub as well

@alamb alamb force-pushed the alamb/variant_tests branch from 77a1af7 to 0bdb8d6 Compare June 8, 2025 16:53
@github-actions github-actions bot added the parquet Changes to the parquet crate label Jun 8, 2025
@alamb alamb marked this pull request as ready for review June 8, 2025 17:03
@alamb
Copy link
Contributor Author

alamb commented Jun 8, 2025

FYI @mkarbo @scovich

@alamb
Copy link
Contributor Author

alamb commented Jun 9, 2025

This is looking pretty neat

@alamb alamb merged commit 312e2fd into apache:main Jun 9, 2025
12 checks passed
@alamb alamb deleted the alamb/variant_tests branch June 9, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants