syun64 commented on code in PR #350: URL: https://github.com/apache/iceberg-python/pull/350#discussion_r1475056028
########## pyiceberg/io/pyarrow.py: ########## @@ -1339,7 +1339,10 @@ def update_min(self, val: Any) -> None: def update_max(self, val: Any) -> None: self.current_max = val if self.current_max is None else max(val, self.current_max) - def min_as_bytes(self) -> bytes: + def min_as_bytes(self) -> Optional[bytes]: Review Comment: It fails when we try to pack None values into certain structs like _INT_STRUCT or _LONG_STRUCT ``` >>> import struct >>> struct.Struct("<i").unpack(None) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: a bytes-like object is required, not 'NoneType' ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org