-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: test with the
HalfFloatType
from arrow (#503)
Hi this PR adds an extra test case that tests `ArrowFloatToHalfFloat` and `ArrowArrayViewGet{Double,Int,UInt}Unsafe` with the `HalfFloatType` from arrow. https://github.com/apache/arrow/blob/255dbf990c3d3e5fb1270a2a11efe0af2be195ab/cpp/src/arrow/type.h#L704-L713 And sorry that I didn't know there's a `HalfFloatType` in arrow-cpp when I was doing #501 🥲. ~Sadly that we cannot simply append `TestGetFromNumericArrayView<HalfFloatType>();` at the end of the `ArrayViewTestGetNumeric` test suite because we have to convert floats to half-floats using `ArrowFloatToHalfFloat` before calling `builder.Append` (otherwise we'll get weird values back in the subsequent `ArrowArrayViewGet{Double,Int,UInt}Unsafe` calls).~ Added some simple C++ magic and we can simply append `TestGetFromNumericArrayView<HalfFloatType>();` at the end of the `ArrayViewTestGetNumeric` test suite now.
- Loading branch information
Showing
3 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters