avison9 commented on PR #4409:
URL: https://github.com/apache/iceberg-python/pull/4409#issuecomment-6958651576

   Thanks for the ping! I pulled this locally and it looks good to me.
   
   - Confirmed the decoding matches the spec's bound-inference table 
(`timestamp`/`timestamp_ns` + 4 bytes → `date`), and that 
`TimeType`/`TimestamptzType`/`TimestamptzNanoType` are correctly left on the 
8-byte path, since the spec doesn't allow promoting `date` to them.
   - Reverting the `conversions.py` change makes all 8 new tests fail with the 
original `struct.error`. Keeping the 4-byte branch but dropping the `* 
_MICROS_PER_DAY` / `* _NANOS_PER_DAY` scale also fails 7 of them, including the 
strict-evaluator row, so the scaling is properly covered.
   - Full unit suite passes and prek is clean on the changed files.
   
   A few non-blocking suggestions from me regarding your fix:
   
   1. **`timestamp_ns` through `inspect`:** the description says 
`inspect.files()` now works after promotion to `timestamp_ns`, and I confirmed 
it does locally, but the end-to-end test only covers `TimestampType`. Could you 
parametrize the `inspect.files()` part over `TimestampNanoType` too? Planning 
can stay `TimestampType`-only because of #4078.
   2. **Test location:** 
`test_plan_and_inspect_after_date_to_timestamp_promotion` mostly exercises 
`inspect` plus scan planning against a catalog, so it might fit better next to 
`test_inspect_bounds_after_type_promotion` in `tests/table/test_inspect.py` 
than in the evaluator unit tests. Up to you and the maintainers.
   3. **Nit:** the two new tests in `tests/test_conversions.py` loop over a 
`cases` list. The rest of that file uses `@pytest.mark.parametrize`, which also 
reports which case failed.
   
   LGTM otherwise.
   
   avison9
   


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