benibus commented on code in PR #37599:
URL: https://github.com/apache/arrow/pull/37599#discussion_r1326325154
##########
go/parquet/metadata/statistics_types.tmpldata:
##########
Review Comment:
This is just a copy of `internal/encoding/physical_types.tmpldata` with the
new type appended. I don't think the generator supports passing multiple files
ATM but that would be a preferable option.
##########
go/parquet/internal/testutils/random.go:
##########
@@ -369,6 +370,18 @@ func randFloat64(r *rand.Rand) float64 {
}
}
+// randFloat16 creates a random float value with a normal distribution
+// to better spread the values out and ensure we do not return any NaN or Inf
values.
+func randFloat16(r *rand.Rand) float16.Num {
+ for {
+ f16 := float16.FromBits(uint16(r.Uint64n(math.MaxUint16 + 1)))
+ f64 := float64(f16.Float32())
+ if !math.IsNaN(f64) && !math.IsInf(f64, 0) {
Review Comment:
The other `randFloat` functions don't exclude infinities. Should we change
that? The checks for approximate equality will fail when comparing infinities
of the same sign.
--
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]