@@ -44,10 +44,11 @@ The codebase follows a layered architecture with clear separation of concerns:
4444
45452 . ** DataFusion Integration Layer** (` src/catalog.rs ` , ` src/schema.rs ` , ` src/table.rs ` )
4646 - Bridges DuckLake concepts to DataFusion's catalog system
47- - ` DuckLakeCatalog ` : Implements ` CatalogProvider ` , uses dynamic metadata lookup (queries on every call to ` schema() ` and ` schema_names() ` )
47+ - ` DuckLakeCatalog ` : Implements ` CatalogProvider ` , uses dynamic metadata lookup with configurable snapshot resolution
4848 - ` DuckLakeSchema ` : Implements ` SchemaProvider ` , uses dynamic metadata lookup (queries on every call to ` table() ` and ` table_names() ` )
4949 - ` DuckLakeTable ` : Implements ` TableProvider ` , caches table structure and file lists at creation time
5050 - ** No HashMaps** : Catalog and schema providers query metadata on-demand rather than caching
51+ - ** Snapshot Resolution** : Configurable TTL (time-to-live) for balancing freshness and performance
5152
52533 . ** Path Resolution** (` src/path_resolver.rs ` )
5354 - Centralized utilities for parsing object store URLs and resolving hierarchical paths
@@ -77,7 +78,8 @@ The catalog uses a **pure dynamic lookup** approach with no caching at the catal
7778- ** DuckLakeCatalog** (` catalog.rs ` ):
7879 - ` schema_names() ` : Queries ` list_schemas() ` on every call
7980 - ` schema() ` : Queries ` get_schema_by_name() ` on every call
80- - ` new() ` : O(1) - only fetches snapshot ID and data_path
81+ - ` new() ` : O(1) - only fetches data_path
82+ - ** Snapshot Resolution** : Configurable via ` SnapshotConfig `
8183
8284- ** DuckLakeSchema** (` schema.rs ` ):
8385 - ` table_names() ` : Queries ` list_tables() ` on every call
@@ -92,12 +94,12 @@ The catalog uses a **pure dynamic lookup** approach with no caching at the catal
9294** Benefits** :
9395- O(1) memory usage regardless of catalog size
9496- Fast catalog startup (no upfront schema/table listing)
95- - Always fresh metadata (no stale cache issues)
96- - Simple implementation (no cache invalidation logic)
97+ - Configurable freshness vs performance trade-off
98+ - Simple implementation (no complex cache invalidation logic)
9799
98100** Trade-offs** :
99101- Small query overhead per metadata lookup (acceptable for read-only DuckDB connections)
100- - Future optimization: Add optional caching layer via wrapper implementation
102+ - Snapshot resolution adds one SQL query per catalog operation (configurable via TTL)
101103
102104### Data Flow
103105
0 commit comments