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

[arrow-cast] Support cast numeric to string view (alternate) #6816

Merged
merged 3 commits into from
Dec 1, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Nov 29, 2024

Which issue does this PR close?

Based on the work of @tlm365 in #6719

Rationale for this change

Fill out cast functionality for Utf8View

See more discussion here: #6719 (comment)

What changes are included in this PR?

Add support cast from numeric(Int/Float/Decimal) to string view (Utf8View).

Are there any user-facing changes?

More cast support

Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>
fn test_cast_float_to_utf8view() {
let inputs = vec![
Arc::new(Float16Array::from(vec![
Some(f16::from_f64(1.0)),
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be 8.64 & 9.81

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doh -- I swear I ran these tests but clearly not. Fixed

@tustvold tustvold merged commit 8a8c10d into apache:main Dec 1, 2024
26 checks passed
@alamb alamb deleted the alamb/cast_numeric_to_string2 branch December 2, 2024 12:11
@alamb
Copy link
Contributor Author

alamb commented Dec 2, 2024

Thank you @Omega359 @tustvold and @tlm365

alamb added a commit to alamb/arrow-rs that referenced this pull request Jan 5, 2025
…6816)

* [arrow-cast] Support cast numeric to string view

Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>

* fix test

---------

Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>
Co-authored-by: Tai Le Manh <manhtai.lmt@gmail.com>
alamb added a commit that referenced this pull request Jan 8, 2025
…6944)

* [arrow-cast] Support cast numeric to string view



* fix test

---------

Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>
Co-authored-by: Tai Le Manh <manhtai.lmt@gmail.com>
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.

Support Numeric -> Utf8View casting
4 participants