Skip to content

[core] Fix FAST scalar matches with multiple index types on one column - #11250

Closed
JingsongLi wants to merge 5 commits into
apache:masterfrom
JingsongLi:codex/scalar-index-coverage
Closed

JingsongLi wants to merge 5 commits into
apache:masterfrom
JingsongLi:codex/scalar-index-coverage

Conversation

@JingsongLi

@JingsongLi JingsongLi commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Fix scalar equality lookups on a Data Evolution column with both a B-tree and a full-text index. A full-text reader can decline equality. Previously its presence could cause a fast lookup to fall back to scanning rows the B-tree had not matched.

Fast mode uses the matches returned by readers that handle the predicate. Full and detail modes additionally read source rows only in ranges those readers did not cover. A successful lookup with zero matches still covers its range.

The eager scan uses the existing evaluation that reports per-reader coverage. A deferred split remembers when several index types were available for a predicate, even if only one overlaps that split. Index lookups stay on the reader when configured.

A separate Flink build change removes a misleading row-count warning. A writer that processes three rows can emit files with two and one rows. The builder was comparing the first file's count with all three input rows. It continues to log the total input and number of output files. The manifest records each file's own count.

Tests

A regression checks candidate row-ID ranges before residual filtering. It covers eager scans, combined and separate reader splits after serialization, partial and complete B-tree coverage, and a lookup with zero matches. All three configurations failed on master before the fix. A separate two-file test checks the individual manifest counts. All 240 focused core and Flink tests passed.

The scalar search-mode contract is documented in the global index guide and in the repository's AGENTS.md. This is the prerequisite for #11238.

@JingsongLi JingsongLi changed the title [core] Fix partial scalar index coverage in Data Evolution queries [core] Fix FAST scalar matches with multiple index types on one column Nov 18, 2026
@JingsongLi JingsongLi closed this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant