Skip to content

feat: support zonemap indexes in ALTER TABLE CREATE INDEX#466

Open
beinan wants to merge 3 commits intolance-format:mainfrom
beinan:user/beinan/zonemap-create-index
Open

feat: support zonemap indexes in ALTER TABLE CREATE INDEX#466
beinan wants to merge 3 commits intolance-format:mainfrom
beinan:user/beinan/zonemap-create-index

Conversation

@beinan
Copy link
Copy Markdown
Contributor

@beinan beinan commented Apr 21, 2026

Summary

  • add single-column zonemap support for ALTER TABLE ... CREATE INDEX via Lance direct createIndex instead of fragment training
  • surface zonemap indexes in SHOW INDEXES and scan planning, and fix numeric zonemap pruning across mixed numeric types
  • clarify and test that multi-column zonemap is not yet supported, with a clearer Spark-side error and updated docs

Testing

  • ./mvnw -pl lance-spark-4.0_2.13,lance-spark-4.1_2.13 -Dtest=AddIndexTest,ShowIndexesTest,ZonemapFragmentPrunerTest,CreateIndexStandardSyntaxTest -Dsurefire.failIfNoSpecifiedTests=false test
  • ./mvnw -pl lance-spark-4.0_2.13,lance-spark-4.1_2.13 -Dtest=AddIndexTest,ShowIndexesTest -Dsurefire.failIfNoSpecifiedTests=false test

Notes

  • generic Spark CREATE INDEX syntax accepts a column list, but current Lance core rejects multi-column zonemap creation with LanceError(Index): Only support building index on 1 column at the moment
  • Spark now fails earlier with Zonemap index currently supports a single column only
  • Python integration tests were updated but not run locally because this environment does not have pytest or the expected /home/lance/data fixture path

@github-actions github-actions Bot added the enhancement New feature or request label Apr 21, 2026
@beinan beinan marked this pull request as ready for review April 21, 2026 22:34
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.

1 participant