Skip to content

fix(index): reject invalid boolean values in CREATE INDEX WITH - #258

Merged
Xuanwo merged 2 commits into
lance-format:mainfrom
jackylee-ch:fix/index-with-bool-validation
Oct 2, 2026
Merged

Xuanwo merged 2 commits into
lance-format:mainfrom
jackylee-ch:fix/index-with-bool-validation

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

The string WITH parser for CREATE INDEX ... USING <type> WITH (...) coerced train/replace/retrain loosely: train=ture (a typo) or a quoted train='false' did not match the bare false/0 check and silently kept the default, so training was skipped or forced with no error. The DuckDB-native binding path already rejects such values via ValueToBoolOrThrow.

This routes the three boolean options through a shared helper accepting the same spellings (true/1, false/0, else reject), so the two paths agree.

Testing

GEN=ninja make test_release — index_ddl.test now rejects train=ture and replace=maybe, both of which silently succeeded before.

The string WITH parser coerced train/replace/retrain loosely: train=ture
(a typo) or a quoted train='false' failed the bare false/0 check and
silently kept the default, so training was skipped or forced with no
error. Route the three options through a shared helper accepting the same
spellings the DuckDB-native path already enforces in ValueToBoolOrThrow
(true/1, false/0, else reject), making the two paths consistent.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Gate recommendation: approve.

The path-based CREATE INDEX ... WITH parser now rejects misspelled boolean options before index creation and interprets quoted false correctly. The change keeps the existing Lance index creation path intact.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 29, 2026
@Xuanwo
Xuanwo merged commit 2cec6f7 into lance-format:main Oct 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants