Add DuckDB-style Table Functions for Catalog Metadata#5
Merged
Conversation
zfarrell
reviewed
Dec 15, 2025
zfarrell
reviewed
Dec 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds SQL-queryable
information_schemavirtual tables to expose DuckLake catalog metadata, following the SQL standard pattern#4
Changes
New virtual tables in
information_schemaschema:snapshots- Lists all catalog snapshotsschemata- Lists schemas with pathstables- Lists tables across all schemascolumns- Lists columns with typesfiles- Lists data files with size and delete file statusLive querying: All tables query the catalog database on every execution (no caching)
Integration: Registered as a special schema in
DuckLakeCatalogUser SQL Query
↓
DataFusion Query Planner
↓
DuckLakeCatalog.schema("information_schema")
↓
InformationSchemaProvider.table("tables")
↓
TablesTable (Custom TableProvider)
↓
TablesTable.scan() → LIVE QUERY
↓
MetadataProvider.list_*() methods
↓
DuckDB Catalog Database
↓
Arrow RecordBatch (fresh results)
New Table Functions
Three new table functions are available:
ducklake_snapshots()- List all snapshots in the catalogducklake_table_info()- Table metadata with aggregated file statisticsducklake_list_files()- Enumerate all data files across tablesRegistration
Usage
Table Functions (DuckDB-style)
information_schema Tables (SQL Standard)
The underlying information_schema virtual tables remain available: