Skip to content

feat(index): support distributed ZoneMap index#5214

Open
FANNG1 wants to merge 2 commits into
lance-format:mainfrom
FANNG1:feat/distributed-zonemap-index
Open

feat(index): support distributed ZoneMap index#5214
FANNG1 wants to merge 2 commits into
lance-format:mainfrom
FANNG1:feat/distributed-zonemap-index

Conversation

@FANNG1

@FANNG1 FANNG1 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Closes #5213

Summary

  • Add "ZONEMAP" to _SCALAR_SEGMENT_INDEX_TYPES so the segment workflow (create_index_uncommitted -> commit_existing_index_segments) is chosen, matching how BTREE and BITMAP are built
  • Add "ZONEMAP" to supported_distributed_types, removing the ValueError that previously blocked it
  • Extend the "BTREE" column-type validation case to "BTREE" | "ZONEMAP" with the same supported types: int, float, and string
  • Bump minimum pylance dependency from 8.0.0b11 -> 9.0.0b10
  • Add TestDistributedZoneMapIndexing with three tests:
    • test_distributed_zonemap_index_basic — build on int column, verify index_type == "ZoneMap"
    • test_zonemap_query_results_match_baseline — range filter results match non-indexed baseline
    • test_distributed_zonemap_index_string_column — build on string column

Verification

# ZoneMap-specific tests (require pylance >= 9.0.0b1)
python -m pytest tests/test_distributed_indexing.py::TestDistributedZoneMapIndexing -v
# 3 passed

# Full indexing suite
python -m pytest tests/test_distributed_indexing.py -q
# 66 passed, 1 skipped

ZoneMap is a min/max skip index supported by lance since early versions.
Lance 9.0.0b1 extended create_index_uncommitted to handle ZoneMap
segments (lance#7177), enabling the same distributed segment workflow
already used for BTREE and BITMAP.

Changes:
- Add "ZONEMAP" to _SCALAR_SEGMENT_INDEX_TYPES so the segment workflow
  (create_index_uncommitted → commit_existing_index_segments) is used
- Add "ZONEMAP" to supported_distributed_types, removing the ValueError
- Extend "BTREE" type-validation case to "BTREE" | "ZONEMAP" (same
  supported column types: int, float, string)
- Add a version guard requiring pylance >= 9.0.0b1 for ZONEMAP
- Bump minimum pylance dependency to 9.0.0b10
- Add TestDistributedZoneMapIndexing with three tests covering int/string
  columns and query-result correctness against a non-indexed baseline

Closes lance-format#5213
@github-actions github-actions Bot added the enhancement New feature or request label Jul 1, 2026
pyproject.toml already requires pylance>=9.0.0b10, so the runtime
version check and test skipif decorator are unnecessary.
@FANNG1 FANNG1 force-pushed the feat/distributed-zonemap-index branch from ce1026c to 6a6fa8e Compare July 3, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: support distributed ZoneMap index via create_scalar_index

1 participant