From 7afdffa72550092b3cc321ee64c412e179e53c66 Mon Sep 17 00:00:00 2001 From: HaoXuAI Date: Tue, 6 Oct 2026 21:29:59 -0700 Subject: [PATCH 1/2] feat: Add Lance optional dependencies Signed-off-by: HaoXuAI --- docs/reference/data-sources/table-formats.md | 25 ++++++++++++++++++- pyproject.toml | 6 ++++- .../data_sources/test_lance_dependencies.py | 18 +++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 sdk/python/tests/unit/infra/data_sources/test_lance_dependencies.py diff --git a/docs/reference/data-sources/table-formats.md b/docs/reference/data-sources/table-formats.md index f00e6f80c5f..047f1771d18 100644 --- a/docs/reference/data-sources/table-formats.md +++ b/docs/reference/data-sources/table-formats.md @@ -8,6 +8,29 @@ Feast supports modern table formats to enable data lakehouse architectures with ## Supported Table Formats +### Lance + +[Lance](https://lancedb.github.io/lance/) is an Arrow-native table format with +versioned datasets and vector indexing. Install Feast's native Lance reader and +namespace client with: + +```bash +pip install 'feast[lance]' +``` + +Use `LanceFormat` to select a namespace and optionally pin reads to a dataset +version or tag: + +```python +from feast.table_format import LanceFormat + +lance_format = LanceFormat( + catalog="my_catalog", + namespace="features", + tag="candidate", +) +``` + ### Apache Iceberg [Apache Iceberg](https://iceberg.apache.org/) is an open table format designed for huge analytic datasets. It provides: @@ -354,4 +377,4 @@ Future support planned for: - [Apache Iceberg Documentation](https://iceberg.apache.org/docs/latest/) - [Delta Lake Documentation](https://docs.delta.io/latest/index.html) - [Apache Hudi Documentation](https://hudi.apache.org/docs/overview) -- [Python API Reference - TableFormat](https://rtd.feast.dev/en/master/#feast.table_format) \ No newline at end of file +- [Python API Reference - TableFormat](https://rtd.feast.dev/en/master/#feast.table_format) diff --git a/pyproject.toml b/pyproject.toml index b2974b55a9c..6f76b668a45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,6 +116,10 @@ openlineage = ["openlineage-python>=1.40.0"] opentelemetry = ["prometheus_client", "psutil"] spark = ["pyspark>=4.0.0"] iceberg = ["pyiceberg>=0.7.0"] +lance = [ + "pylance>=12.0.0", + "lance-namespace>=0.11.1", +] trino = ["trino>=0.305.0,<0.400.0", "regex"] postgres = ["psycopg[binary,pool]>=3.2.5"] # psycopg[c] install requires a system with a C compiler, python dev headers, & postgresql client dev headers @@ -167,7 +171,7 @@ test = [ ] ci = [ - "feast[test, aws, azure, cassandra, clickhouse, couchbase, delta, docling, duckdb, elasticsearch, faiss, gcp, ge, glide, go, grpcio, hazelcast, hbase, ibis, iceberg, image, k8s, mcp, milvus, mlflow, mongodb, mssql, mysql, openlineage, opentelemetry, oracle, scylladb, spark, trino, postgres, pytorch, qdrant, rag, ray, redis, singlestore, snowflake, sqlite_vec]", + "feast[test, aws, azure, cassandra, clickhouse, couchbase, delta, docling, duckdb, elasticsearch, faiss, gcp, ge, glide, go, grpcio, hazelcast, hbase, ibis, iceberg, image, k8s, lance, mcp, milvus, mlflow, mongodb, mssql, mysql, openlineage, opentelemetry, oracle, scylladb, spark, trino, postgres, pytorch, qdrant, rag, ray, redis, singlestore, snowflake, sqlite_vec]", "build", "virtualenv==20.23.0", "dbt-artifacts-parser", diff --git a/sdk/python/tests/unit/infra/data_sources/test_lance_dependencies.py b/sdk/python/tests/unit/infra/data_sources/test_lance_dependencies.py new file mode 100644 index 00000000000..d3f623d430d --- /dev/null +++ b/sdk/python/tests/unit/infra/data_sources/test_lance_dependencies.py @@ -0,0 +1,18 @@ +from __future__ import annotations + +from pathlib import Path + +import toml # type: ignore[import-untyped] + + +def test_lance_extra_installs_native_reader_and_is_included_in_ci() -> None: + pyproject_path = Path(__file__).resolve().parents[6] / "pyproject.toml" + pyproject = toml.loads(pyproject_path.read_text()) + + extras = pyproject["project"]["optional-dependencies"] + + assert extras["lance"] == [ + "pylance>=12.0.0", + "lance-namespace>=0.11.1", + ] + assert "lance" in extras["ci"][0] From df2b0ec0c43aff6619c56b74a24068763033e03d Mon Sep 17 00:00:00 2001 From: hao-xu5 Date: Wed, 7 Oct 2026 00:22:04 -0700 Subject: [PATCH 2/2] chore: Relock pixi for the lance extra `feast` is an editable path dependency, so `pixi.lock` records its full `requires_dist`, including the expansion of every extra. Adding the `lance` extra therefore changes the lock even though no pixi feature consumes it. The change is confined to that one block: the `ci` expansion gains `lance`, and the two `lance` requirements are recorded. No package resolves differently, which is what the diff size shows -- 3 insertions and 1 deletion, and the 1377 pypi and 211 conda artifact URLs are unchanged. Signed-off-by: hao-xu5 --- pixi.lock | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pixi.lock b/pixi.lock index 169b2024175..afff46d01fe 100644 --- a/pixi.lock +++ b/pixi.lock @@ -2488,6 +2488,8 @@ packages: - psutil ; extra == 'opentelemetry' - pyspark>=4.0.0 ; extra == 'spark' - pyiceberg>=0.7.0 ; extra == 'iceberg' + - pylance>=12.0.0 ; extra == 'lance' + - lance-namespace>=0.11.1 ; extra == 'lance' - trino>=0.305.0,<0.400.0 ; extra == 'trino' - regex ; extra == 'trino' - psycopg[binary,pool]>=3.2.5 ; extra == 'postgres' @@ -2526,7 +2528,7 @@ packages: - minio==7.2.11 ; extra == 'test' - python-keycloak==4.2.2 ; extra == 'test' - cryptography>=43.0 ; extra == 'test' - - feast[aws,azure,cassandra,clickhouse,couchbase,delta,docling,duckdb,elasticsearch,faiss,gcp,ge,glide,go,grpcio,hazelcast,hbase,ibis,iceberg,image,k8s,mcp,milvus,mlflow,mongodb,mssql,mysql,openlineage,opentelemetry,oracle,postgres,pytorch,qdrant,rag,ray,redis,scylladb,singlestore,snowflake,spark,sqlite-vec,test,trino] ; extra == 'ci' + - feast[aws,azure,cassandra,clickhouse,couchbase,delta,docling,duckdb,elasticsearch,faiss,gcp,ge,glide,go,grpcio,hazelcast,hbase,ibis,iceberg,image,k8s,lance,mcp,milvus,mlflow,mongodb,mssql,mysql,openlineage,opentelemetry,oracle,postgres,pytorch,qdrant,rag,ray,redis,scylladb,singlestore,snowflake,spark,sqlite-vec,test,trino] ; extra == 'ci' - build ; extra == 'ci' - virtualenv==20.23.0 ; extra == 'ci' - dbt-artifacts-parser ; extra == 'ci'