j1wonpark opened a new pull request, #4145:
URL: https://github.com/apache/amoro/pull/4145

   ## Why are the changes needed?
   
   In `CombinedDeleteFilter.initializeBloomFilter()`, 
`StructProjection.create(requiredSchema, deleteSchema)` is called inside a 
per-record loop for every (record x schema) combination. For a table with 1M 
equality-delete records and 2 delete schemas, this creates 2M transient 
`StructProjection` objects -- even though `StructProjection` is designed to be 
reused via `.wrap()`.
   
   This causes unnecessary GC pressure and CPU overhead during bloom filter 
warm-up on tables with large equality-delete files.
   
   ## Brief change log
   
   - Hoisted `StructProjection.create()` out of the per-record loop in 
`CombinedDeleteFilter.initializeBloomFilter()`
   - Pre-built a `Map<Set<Integer>, StructProjection>` alongside the existing 
`recordWrappers` map during the schema initialization loop
   - Inside the record loop, only `.wrap(record)` is called on the pre-built 
projection
   
   ## How was this patch tested?
   
   - [x] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [x] Run test locally before making a pull request
   
   ## Documentation
   
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? not applicable


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