Skip to content

feat(index): support distributed ZoneMap index - #5214

Merged
yanghua merged 3 commits into
lance-format:mainfrom
FANNG1:feat/distributed-zonemap-index
Jul 22, 2026
Merged

feat(index): support distributed ZoneMap index#5214
yanghua merged 3 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

@github-actions github-actions Bot added the enhancement New feature or request label Jul 1, 2026
@FANNG1
FANNG1 force-pushed the feat/distributed-zonemap-index branch from ce1026c to 6a6fa8e Compare July 3, 2026 08:50
fanng added 3 commits July 21, 2026 18:13
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
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 6a6fa8e to 2b34e43 Compare July 21, 2026 09:18
@FANNG1

FANNG1 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@yanghua @ddupg could you help to review this PR? thanks!

@yanghua yanghua left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yanghua
yanghua merged commit 525d8ed into lance-format:main Jul 22, 2026
4 checks passed
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

2 participants