eneskeles commented on code in PR #2088:
URL: https://github.com/apache/iceberg-go/pull/2088#discussion_r4155815577


##########
variant_cast.go:
##########
@@ -281,3 +278,36 @@ func literalFromCastValue(result any) Literal {
 
        return nil
 }
+
+func literalFromVariant(v variant.Value) (Literal, bool) {
+       // a zero Value has no header byte to read a type from
+       if len(v.Bytes()) == 0 {

Review Comment:
   Without this check the following case panics - its a caller's mistake but 
it'd still be a regression: 
   ```go
   leaf, _, _ := obj.GetByPath(path.Field("amount"))          // row has no 
"amount"
   filter := iceberg.EqualTo(iceberg.Reference("total"), leaf) // leaf is a 
zero Value
   iceberg.BindExpr(schema, filter, true)
   ``` 
   



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