Skip to content

[core] Optimize partition discovery with projected manifest scans - #9321

Open
zhoulii wants to merge 2 commits into
apache:masterfrom
zhoulii:feature/partition-entry-narrow-projection
Open

[core] Optimize partition discovery with projected manifest scans#9321
zhoulii wants to merge 2 commits into
apache:masterfrom
zhoulii:feature/partition-entry-narrow-projection

Conversation

@zhoulii

@zhoulii zhoulii commented Aug 20, 2026

Copy link
Copy Markdown
Member

Purpose

close #9320

Tests

}

/** Returns whether a manifest of this size is eligible for the configured cache. */
public boolean isCacheable(long fileSize) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use isCacheEnabled?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isCacheable(fileSize) is intentional. When a manifest exceeds maxElementSize, ObjectsCache bypasses it even if caching is enabled. Using isCacheEnabled() would unnecessarily disable projected scans for
these large, non-cacheable manifests.

} else {
PartitionEntry.merge(
readManifest(m, PartitionEntry::fromManifestEntry, null, null),
readManifest(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should just modify readManifest, Only readManifest knows whether direct access is currently possible, whether there are filtering conditions, and so on.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, addressed. The projected/full-read selection is now centralized in an overloaded readManifest method, which checks cache eligibility and filters requiring complete manifest entries.

readPartitionEntries only supplies the projection, projected filter, converter, and aggregation consumer, while the projected path still aggregates entries in a streaming manner.

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.

[Feature] Optimize partition discovery with projected manifest scans

2 participants