Skip to content

test(scanner): cover untokenizable NGram needles - #9775

Merged
wjones127 merged 3 commits into
mainfrom
gatekeeper/fix-9772-1
Oct 19, 2026
Merged

wjones127 merged 3 commits into
mainfrom
gatekeeper/fix-9772-1

Conversation

@lance-gatefixer

@lance-gatefixer lance-gatefixer Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

The planner correction for #9772 has landed on main through #9789: lower-bound index results retain candidates that still need predicate evaluation. This PR adds regression coverage for NGram needles whose trigrams are all removed by tokenization.

Compare indexed and unindexed results for punctuation, Unicode, empty strings, and nulls across three fragments and both row-ID modes. Extend the lower-bound scan test with empty guaranteed sets and partial limit/offset results.

The merged base includes #9850, which corrects the compatibility environment's namespace dependency for pylance>=14.0.0b10.

Validation:

  • Six punctuation cases failed on the original implementation and pass with the planner correction.
  • cargo test -p lance --profile ci test_ngram --lib: 20 passed.
  • cargo test -p lance --profile ci test_not_or_zone_map --lib: 8 passed.
  • cargo test -p lance --profile ci io::exec::filtered_read::tests --lib -- --test-threads=1: 141 passed.
  • cargo fmt --all: passed.
  • cargo clippy --all --tests --benches -- -D warnings: passed.
  • uv run pytest --run-compat python/tests/compat/test_venv_manager.py: 14 passed.
  • uv run make lint: passed (Ruff, type checking, Rust formatting, and binding Clippy).
  • make build from python/: passed.
  • Beta dependency dry-run: pylance==14.0.0b10 resolves with lance-namespace>=0.13.0,<0.14.

The filtered-read suite runs serially to avoid interference between shared tracing counters.

Fixes #9772

@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 repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@github-actions github-actions Bot added the bug Something isn't working label Oct 8, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 8, 2026
@wjones127 wjones127 added the critical-fix Bugs that cause crashes, security vulnerabilities, or incorrect data. label Oct 9, 2026
@wjones127
wjones127 self-requested a review October 9, 2026 21:10
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 9, 2026
@lance-gatefixer lance-gatefixer Bot changed the title fix(scanner): preserve candidates for lower-bound index results test(scanner): cover untokenizable NGram needles Oct 9, 2026
@lance-gatefixer

Copy link
Copy Markdown
Contributor Author

Blocked: Docker Hub timeouts and image-pull rate limits prevent all three listed CI checks from running on head 0402b67df3fc319bf77b094feb735e352bf48953.

  • Build and Test with Java 25: pulling localstack/localstack:4.0 timed out while requesting registry authorization, before the build or tests ran.
  • Check Rust dependencies (cargo-deny): fetching the action's Rust container hit Docker Hub's unauthenticated pull limit (HTTP 429), before dependency validation ran.
  • Label PR: fetching the labeler's Alpine container failed with an authorization timeout (HTTP 504), then HTTP 429 on retries, before labeling ran.

I inspected the failed-job logs and annotations and confirmed that the PR changes only regression tests and already includes current main. The previously completed local regression suites, formatting, and Clippy passed on this head. These failures are unrelated to the repair, so no code changes or push were made.

A maintainer can rerun the failed jobs once Docker Hub access recovers and the pull limit resets. If the limit persists, provide authenticated or cached image pulls on the runners, then rerun the jobs on this head.

@lance-gatefixer

Copy link
Copy Markdown
Contributor Author

Blocked: Docker Hub timeouts and image-pull rate limits prevent the four listed CI checks from completing on head 0402b67df3fc319bf77b094feb735e352bf48953.

  • linux-build: test compilation succeeded, but starting DynamoDB and S3 failed when pulling localstack/localstack:4.0 timed out requesting registry authorization; test execution was skipped.
  • Build and Test with Java 25: the same LocalStack image-pull authorization timeout stopped service setup before the build or tests ran.
  • Check Rust dependencies (cargo-deny): fetching the action's Rust container hit Docker Hub's unauthenticated pull limit (HTTP 429), before dependency validation ran.
  • Label PR: fetching the labeler's Alpine container failed with HTTP 504, then HTTP 429 on retries, before labeling ran.

