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 2024/11/19 08:53:08 UTC
[I] Allow `file_format` to be lower-case as well [iceberg-python]
Fokko opened a new issue, #1340:
URL: https://github.com/apache/iceberg-python/issues/1340
### Feature Request / Improvement
Based on some testing in Iceberg-Rust https://github.com/apache/iceberg-rust/pull/349#pullrequestreview-2444443544 it came to the light that with PyIceberg the `file_format` field has to be uppercase. I think it would be good to allow for lowercase as well 👍
--
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 `file_format` to be lower-case [iceberg-python]
Posted by "jiakai-li (via GitHub)" <gi...@apache.org>.
jiakai-li commented on issue #1340:
URL: https://github.com/apache/iceberg-python/issues/1340#issuecomment-2524188435
Not sure if I'm still able to work on this or not. But I submitted another PR, rather than modifying `__new__`, I think `_missing_` is a better candidate given its semantic meaning.
--
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 `file_format` to be lower-case [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko closed issue #1340: Allow `file_format` to be lower-case
URL: https://github.com/apache/iceberg-python/issues/1340
--
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 `file_format` to be lower-case [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on issue #1340:
URL: https://github.com/apache/iceberg-python/issues/1340#issuecomment-2528127989
Fixed in https://github.com/apache/iceberg-python/pull/1411 🙌
--
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 `file_format` to be lower-case [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #1340:
URL: https://github.com/apache/iceberg-python/issues/1340#issuecomment-2616585184
Following up on this, #1362 was merged and then reverted, #1518. Ultimately, #1411 resolves this issue, and there's a test to ensure the behavior
https://github.com/apache/iceberg-python/blob/985029042199d870f25b6fbec0e80907d4440f41/tests/utils/test_manifest.py#L609-L629
--
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 `file_format` to be lower-case [iceberg-python]
Posted by "hgollakota (via GitHub)" <gi...@apache.org>.
hgollakota commented on issue #1340:
URL: https://github.com/apache/iceberg-python/issues/1340#issuecomment-2493851999
Hey, gonna submit a pull-request - here's the solution I'm proposing:
```
class FileFormat(str, Enum):
AVRO = "AVRO", "avro"
PARQUET = "PARQUET", "parquet"
ORC = "ORC", "orc"
def __new__(cls, value, *value_aliases):
obj = str.__new__(cls)
obj._value_ = value
for alias in value_aliases:
cls._value2member_map_[alias] = obj
return obj
def __repr__(self) -> str:
"""Return the string representation of the FileFormat class."""
return f"FileFormat.{self.name}"
```
--
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 `file_format` to be lower-case [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #1340:
URL: https://github.com/apache/iceberg-python/issues/1340#issuecomment-2487473814
https://github.com/apache/iceberg-python/blob/93ebd39e3c457dcb86cd053c60d2d13f0713a637/pyiceberg/manifest.py#L95-L102
--
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