Skip to content

fix: allow nearest applied in default_scan_options#5666

Merged
yanghua merged 1 commit intolance-format:mainfrom
chenghao-guo:fix-defaults_scanoptions
Jan 12, 2026
Merged

fix: allow nearest applied in default_scan_options#5666
yanghua merged 1 commit intolance-format:mainfrom
chenghao-guo:fix-defaults_scanoptions

Conversation

@chenghao-guo
Copy link
Copy Markdown
Contributor

When default_scan_options passed a nested dict like
default_scan_options = { "nearest": { "column": "vector", "q": query_vec, "k": 5, }, }

Current setter will fail with "ScannerBuilder.nearest() missing 1 required positional argument: 'q'"
This will fix it.

@github-actions github-actions Bot added bug Something isn't working python labels Jan 9, 2026
@chenghao-guo chenghao-guo force-pushed the fix-defaults_scanoptions branch 2 times, most recently from 5f90df5 to 302fdc4 Compare January 9, 2026 03:51
Copy link
Copy Markdown
Collaborator

@yanghua yanghua left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for contribution!

Signed-off-by: chenghao <landonguo@gmail.com>
@chenghao-guo chenghao-guo force-pushed the fix-defaults_scanoptions branch from 302fdc4 to 7c1fa6e Compare January 12, 2026 02:56
@yanghua yanghua merged commit 19a30f2 into lance-format:main Jan 12, 2026
12 checks passed
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
When default_scan_options passed a nested dict like 
`    default_scan_options = {
        "nearest": {
            "column": "vector",
            "q": query_vec,
            "k": 5,
        },
    }`
    
Current setter will fail with "ScannerBuilder.nearest() missing 1
required positional argument: 'q'"
   This will fix it.

Signed-off-by: chenghao <landonguo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants