lidavidm commented on code in PR #1555:
URL: https://github.com/apache/arrow-go/pull/1555#discussion_r4582726902


##########
parquet/internal/encoding/alp_scaling_test.go:
##########
@@ -33,13 +33,18 @@ func TestALPFastRoundFloat32(t *testing.T) {
                {"positive integer", 5.0, 5},
                {"positive round up", 2.7, 3},
                {"positive round down", 2.3, 2},
-               {"positive half", 2.5, 2}, // round-to-even via magic trick
+               {"positive half", 2.5, 2}, // a tie goes to the even integer
                {"negative integer", -5.0, -5},
                {"negative round up", -2.3, -2},
                {"negative round down", -2.7, -3},
                {"zero", 0.0, 0},
                {"small positive", 0.1, 0},
                {"large integer", 12345.0, 12345},
+               // Whole numbers past 2^22, which adding and subtracting a 
constant
+               // would move.
+               {"past 2^22", 5000001, 5000001},
+               {"largest odd", 16777215, 16777215},
+               {"negative past 2^22", -5000001, -5000001},

Review Comment:
   Shouldn't we test the smallest number above the boundary and the largest 
number below the boundary, as well as the boundary numbers themselves?



-- 
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