feat(common): add data store types for parquet/metadata ops #1510
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Encapsulate object store and metadata database operations into
StoreandCachedStoretypes. This centralizes data layer logic and makes dependencies explicit throughout the codebase.Storetype wrapping object store + metadata DBCachedStorefor read-optimized access patternsPhysicalTableand catalog readers to use StoreNote
Encapsulates object store + metadata DB into Store/CachedStore and refactors catalog, dump, query, and services to use it, consolidating metadata ops and parquet caching.
store::Store(wraps metadata DB + object store) andstore::CachedStore(adds parquet metadata caching) with helpers for table revision/file ops and object I/O; centralize related error types.PhysicalTableto holdStore; move table registration/activation, file listing/registration, and deletion throughStore. Replaceget_active_physical_tablewithStore::get_active_table_revision; updateregister_new_table_revision,restore_latest_revision, snapshots, and listing APIs.CachedStoreand create readers viaStore(remove direct foyer usage here).Store.QueryEnvnow passesparquet_cache_size_mb;QueryContext::for_catalogbuilds aCachedStoreand threads it through planning/registration.Store/CachedStorefor listing, writing, deleting, and metadata registration.ParquetFileWriternow receivesStore,BufWriter, andFileName; footer extraction viaStore.consistency_checkrequiresStore; object-store ops routed through it.controller_cmd,server_cmd,solo_cmd,worker_cmd) constructStorewithmetadata_db; services passStoreinstead of raw object store/DB.physical_table::get_active_physical_table->get_active.Store/CachedStore; update restore and consistency checks; replace direct object-store calls withStoremethods.Written by Cursor Bugbot for commit a5be127. This will update automatically on new commits. Configure here.