Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[Bug] Deleted rows take vector search top-k slots in data-evolution tables

未關閉
#454 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 3 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
57/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
cpp
領域
databases

研究方向

Start with LiveRowGlobalIndexReader::VisitVectorSearch and compare its vector path with the full-text path that loads live rows before searching shards. The issue suggests combining VectorSearch.pre_filter with shard live rows through ReplacePreFilter, using GlobalIndexLiveRowFilter::LiveRows, or loading live rows before fan-out. Add coverage for the reproduction with three deleted nearest rows and verify that a limit of 3 returns 3 live rows when enough matches pass the filters.

由索引模型根據 Issue 內容生成。

描述

bug
Search before asking
  • I searched in the issues and found nothing similar.
Paimon-cpp version

main at commit 50ef548ec87cc444a153fb2a03789f9be768d610, with #448 applied.

Minimal reproduce step
  1. Create a data-evolution table with row tracking and deletion-vectors.enabled = true. Write 10 rows with a vector column, then build a vector global index on that column.
  2. Delete the three rows nearest to a query vector, using deletion vectors.
  3. Search for that vector with limit = 3 through GlobalIndexScan::CreateReader → VisitVectorSearch.
  4. Pass the result to ScanContextBuilder::SetGlobalIndexResult, then scan and read.
What doesn't meet your expectations?

The index still ranks the deleted rows, so they take all three top-k slots. The read then drops them, because deletion vectors are applied only at read time. The query returns 0 rows instead of 3.

#448 (for #403) excludes deleted rows only from full-text ranking: LiveRowGlobalIndexReader::VisitVectorSearch delegates unchanged, and live rows are loaded only before a full-text search fans out to the shards. Java filters vector search with the same live rows (apache/paimon#8459).

Expected: limit = k returns k live rows whenever at least k live rows pass the search's pre_filter and predicate.

Anything else?

Follow-up of #403 / #448.

Suggestions:

  • VectorSearch already carries a pre_filter over global row ids, so LiveRowGlobalIndexReader::VisitVectorSearch can combine it with the live rows of the shard through ReplacePreFilter, reusing GlobalIndexLiveRowFilter::LiveRows, and pass the search on unchanged when the whole shard is live.
  • Load live rows on the visiting thread before a vector search fans out to the shards, as LiveRowUnionGlobalIndexReader does for full-text search.
Are you willing to submit a PR?
  • I'm willing to submit a PR!
主要語言
C++
星號
70
分支
36
平均合併
3 天 16 小時
30 天內合併 PR
38

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

apache/paimon-cpp 的其他 Issue

查看 apache/paimon-cpp 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。