Fokko commented on issue #5924:
URL: https://github.com/apache/iceberg/issues/5924#issuecomment-1271150482

   That's a very good point indeed. I think we have multiple cases where this 
can happen.
   
   - Using `literal(123)` we will always create a `LongLiteral`, since Python 
has no distinction between an Integer and a Long.
   - Also, when we create a bytes literal `literal(b'\00')` for the 
`FixedLiteral`:
   ```python
   >>> from pyiceberg.expressions.literals import literal
   >>> literal(b'\0x00')
   BinaryLiteral(b'\x00x00')
   ```
   We might also need to scale this when we bind it to a FixedLiteral field 
(binary field, with a fixed length). Upon binding, we should convert the type 
to the one in the schema, and check if the value is still within bounds 
(doesn't overflow an int in the case of Long to Integer, or the binary field is 
greater than the size of the FixedLength).


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