Skip to content

[core] Narrow format table partition listing by name pattern - #9025

Merged
JingsongLi merged 1 commit into
apache:masterfrom
sundapeng:format-table-partition-name-pattern
Aug 4, 2026
Merged

[core] Narrow format table partition listing by name pattern#9025
JingsongLi merged 1 commit into
apache:masterfrom
sundapeng:format-table-partition-name-pattern

Conversation

@sundapeng

Copy link
Copy Markdown
Member

Purpose

A filtered query over a catalog-managed format table still lists every partition. This PR derives a conservative partition name pattern from equality and bounded range predicates on leading partition fields, and passes it to the paged partition listing. A predicate that cannot be represented safely falls back to the unfiltered listing, so no matching partition can be dropped. String prefixes are computed by Unicode code point, so a generated pattern never contains an isolated surrogate.

Tests

PartitionNamePatternsTest and CatalogFormatTablePartitionManagerTest cover equality and range combinations, unsupported predicates, null boundaries, escaping, Unicode supplementary characters, and the manager integration.

Derive a conservative partition name pattern from partition predicates
and pass it to catalog partition listing, so a filtered query over a
catalog-managed format table does not enumerate every partition.

Only equality and bounded range predicates on leading partition fields
produce a pattern. Anything unrepresentable falls back to the
unfiltered listing, so no matching partition can be dropped. String
prefixes are computed by Unicode code point, so a generated pattern
never contains an isolated surrogate.
@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit fdfd718 into apache:master Aug 4, 2026
12 checks 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.

2 participants