alamb opened a new issue, #8086:
URL: https://github.com/apache/arrow-rs/issues/8086

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   - part of https://github.com/apache/arrow-rs/issues/6736
   
   We introduced the basic `variant_get` kernel in and now we need to expand 
its feature set
   - https://github.com/apache/arrow-rs/pull/8021
   
   However, it doesn't really handle the case when the variant contains a `int` 
column but the output calls for a float, for example
   
   **Describe the solution you'd like**
   
   I would like to handle this case within the variant_get kernel
   
   
   
   **Describe alternatives you've considered**
   
   I personally suggest we follow the rules in the existing arrow [cast 
kernel](https://docs.rs/arrow/latest/arrow/compute/kernels/cast/index.html), 
likely simply calling that kernel for shredded values, and implementing the 
equivalent logic for unshredded variants. 
   
   @scovich  proposed 
https://github.com/apache/arrow-rs/pull/8021/files#r2257527874
   
   > I guess we could pursue three potential levels of casting:
   > 
   > Widening casts (based on type). E.g. if the type is int32, we can also 
handle int8, int16 and even decimal4 (if scale=0). The conversion is guaranteed 
to succeed losslessly.
   > Lossless narrowing casts (based on value). E.g. if the type is int32, we 
can still handle a small int64 value like 42. TBD what should happen if any one 
value failed to cast?
   > Converting casts. These are the lossy ones, e.g. converting 3.14f64 to 
3i32, or 3i32 to string. I'm guessing we don't want to mess with these?
   
   
   
   
   
   **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-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to