lxy-9602 opened a new issue, #551:
URL: https://github.com/apache/paimon-cpp/issues/551

   ### Search before asking
   
   - [x] I searched in the 
[issues](https://github.com/apache/paimon-cpp/issues) and found nothing similar.
   
   
   ### Motivation
   
   Global index bitmap results defer computation through suppliers that can 
retain readers and intermediate results. This couples result lifetime to 
captured objects and delays error reporting until the result is accessed.
   
   Queries spanning many index files also merge results through repeated 
pairwise OR operations. Each merge can copy the growing intermediate bitmap, 
causing substantial memory movement. Similar aggregation patterns exist in 
union readers and OR predicate evaluation.
   
   Bitmap intersections can also incur unnecessary copying through the 
underlying operator& implementation.
   
   ### Solution
   
   - Materialize bitmap results during creation and propagate supplier errors 
immediately.
   - Introduce a shared result-union helper that uses FastUnion when all inputs 
are bitmap results, while preserving virtual Or behavior for other result types.
   - Apply the helper to sorted-file readers, union readers, and OR predicate 
evaluation.
   - Reduce intersection copying by copying the operand with the smaller 
storage size and applying &=.
   
   Preserve existing handling of unavailable index results, predicate field 
tracking, and scored-result semantics.
   
   ### Anything else?
   
   The supplier-based constructor would be replaced by a bitmap constructor and 
a fallible Create() factory. No storage format or protocol changes are required.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


-- 
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