Shekharrajak opened a new pull request, #3558:
URL: https://github.com/apache/datafusion-comet/pull/3558

   ## Which issue does this PR close?
   
   Closes #3456.
   
   ## Rationale for this change
   
   PR #3298 added reflection caching optimizations for Iceberg serialization, 
but these were lost during subsequent refactoring in #3349 and #3443. The 
current code performs redundant `Class.forName()` and `getMethod()` calls for 
every task (tens of thousands of times for large tables), causing significant 
serialization overhead.
   
   ## What changes are included in this PR?
   
   - Add `ReflectionCache` case class 
   - Update `serializePartitions()` to create cache once and pass to helper 
methods
   - Update `extractDeleteFilesList()` and `serializePartitionData()` to use 
cached methods
   - Add field ID mapping cache to avoid redundant `buildFieldIdMapping()` 
calls per-task
   - Add `CometIcebergSerializationBenchmark` to measure serialization 
performance
   
   ## How are these changes tested?
   
   - Existing Iceberg integration tests ensure correctness is preserved
   
   Benchmark: 
   
   Metric | Before | After | Improvement
   -- | -- | -- | --
   serializePartitions() | 7,235 ms | 5,211 ms | 28% faster
   Class.forName() | 233.5 ns | ~0 ns | cached
   getMethod() | 18.2 ns | ~0 ns | cached
   
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to