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


##########
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 with `NewUnboundTransform(nil, Reference("x"))` followed by 
predicate binding. Since `Bind` already reports unknown and incompatible 
transforms as errors, please reject a nil transform here (for example with 
`ErrInvalidArgument`) and add a regression test.



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