Lance Namespace-DataFusion Integration
This crate provides a bridge between Lance Namespaces and Apache DataFusion, allowing Lance tables to be queried as if they were native DataFusion catalogs, schemas, and tables.
It exposes a SessionBuilder that constructs a DataFusion SessionContext with CatalogProvider and SchemaProvider implementations backed by a lance_namespace::LanceNamespace instance.
Features
- Dynamic Catalogs: Maps top-level Lance namespaces to DataFusion catalogs.
- Dynamic Schemas: Maps child namespaces to DataFusion schemas.
- Lazy Table Loading: Tables are loaded on-demand from the namespace when queried.
- Read-Only: This integration focuses solely on providing read access (SQL
SELECT) to Lance datasets. DML operations are not included.
Usage
First, build a LanceNamespace (e.g., from a directory), then use the SessionBuilder to create a SessionContext.
use Arc;
use SessionContext;
use SessionBuilder;
use LanceNamespace;
use DirectoryNamespaceBuilder;
async