Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.9k
[fix](variant) Handle truncated sparse path stats when reading variant#64205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
cf31ab2c481e4f370e4933919d401fdb31aae0105ef6a93023a3c2e2File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3597,6 +3597,7 @@ public void checkAnnIndexCandidateRowsPercentThreshold(String value) { | ||
| @VarAttrDef.VarAttr( | ||
| name = DEFAULT_VARIANT_MAX_SPARSE_COLUMN_STATISTICS_SIZE, | ||
| needForward = true, | ||
| checker = "checkDefaultVariantMaxSparseColumnStatisticsSize", | ||
| fuzzy = true | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This checker rejects new | ||
| ) | ||
| public int defaultVariantMaxSparseColumnStatisticsSize = 10000; | ||
| @@ -6446,6 +6447,14 @@ public void checkDefaultVariantMaxSubcolumnsCount(String variantMaxSubcolumnsCou | ||
| } | ||
| } | ||
| public void checkDefaultVariantMaxSparseColumnStatisticsSize(String variantMaxSparseColumnStatisticsSize) { | ||
| int value = Integer.valueOf(variantMaxSparseColumnStatisticsSize); | ||
| if (value < 1 || value > 50000) { | ||
| throw new UnsupportedOperationException("variant max sparse column statistics size is: " | ||
| + variantMaxSparseColumnStatisticsSize + " it must between 1 and 50000"); | ||
| } | ||
| } | ||
| public void checkHnswEfSearch(String efSearch) { | ||
| int value = Integer.valueOf(efSearch); | ||
| if (value < 1) { | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only treats truncated stats as ambiguous when the exact target path is recorded in sparse stats, but the same ambiguity exists when the target path is a materialized leaf and an unrecorded sparse child exists. A concrete shape is
variant_max_subcolumns_count = 1, sparse stats limit = 1, withbhaving the highest non-null count so it is kept as an extracted leaf, while overflow sparse paths includeaandb.c;serialize_sparse_columns()iterates the remainingstd::map, so the single recorded sparse stat can beaandb.cis physically present but absent from stats. Forv['b'],nodeis the leaf forb,_has_prefix_path_unlocked("b")is false because there is no child node and no recordedb.sparse prefix, andexisted_in_sparse_columnis false, so this branch is skipped and_try_build_leaf_plan()returns only thebleaf. Rows whosebvalue only comes from sparseb.care not merged. When sparse stats are truncated, a materialized exact node also needs a hierarchical read unless there is a persisted proof that no sparse child with this prefix exists.