arrow icon indicating copy to clipboard operation
arrow copied to clipboard

[C++] Add tests for HalfFloatScalar

Open pitrou opened this issue 6 months ago • 1 comments

Describe the enhancement requested

We have this long-standing TODO in scalar_test.cc that we should be able to address now that we have better float16 support in the library: https://github.com/apache/arrow/blob/85b4e6d0af00f795a4530896d5c3779f2e95ccea/cpp/src/arrow/scalar_test.cc#L1174

Component(s)

C++

pitrou avatar Jun 24 '25 10:06 pitrou

@dinse I don't know if you're interested in this.

pitrou avatar Jun 24 '25 10:06 pitrou

I added HalfFloatType to the params for TestRealScalar. Then, the equality comparisons fail for NaN and 0/-0, which I think is related to #46739.

dinse avatar Jun 27 '25 02:06 dinse

Describe the enhancement requested

We have this long-standing TODO in scalar_test.cc that we should be able to address now that we have better float16 support in the library:

arrow/cpp/src/arrow/scalar_test.cc

Line 1174 in 85b4e6d

// TODO test HalfFloatScalar

Component(s)

C++

@pitrou While working on this pull request, I realized that there are no such tests for Array, ChunkedArray, RecordBatch, or Table .

andishgar avatar Jun 29 '25 15:06 andishgar

This is potentially handled in https://github.com/apache/arrow/pull/46973 (along with the Array tests).

benibus avatar Jul 05 '25 01:07 benibus