sohailshk commented on PR #4421:
URL: https://github.com/apache/iceberg-python/pull/4421#issuecomment-7010557534

   Thanks for the review. You are right: `test_unsupported_transform` asserted 
that appending the `large_binary` column to a `truncate(2)`-partitioned binary 
column raises a ValueError. That error was the bug this PR fixes (the Arrow 
column was passed to the truncate transform without being cast to the table's 
`binary` type), so the old assertion encoded the bug.
   
   I replaced it with `test_truncate_transform_on_large_binary` (format 
versions 1 and 2). It appends the same Arrow table and checks that the append 
succeeds, that Spark reads back 3 rows (2 non-null, 1 null binary), and that 
there are 3 partitions.
   
   On the out-of-range integer point: agreed, an int64 or uint64 column with 
values outside the range of an `int` source column now raises `ArrowInvalid` (a 
`ValueError` subclass) from the cast, which I think is the right outcome too. I 
added a line about it to the PR description.
   
   Checks run: ruff check and ruff format --check on the changed test file 
pass; the integration test was not run locally (no Docker here), so I am 
relying on the CI integration job for it.
   


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