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


##########
exprs.go:
##########
@@ -1121,7 +1124,17 @@ func (u *UnboundTransform) Equals(other UnboundTerm) 
bool {
 }
 
 func (u *UnboundTransform) Bind(schema *Schema, caseSensitive bool) 
(BoundTerm, error) {
-       bound, err := u.term.Bind(schema, caseSensitive)
+       if isUnknownTransform(u.transform) {

Review Comment:
   `NewUnboundTransform` is exported and accepts a `Transform` interface, so 
callers can pass `nil`. In that case this check falls through and 
`u.transform.CanTransform(...)` panics instead of returning an error. I 
reproduced this by binding `EqualTo(NewUnboundTransform(nil, Reference("x")), 
int32(1))`. Please reject a nil transform here with an appropriate error (for 
example `ErrInvalidArgument`) and add regression coverage. This is the same 
issue currently present in the stacked dependency #1679.



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