You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2025/08/05 15:28:39 UTC
[I] [Variant] Implement `cast_to_variant` kernel [arrow-rs]
alamb opened a new issue, #8043:
URL: https://github.com/apache/arrow-rs/issues/8043
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
As @Samyak2 noted on https://github.com/apache/arrow-rs/pull/8021/files#r2249926579, having the ability to convert *FROM* a typed value to a VariantArray will be important
For example, in SQL it could be used to cast columns to variant like in `some_column::variant`
**Describe the solution you'd like**
I would like a kernel like this:
```rust
/// Casts a typed arrow [`Array`] to a [`VariantArray`]. This is useful when you
/// need to convert a specific data type
pub fn cast_to_variant(input: &dyn Array) -> Result<VariantArray, ArrowError> {
```
**Describe alternatives you've considered**
I started down a templated route (see below) that got somewhat complicated
**Additional context**
<!--
Add any other context or screenshots about the feature request here.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Variant] Implement `cast_to_variant` kernel [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #8043:
URL: https://github.com/apache/arrow-rs/issues/8043#issuecomment-3211579806
`label_issue.py` automatically added labels {'parquet'} from #8044
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Variant] Implement `cast_to_variant` kernel [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #8043: [Variant] Implement `cast_to_variant` kernel
URL: https://github.com/apache/arrow-rs/issues/8043
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org