Skip to content

[python] Use canonical partition values when listing partitions - #10894

Open
XiaoHongbo-Hope wants to merge 3 commits into
apache:masterfrom
XiaoHongbo-Hope:codex/python-null-partition-spec
Open

XiaoHongbo-Hope wants to merge 3 commits into
apache:masterfrom
XiaoHongbo-Hope:codex/python-null-partition-spec

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Partition listing formats manifest values with str(), so a null DATE partition is returned as "None" instead of the configured default partition name. Consumers that parse the returned spec as DATE then fail. A null STRING partition can also be merged with the literal string "None".

Group manifest entries by serialized partition rows and use the path factory's canonical encoding only for output specs, matching commit statistics after #10461. NULL, whitespace and a literal default partition name remain separate even when their output specs coincide. This fixes filesystem listing and the REST catalog's filesystem fallback, including custom default partition names. It does not rewrite partition metadata already stored by a REST server.

Tests

  • Filesystem catalog and REST fallback: 33 passed, 6 subtests passed.
  • Regression covers null DATE/STRING values, default/custom null markers, literal "None", and colliding NULL/whitespace/default-name partitions across two commits, including statistics, filtering and pagination.
  • Both collision cases fail before the fix (1 partition instead of 3).
  • Configured Flake8, Python 3.6 compilation and git diff --check passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant