Repository navigation
fix(index): normalize CREATE INDEX WITH option keys to lower case - #260
Closed
jackylee-ch wants to merge 1 commit into
Closed
jackylee-ch wants to merge 1 commit into
jackylee-ch wants to merge 1 commit into
Conversation
Lance matches index parameter names case-sensitively (serde snake_case), but DuckDB treats WITH option keys case-insensitively. A mis-cased key such as `Num_Partitions` or `Metric_Type` was passed through verbatim and silently dropped by Lance, so the index was built with default settings instead of the requested ones, with no error. Normalize passthrough option keys to lower case in both WITH-clause parsers (the SQL-string parser-extension path and the DuckDB options path), matching DuckDB's case-insensitive option handling.
There was a problem hiding this comment.
✅ Gate recommendation: approve.
Normalizing option keys at the SQL-to-JSON boundary fixes the silent fallback to default index settings and matches DuckDB’s case-insensitive option handling. Option values and raw params JSON retain their existing behavior, and the tokenizer regression correctly distinguishes an ignored setting from Lance validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lance matches index parameter names case-sensitively (serde snake_case),
while DuckDB treats
WITH (...)option keys case-insensitively. A mis-casedkey such as
Num_PartitionsorMetric_Typewas passed through verbatim andsilently dropped by Lance, so the index was built with default settings
(e.g. 256 partitions / L2) instead of what was requested — with no error.
Normalize passthrough option keys to lower case in both WITH-clause parsers
(the parser-extension string path and the DuckDB options path), matching
DuckDB's own case-insensitive option handling.
test/sql/index_ddl.testcovers it via a mis-cased key whose normalized form surfaces Lance's own
validation of the option value.