You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "sungwy (via GitHub)" <gi...@apache.org> on 2024/09/11 01:43:40 UTC
[PR] Use historical partition field name [iceberg-python]
sungwy opened a new pull request, #1161:
URL: https://github.com/apache/iceberg-python/pull/1161
Fixes: https://github.com/apache/iceberg-python/issues/1131
--
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: [PR] Bug Fix: Use historical partition field name [iceberg-python]
Posted by "sungwy (via GitHub)" <gi...@apache.org>.
sungwy commented on code in PR #1161:
URL: https://github.com/apache/iceberg-python/pull/1161#discussion_r1755686149
##########
pyiceberg/table/update/spec.py:
##########
@@ -280,7 +280,7 @@ def _partition_field(self, transform_key: Tuple[int, Transform[Any, Any]], name:
for field_key in historical_fields:
if field_key[0] == source_id and field_key[2] == repr(transform):
if name is None or field_key[3] == name:
- return PartitionField(source_id, field_key[1], transform, name)
+ return PartitionField(source_id, field_key[1], transform, field_key[3])
Review Comment:
Hey, thank you for the great suggestion! I didn't use Enums, but updated it to use a list of PartitionField instead, which I think makes a lot more sense than the current approach.
--
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: [PR] Bug Fix: Use historical partition field name [iceberg-python]
Posted by "sungwy (via GitHub)" <gi...@apache.org>.
sungwy merged PR #1161:
URL: https://github.com/apache/iceberg-python/pull/1161
--
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: [PR] Bug Fix: Use historical partition field name [iceberg-python]
Posted by "ndrluis (via GitHub)" <gi...@apache.org>.
ndrluis commented on code in PR #1161:
URL: https://github.com/apache/iceberg-python/pull/1161#discussion_r1754541566
##########
pyiceberg/table/update/spec.py:
##########
@@ -280,7 +280,7 @@ def _partition_field(self, transform_key: Tuple[int, Transform[Any, Any]], name:
for field_key in historical_fields:
if field_key[0] == source_id and field_key[2] == repr(transform):
if name is None or field_key[3] == name:
- return PartitionField(source_id, field_key[1], transform, name)
+ return PartitionField(source_id, field_key[1], transform, field_key[3])
Review Comment:
What do you think about using an Enum to get the values from the field_key? I think that will make it easier to understand what each position means.
--
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