Fokko commented on issue #1424:
URL: 
https://github.com/apache/iceberg-python/issues/1424#issuecomment-2544900271

   I'm also not seeing how this could happen, to test this, I also ran this 
script:
   
   ```
   Python 3.10.14 (main, Mar 19 2024, 21:46:16) [Clang 15.0.0 
(clang-1500.3.9.4)]
   Type 'copyright', 'credits' or 'license' for more information
   IPython 8.26.0 -- An enhanced Interactive Python. Type '?' for help.
   
   In [1]: import uuid
      ...: 
      ...: while True:
      ...:     rnd_uuid = uuid.uuid4()
      ...:     snapshot_id = int.from_bytes(
      ...:         bytes(lhs ^ rhs for lhs, rhs in zip(rnd_uuid.bytes[0:8], 
rnd_uuid.bytes[8:16])), byteorder="little", signed=True
      ...:     )
      ...:     snapshot_id = snapshot_id if snapshot_id >= 0 else snapshot_id * 
-1
      ...:     if snapshot_id > 9223372036854775807:
      ...:         print("Boom")
      ...: 
   ```
   
   I think we should add some checks to ensure that the `snapshot_id` is in the 
range of `[0, 9223372036854775807]` or raise a `ValueError` instead. Would you 
be interested in contributing that @Samreay ? I think this should happen in the 
`SnapshotProducer`


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

Reply via email to