Skip to content

Conversation

@AryanBagade
Copy link
Contributor

Which issue does this PR close?

Implements #19074

Rationale for this change

As the default cache implementations expand, the module structure under datafusion/execution/src/cache/ has become crowded. This PR continues the pattern established in #18855 by separating DefaultFilesMetadataCache into its own module to improve code organization and maintainability.

What changes are included in this PR?

  • Created new file_metadata_cache.rs module containing:
    • DefaultFilesMetadataCacheState (internal state management)
    • DefaultFilesMetadataCache (public struct and implementation)
    • All trait implementations (FileMetadataCache and CacheAccessor)
    • All 3 related tests and test helpers
  • Updated mod.rs to declare and export the new module
  • Updated cache_manager.rs to import from new location
  • Cleaned up cache_unit.rs (reduced from 863 to 159 lines)

Are these changes tested?

Yes, all existing tests have been moved to the new module and pass successfully

Are there any user-facing changes?

No user-facing changes. This is purely an internal code organization refactoring.

Implements apache#19074

Separates DefaultFilesMetadataCache into its own module following the same pattern as DefaultListFilesCache to improve organization of the cache module.
@github-actions github-actions bot added the execution Related to the execution crate label Dec 6, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @AryanBagade @petern48 and @adriangb

I think it would be great to add a pub use as suggested by @adriangb to help upgrades

cc @BlakeOrth

@AryanBagade
Copy link
Contributor Author

sure will add it!!!

Copy link
Contributor

@BlakeOrth BlakeOrth left a comment

Choose a reason for hiding this comment

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

This looks great to me, thank you!

@adriangb adriangb added this pull request to the merge queue Dec 8, 2025
Merged via the queue into apache:main with commit 0812d27 Dec 8, 2025
27 checks passed
@alamb
Copy link
Contributor

alamb commented Dec 8, 2025

🚀

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

Labels

execution Related to the execution crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants