Skip to content

[Variant] Minor: use From impl to make conversion infallable - #8068

Merged
alamb merged 1 commit into
apache:mainfrom
alamb:alamb/cleanup_cast_to_variant
Aug 6, 2025
Merged

alamb merged 1 commit into
apache:mainfrom
alamb:alamb/cleanup_cast_to_variant

Conversation

@alamb

@alamb alamb commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

@scovich had a good suggestion here https://github.com/apache/arrow-rs/pull/8044/files#r2257256848:

value.into() makes clear that the conversion is infallible?

What changes are included in this PR?

Use From impl to make it clear the conversion is infallible and can not lose precision

Are these changes tested?

Covered by existing tests

Are there any user-facing changes?

No

@scovich scovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@alamb
alamb merged commit 3e7c887 into apache:main Aug 6, 2025
@alamb

alamb commented Aug 6, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @scovich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants