ianmcook commented on PR #36073:
URL: https://github.com/apache/arrow/pull/36073#issuecomment-1761683259

   I've been experimenting with this in C++. If I pass a `float` variable to 
the `Append` method of `HalfFloatBuilder`, it silently truncates it to an 
unsigned short integer value. If I pass a  float literal to `Append`, it 
truncates it to an unsigned short with a warning:
   ```
    warning: implicit conversion from 'double' to 'value_type' (aka 'unsigned 
short') changes value from 3.14 to 3
   ```
   
   Can we make the `Append` and `AppendValues` methods of `HalfFloatBuilder` 
automatically downcast `float` input to half-float?
   
    There's a [Gist here with the example code I'm 
using](https://gist.github.com/ianmcook/62ad82c17a0bb6cdb4f39d52785c4db9).


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to