Lance
Note:
Read-only Lance access is available from VeloDB Core 26.1.3.
Lance is a columnar data format designed for analytics and AI workloads. VeloDB Cloud can read Lance datasets through a Lance Catalog or through the s3() and local() table-valued functions (TVFs).
For Lance type mappings, see Data type mapping.
Supported features
| Feature | Support |
|---|---|
| Lance Catalog | Supports Filesystem Catalog and REST Catalog |
| File TVFs | Supports s3() and local() |
| Schema inference and column pruning | Supported |
| Parallel Fragment scans | Supported by Catalog queries and S3 TVFs |
| Predicate pushdown | Supports compatible scalar predicates |
| Vector search | Supports Lance vector indexes and Flat Search through vector_search() |
| Writing to Lance | Not supported |
| Time Travel | Not supported |
| Full-Text Search / Hybrid Search | Not supported |
For Catalog configuration, type mapping, predicate pushdown, and vector search details, see Lance Catalog.
Query a Lance dataset with a file TVF
The uri or file_path must point directly to the root directory of one Lance dataset, rather than an internal file such as data/*.lance.
The following example reads a Lance dataset from S3-compatible object storage:
SELECT user_id, name
FROM s3(
"uri" = "s3://my-bucket/lance/user_profiles.lance",
"s3.endpoint" = "https://<object-storage-host>",
"s3.access_key" = "<access-key>",
"s3.secret_key" = "<secret-key>",
"s3.region" = "us-east-1",
"use_path_style" = "true",
"format" = "lance"
)
WHERE user_id > 100;
The engine also has a local() TVF that requires a dataset path on a backend node and a backend_id. Warehouse users do not manage backend files. Use object storage for warehouse access; coordinate any service-side local dataset use with VeloDB Cloud support.
Limitations
- Lance access is read-only. Creating, writing, updating, or deleting Lance tables is not supported.
- Only
s3()andlocal()support the Lance format. Other file TVFs, such as HDFS and HTTP, are not supported. - One TVF path can represent only one Lance dataset, and
path_partition_keysis not supported. - Queries read the current dataset version. SQL cannot select a Version or perform Time Travel.
- Local TVF Schema discovery and execution open the latest dataset version independently. Avoid modifying the dataset while a Local TVF query is being analyzed and executed.