You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Fokko (via GitHub)" <gi...@apache.org> on 2025/03/12 21:27:05 UTC
[I] Allow non offset based timezones [iceberg-rust]
Fokko opened a new issue, #1078:
URL: https://github.com/apache/iceberg-rust/issues/1078
### Apache Iceberg Rust version
None
### Describe the bug
I was trying to make PyIceberg rely solely on Iceberg-rust for the partition transforms, but I ran into the following:
```
def _transform(array: "ArrayLike") -> "ArrayLike":
if isinstance(array, pa.Array):
return transform_func(array, *args)
elif isinstance(array, pa.ChunkedArray):
result_chunks = []
for arr in array.iterchunks():
> result_chunks.append(transform_func(arr, *args))
E ValueError: Unexpected => Parser error: Invalid timezone "UTC": only offset based timezones supported without chrono-tz feature
```
We initialize the `datetime` as:
```python
datetime(2023, 12, 31, 0, 0, 0, tzinfo=timezone.utc)
```
### To Reproduce
In `test_transform.py`:
```python
def test_year_transform_datetime():
arr = pa.array([
datetime(1970, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
datetime(2000, 1, 1, 0, 0, 0, tzinfo=timezone.utc)
])
result = transform.year(arr)
expected = pa.array([0, 30], type=pa.int32())
assert result == expected
```
### Expected behavior
Able to just parse these. I'm not sure if we need to fix this in Arrow, or if we can import `chrono-tz` package.
### Willingness to contribute
I cannot contribute a fix for this bug at this time
--
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-unsubscribe@iceberg.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] Allow non offset based timezones [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on issue #1078:
URL: https://github.com/apache/iceberg-rust/issues/1078#issuecomment-2719602844
Seems this is cause by `arrow`, see https://github.com/apache/arrow-rs/blob/d5339f31a60a4bd8a4256e7120fe32603249d88e/Cargo.toml#L98C51-L98C56 .
The temporal transforms are using arrow to do the transform: https://github.com/apache/iceberg-rust/blob/dff4e5a1c6a45d86d5f3ee1173763b8508b7bd41/crates/iceberg/src/transform/temporal.rs#L68
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] Allow non offset based timezones [iceberg-rust]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko closed issue #1078: Allow non offset based timezones
URL: https://github.com/apache/iceberg-rust/issues/1078
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org