wangyong9999 opened a new pull request, #258:
URL: https://github.com/apache/paimon-cpp/pull/258

   ### Purpose
   
   Linked issue: none.
   
   A global-index miss on a non-empty DataEvolution table currently returns 
`PlanImpl::EmptyPlan()`. The query result is correctly empty, but the plan 
loses the snapshot used by the index scan; a null snapshot is otherwise 
reserved for a table with no snapshot.
   
   This change resolves the explicit or latest snapshot once before creating 
`GlobalIndexScan`, passes that same ID to the scan, and returns a zero-split 
plan carrying the resolved ID on a miss. The fast-miss path still does not 
invoke the data batch scan or read data manifests. A truly empty table 
continues to return an empty plan with no snapshot.
   
   For a pre-supplied empty `GlobalIndexResult`, the existing `ScanContext` 
remains the snapshot source: an explicit scan snapshot is preserved, otherwise 
the current latest snapshot is resolved when the plan is created.
   
   ### Tests
   
   - `GlobalIndexTest.TestDataEvolutionBatchScan` and 
`GlobalIndexTest.TestDataEvolutionGlobalIndexMissPreservesResolvedSnapshot`: 
8/8 parameterized cases passed.
   - `DataEvolutionBatchScanTest.*` and `TableScanTest.TestNoSnapshot`: 4/4 
cases passed.
   - clang-format 20.1.8 dry-run/Werror, cpplint 2.0, codespell, and `git diff 
--check` passed.
   
   The new test covers internally evaluated and pre-supplied empty index 
results with both latest and explicit snapshots. `TableScanTest.TestNoSnapshot` 
keeps the empty-table boundary covered.
   
   ### API and Format
   
   No public API, ABI, storage-format, or protocol change. The modified scan 
helpers are private implementation details and no class data member is added.
   
   ### Documentation
   
   No new feature or user-facing configuration; no documentation change is 
required.
   
   ### Generative AI tooling
   
   Generated-by: OpenAI 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]

Reply via email to