Skip to content

feat: Add a Lance online store - #7030

Open
haoxu0 wants to merge 2 commits into
feast-dev:masterfrom
haoxu0:lance-online-store
Open

haoxu0 wants to merge 2 commits into
feast-dev:masterfrom
haoxu0:lance-online-store

Conversation

@haoxu0

@haoxu0 haoxu0 commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

Before: Lance could be used as an offline source, but there was no way to serve features or run vector search from Lance.

After: online_store: {type: lance} keeps one Lance dataset per feature view, one row per entity key, on local disk or object storage. It supports:

  • point reads by entity key;
  • upserts keyed on the entity key that never replace a row with an older event timestamp, so out-of-order materialization cannot roll a value back;
  • vector search through retrieve_online_documents_v2, with metadata filters applied before ranking;
  • full-text search over String features (text_search_enabled: true);
  • in-place schema evolution on feast apply: added features become empty columns and removed features are dropped, so the values of unchanged features are kept. A changed feature type recreates the dataset empty.

How: each feature is stored as a serialized ValueProto for exact round-trips. Scalar primitives, String features and the vector field also get native columns, so filters, full-text and nearest-neighbour search run inside Lance's scanner. The entity key carries a BTREE index.

Depends on #7029: the end-to-end test asserts that features stay with their own entity in ranked order. This branch contains that commit; review only the last commit.

Which issue(s) this PR fixes:

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

39 unit tests in tests/unit/infra/online_store/test_lance_online_store.py, including one end-to-end test through FeatureStore (apply, write_to_online_store, get_online_features, retrieve_online_documents_v2 with a filter). Docs: docs/reference/online-stores/lance.md.

Misc

Rough local numbers at 100k rows: point read of 1 key about 12 ms, 100 keys about 23 ms; unindexed top-10 vector search about 8 ms. Follow-ups: cache the opened dataset between reads, ANN index creation, hybrid search.

_retrieve_from_online_store_v2 grouped the ranked documents by unique
entity, which sorts the entities, while the entity columns stayed in
ranked order. Whenever a store ranked documents out of entity-key order,
each entity was returned with another entity's features, and a second
hit for the same entity was dropped. Treat each document as its own
output row instead.

Signed-off-by: haoxu0 <20422210+haoxu0@users.noreply.github.com>
Stores one Lance dataset per feature view with one row per entity key.
Supports point reads, upserts that never roll a value back, vector search
with metadata prefilters, full-text search, and in-place schema evolution
on feast apply.

Signed-off-by: haoxu0 <20422210+haoxu0@users.noreply.github.com>
@haoxu0
haoxu0 requested a review from a team as a code owner October 17, 2026 08:21
@codecov-commenter

codecov-commenter commented Oct 17, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 93.46405% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.21%. Comparing base (c9b9d72) to head (795c4db).

Files with missing lines Patch % Lines
...ne_stores/lance_online_store/lance_online_store.py 93.42% 10 Missing and 10 partials ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7030      +/-   ##
==========================================
+ Coverage   50.98%   51.21%   +0.22%     
==========================================
  Files         455      456       +1     
  Lines       56964    57269     +305     
  Branches     8313     8375      +62     
==========================================
+ Hits        29044    29328     +284     
- Misses      25935    25948      +13     
- Partials     1985     1993       +8     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 52.68% <93.46%> (+0.23%) ⬆️
Files with missing lines Coverage Δ
sdk/python/feast/feature_store.py 46.97% <100.00%> (+0.08%) ⬆️
sdk/python/feast/repo_config.py 79.52% <ø> (ø)
...ne_stores/lance_online_store/lance_online_store.py 93.42% <93.42%> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9b9d72...795c4db. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants