lszskye opened a new pull request, #250: URL: https://github.com/apache/paimon-cpp/pull/250
### Purpose Linked issue: N/A First-row lookup uses `LookupLevels<bool>` because it only needs to determine whether a primary key already exists. The previous implementation special-cased `bool` by creating and immediately closing the lookup writer. This produced a valid but empty SST file. As a result, a compaction could incorrectly retain a newer row even though the first row for that key already existed. This change: - removes the `bool`-specific empty SST shortcut; - writes serialized primary keys with empty value payloads; - uses a key-only read schema for first-row lookup, avoiding unnecessary value-column reads. ### Tests Added `LookupMergeTreeCompactRewriterTest.TestFirstRowLooksUpExistingKeys`, covering: - an existing `key=1` in L2; - `key=1` and `key=2` in L0; - compaction of only L0 into L1; - verification that the output contains only `key=2`. ### API and Format No public API or protocol changes. ### Documentation No documentation changes are required. ### Generative AI tooling Generated-by: Codex (GPT-5) -- 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]
