apache / arrow-rs

Official Rust implementation of Apache Arrow
https://arrow.apache.org/
Apache License 2.0
2.62k stars 802 forks source link

[arrow-cast] Support cast numeric to string view #6719

Open tlm365 opened 1 week ago

tlm365 commented 1 week ago

Which issue does this PR close?

Closes #6714.

Rationale for this change

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

What changes are included in this PR?

The cast logic and corresponding unit tests.

Are there any user-facing changes?

No.

tlm365 commented 1 week ago

@Omega359 During the code review, I found that it is possible to implement support cast for all numeric values (Int/Float/Decimal) to string view. I thought it would be good to implement it in 1 PR instead of creating new issue for each datatype -> so I implemented it in this PR. How do you think about it? If it fine, could you please update the issue description?