eldenmoon opened a new pull request, #71231: URL: https://github.com/apache/doris/pull/71231
### What problem does this PR solve? A SEARCH query can fail with E-6001 on a segment that contains no matching VARIANT field. For example, one rowset contains `string_subject` and a second rowset contains only unrelated keys. Once the second rowset reaches its sparse statistics limit, SEARCH cannot determine from metadata whether that rowset contains the requested field. When metadata leaves this question open, check the stored sparse keys across buckets in bounded batches. Stop on a matching key, an ancestor, or a descendant. This preserves the error for potentially present values without an executable index. Proving absence can require reading every sparse key in the segment. ### Release note SEARCH can skip segments where a VARIANT path is absent even when sparse path statistics are truncated. ### Tests - Built an ASAN FE/BE baseline on master and reproduced E-6001 with two rowsets. - Rebuilt the BE and reran the same queries against the existing data. The count returned 2 and the scored query returned the two matching rows. - Passed `test_variant_search_sparse_stats_and_score` and `test_variant_search_missing_doc_path`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
