You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "fallintoplace (via GitHub)" <gi...@apache.org> on 2026/07/25 15:43:14 UTC
[PR] Core: Preserve empty bounds in inspect.manifests [iceberg-python]
fallintoplace opened a new pull request, #3708:
URL: https://github.com/apache/iceberg-python/pull/3708
# Rationale for this change
Manifest partition summaries encode string bounds as bytes. An empty string is represented by `b""`, but `InspectTable.manifests()` checked the encoded bounds by truthiness. As a result, valid empty-string lower and upper bounds were returned as null.
This change checks whether each bound is absent instead, preserving empty values while continuing to return null for missing bounds. This matches Apache Iceberg Java's manifests metadata table.
## Are these changes tested?
Yes. A regression test writes a table partitioned by an identity-transformed string containing an empty value and verifies that both manifest partition bounds remain empty strings.
The following checks pass locally:
- `PYTHONPATH=. uv run pytest tests/table/test_inspect.py -q` (5 passed)
- `PYTHONPATH=. uv run --extra datafusion --extra pyiceberg-core pytest -p no:cacheprovider tests/table -q` (328 passed)
- `make lint`
## Are there any user-facing changes?
Yes. `table.inspect.manifests()` now reports empty-string partition bounds as empty strings instead of null. There are no API changes.
--
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] Core: Preserve empty partition bounds in inspect.manifests [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko merged PR #3708:
URL: https://github.com/apache/iceberg-python/pull/3708
--
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] Core: Preserve empty partition bounds in inspect.manifests [iceberg-python]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #3708:
URL: https://github.com/apache/iceberg-python/pull/3708#issuecomment-5433237906
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.
--
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] Core: Preserve empty partition bounds in inspect.manifests [iceberg-python]
Posted by "fallintoplace (via GitHub)" <gi...@apache.org>.
fallintoplace commented on PR #3708:
URL: https://github.com/apache/iceberg-python/pull/3708#issuecomment-5436496970
I just rebased, please check again.
--
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] Core: Preserve empty partition bounds in inspect.manifests [iceberg-python]
Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on code in PR #3708:
URL: https://github.com/apache/iceberg-python/pull/3708#discussion_r3655507988
##########
tests/table/test_inspect.py:
##########
@@ -68,3 +70,14 @@ def test_inspect_entries_and_files_render_null_bound(catalog: InMemoryCatalog) -
files_metrics = tbl.inspect.files().to_pydict()["readable_metrics"][0]["s"]
assert files_metrics["lower_bound"] is None
assert files_metrics["upper_bound"] is None
+
+
+def test_inspect_manifests_preserves_empty_string_bounds(catalog: InMemoryCatalog) -> None:
+ schema = Schema(NestedField(1, "s", StringType(), required=False))
Review Comment:
`required=False` looks redundant.
##########
tests/table/test_inspect.py:
##########
@@ -68,3 +70,14 @@ def test_inspect_entries_and_files_render_null_bound(catalog: InMemoryCatalog) -
files_metrics = tbl.inspect.files().to_pydict()["readable_metrics"][0]["s"]
assert files_metrics["lower_bound"] is None
assert files_metrics["upper_bound"] is None
+
+
+def test_inspect_manifests_preserves_empty_string_bounds(catalog: InMemoryCatalog) -> None:
+ schema = Schema(NestedField(1, "s", StringType(), required=False))
+ spec = PartitionSpec(PartitionField(1, 1000, IdentityTransform(), "s"))
+ tbl = catalog.create_table("default.empty_string_partition", schema, partition_spec=spec)
+ tbl.append(pa.table({"s": [""]}, schema=pa.schema([pa.field("s", pa.large_string(), nullable=True)])))
Review Comment:
`nullable=True` looks redundant.
--
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