[feature request] Support Time64Type[ns]
Feature Request / Improvement
Currently Time64Type[ns] (Time64Type with nanosecond precision) is not supported. Only Time64Type[ms] (Time64Type with microsecond precision) is supported.
https://github.com/apache/iceberg-python/blob/d8d509ff1bc33040b9f6c90c28ee47ac7437945d/pyiceberg/io/pyarrow.py#L1071-L1072
Also add the ability to downcast, similar to the pa.types.is_timestamp(primitive): branch.
Interestingly Time64Type[ns] is False when evaluating pa.types.is_timestamp(primitive).
@kevinjqliu if the issue is still available can you assign it to me please
@zaryab-ali assigned to you
@kevinjqliu can you please review my PR and let me know if i made a mistake (please check with extra caution as it is my first contribution to any open source project)
@kevinjqliu did someone else solve the issue while it was still assigned to me??? or is this still open??? because i just made the changes and added the test case
@zaryab-ali Hey, sorry about the confusion. I did not see that 2 PRs were opened for the same issue. I just assumed it was from the same person. The issue is still open, #1188, #1206, and #1215 are all trying to address it. Since it's already assigned to you, I'll take a look at #1215.
Hey @JE-Chen, since this issue is already assigned to @zaryab-ali, would you mind collaborating with him on it?
This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.
| Interestingly Time64Type[ns] is False when evaluating pa.types.is_timestamp(primitive).
I think this is expected, time64/32 is not a timestamp but a time.
>>> import pyarrow as pa
>>> pa.types.is_timestamp(pa.time64("ns"))
False
>>> pa.types.is_time(pa.time64("ns"))
True
Hi, I see there’s an existing PR #1252 for this issue but it looks stale.
If there’s no objection, I can pick this up and open a new PR to move it forward, referencing the original work.
Please let me know if that’s okay.