Skip to content

feat(index): add zone map support for FixedSizeList of primitive types - #8017

Draft
westonpace wants to merge 1 commit into
lance-format:mainfrom
westonpace:feat/zone-map-fsl
Draft

feat(index): add zone map support for FixedSizeList of primitive types#8017
westonpace wants to merge 1 commit into
lance-format:mainfrom
westonpace:feat/zone-map-fsl

Conversation

@westonpace

Copy link
Copy Markdown
Member

My original plan was to add zone map for ALL arrow types. However, after review, I think probably don't need to rush for zone maps on list or struct types. So this is a more targeted fix to just address FSL (and even then, only FSL of a non-nested type)

Adds per-position min/max statistics for FixedSizeList columns so the zone
map can prune zones during equality queries on fixed-size list (e.g. embedding
vector) columns.

Key changes:
- New `FixedSizeListZoneAccumulator` tracks per-position min/max as
  `Vec<Option<ScalarValue>>` across all non-null list entries in a zone.
- `ZoneMapProcessor` dispatches through a new `ZoneMapAccumulator` enum that
  selects between scalar and FSL accumulators based on the column type.
- `evaluate_fsl_equals` performs per-position range checks: a zone is pruned
  when any element of the query list falls outside `[min[j], max[j]]`.
- `Equals` and `IsIn` queries delegate to `evaluate_fsl_equals` for FSL
  targets; `Range` and `LikePrefix` conservatively return true.
- `value_range` / `value_range_over` return `None` for FSL zones.
- The `is_nested()` guard in `new_training_request` and `create_seed_writer`
  is lifted for `FixedSizeList<non-nested>` types.
- `default_use_seeds` returns true for all `FixedSizeList` columns.
- Six new tests cover pruning, null lists, IsIn, NaN elements, all-null
  zones, and value_range behaviour.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added A-index Vector index, linalg, tokenizer enhancement New feature or request labels Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.70295% with 41 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-index/src/scalar/zonemap.rs 90.70% 23 Missing and 18 partials ⚠️

📢 Thoughts on this report? Let us know!

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

Labels

A-index Vector index, linalg, tokenizer enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant