zeroshade commented on code in PR #1877:
URL: https://github.com/apache/iceberg-go/pull/1877#discussion_r3864517206


##########
exprs_test.go:
##########
@@ -999,6 +999,38 @@ func TestBindAboveBelowIntMax(t *testing.T) {
        }
 }
 
+func TestBindOutOfRangeDate(t *testing.T) {
+       sc := iceberg.NewSchema(1,
+               iceberg.NestedField{ID: 1, Name: "d", Type: 
iceberg.PrimitiveTypes.Date},
+       )
+
+       ref := iceberg.Reference("d")
+       above, below := int64(math.MaxInt32)+1, int64(math.MinInt32)-1
+
+       tests := []struct {
+               name     string
+               pred     iceberg.BooleanExpression
+               expected iceberg.BooleanExpression
+       }{
+               {"eq above max", iceberg.EqualTo(ref, above), 
iceberg.AlwaysFalse{}},
+               {"eq below min", iceberg.EqualTo(ref, below), 
iceberg.AlwaysFalse{}},
+               {"neq above max", iceberg.NotEqualTo(ref, above), 
iceberg.AlwaysTrue{}},
+               {"in mixed range", iceberg.IsIn(ref, int64(34), above, below), 
iceberg.EqualTo(ref, iceberg.Date(34))},

Review Comment:
   This case (along with the two set cases below it) currently fails because 
the branch does not contain PR #1872's sentinel filtering for `IN`/`NOT IN`, 
and #1872 is still open rather than present on `main`. The sentinels remain in 
the bound set instead of simplifying to the expected predicate. Please rebase 
after #1872 merges, stack this PR on it, or include the required set-binding 
change so the PR is independently green.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to