Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Nov 18, 2025

Which issue does this PR close?

Rationale for this change

per #8715 (comment), @scovich rightly says

not a fan of panics

It is much better for a user facing API to return an error on invalid input than painc

What changes are included in this PR?

  1. Make ArrowReaderOptions::with_virtual_columns error rather than panic on invalid input
  2. Update tests to match

Are these changes tested?

Yes by CI

Are there any user-facing changes?

While this is an API change it was introduced in #8715 which has not yet been released. Therefore, we can make this change without breaking semver.

/// # }
/// ```
pub fn with_virtual_columns(self, virtual_columns: Vec<FieldRef>) -> Self {
pub fn with_virtual_columns(self, virtual_columns: Vec<FieldRef>) -> Result<Self> {
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 point of the PR is to change this API to avoid panic'ing

@github-actions github-actions bot added the parquet Changes to the parquet crate label Nov 18, 2025
@alamb alamb marked this pull request as ready for review November 18, 2025 19:48
@alamb alamb added this to the 57.1.0 milestone Nov 18, 2025
@alamb
Copy link
Contributor Author

alamb commented Nov 18, 2025

FYI @vustef and @etseidl

Copy link
Contributor

@etseidl etseidl left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @alamb.

Copy link
Contributor

@scovich scovich left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@vustef vustef left a comment

Choose a reason for hiding this comment

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

Thanks!

@alamb alamb merged commit 0dcc401 into apache:main Nov 19, 2025
16 checks passed
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.

4 participants