I refreshed all four failed-job logs and checked the Linux job's steps and annotations. The PR changes only regression tests and already includes current main; the previously completed local regression suites, formatting, and Clippy passed on this head. These infrastructure failures are unrelated to the repair, so no code changes or push were made.

A maintainer can rerun the failed jobs once Docker Hub access recovers and the pull limit resets. If the limit persists, provide authenticated or cached image pulls on the runners, then rerun the jobs on this head.

@lance-gatefixer

Copy link
Copy Markdown
Contributor Author

Blocked: Docker Hub timeouts and image-pull rate limits prevent the five listed CI checks from completing on head 0402b67df3fc319bf77b094feb735e352bf48953.

  • linux-arm: test compilation succeeded, but the LocalStack image pull timed out requesting Docker Hub authorization during DynamoDB/S3 setup; test execution was skipped.
  • linux-build: test compilation succeeded, then the same LocalStack authorization timeout stopped service setup and skipped test execution.
  • Build and Test with Java 25: the LocalStack authorization timeout stopped service setup before building or testing.
  • Check Rust dependencies (cargo-deny): Docker Hub's unauthenticated pull limit (HTTP 429) prevented fetching the action's Rust container; dependency validation never ran.
  • Label PR: fetching the labeler's Alpine container failed with HTTP 504, then HTTP 429 on retries; labeling never ran.

I refreshed all five failed-job logs and inspected the ARM job's steps and annotations. The PR changes only regression tests and already includes current main. Current-head CI formatting and Clippy passed, as did the previously completed local regression suites. These failures are unrelated to the repair, so no code changes or push were made.

A maintainer can rerun the failed jobs after Docker Hub access recovers and the pull limit resets. If the limit persists, provide authenticated or cached image pulls on the runners, then rerun the jobs on this head.

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Gate recommendation: approve.

The planner fix has already landed through #9789. This revision adds NGram regressions for equality between indexed and full scans and extends the existing lower-bound test matrix to cover empty guaranteed sets and partial limit/offset fallback across both row-ID modes.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 9, 2026
@lance-gatefixer

Copy link
Copy Markdown
Contributor Author

Blocked: Docker Hub access failures and an inherited compatibility dependency conflict prevent six CI checks from passing on head 0402b67df3fc319bf77b094feb735e352bf48953.

  • Compatibility Tests: all 30 failures occur while installing pylance==14.0.0b10. That release requires lance-namespace>=0.13.0,<0.14, but the compatibility environment requests >=0.11.1,<0.12. The dependency resolver rejects those incompatible constraints before the affected comparisons run; 389 other cases passed.
  • linux-arm: tests compiled, but a Docker Hub authorization timeout while pulling LocalStack stopped DynamoDB/S3 setup; test execution was skipped.
  • linux-build: tests compiled, then the same LocalStack pull timeout stopped service setup and skipped test execution.
  • Build and Test with Java 25: the LocalStack pull timeout stopped service setup before building or testing.
  • Check Rust dependencies (cargo-deny): Docker Hub returned HTTP 429 while fetching the action's Rust container; dependency validation never ran.
  • Label PR: fetching the labeler's Alpine container failed with HTTP 504, then HTTP 429 on retries; labeling never ran.

I refreshed all six failed-job logs and reproduced the compatibility resolver conflict in a disposable environment. The compatibility helper is unchanged from current main, which this branch already includes; the PR changes only Rust regression tests. Current-head formatting and Clippy passed, as did the previously completed local regression suites. No repair changes or push were made.

A maintainer should correct the compatibility environment's namespace selection for 14.0.0b10 to match its published requirements, or select a comparison release compatible with the existing pin, then rerun Compatibility Tests. Rerun the other failed jobs after Docker Hub access recovers and pull limits reset; authenticated or cached image pulls are an alternative if registry limits persist.

@github-actions github-actions Bot added the chore label Oct 14, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 14, 2026
@wjones127
wjones127 merged commit 98b930a into main Oct 19, 2026
@wjones127
wjones127 deleted the gatekeeper/fix-9772-1 branch October 19, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working chore critical-fix Bugs that cause crashes, security vulnerabilities, or incorrect data.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: contains on an NGram-indexed column returns no rows when every trigram of the needle has a non-alphanumeric character

1 participant