peter-toth opened a new pull request, #54081:
URL: https://github.com/apache/spark/pull/54081

   ### What changes were proposed in this pull request?
   This PR adds a new `initMetricsValues()` method to `PartitionReader` so as 
to initialize custom metrics returned by `currentMetricsValues()`. In case of 
`KeyGroupedPartitioning` multiple input partitions are grouped and so multiple 
`PartitionReader` belong to one output partition. A `PartitionReader` needs to 
be initialized with metrics calculated by the previous `PartitionReader` of the 
same partition group to calculate the right value.
   
   ### Why are the changes needed?
   To calculate the custom metrics correctly.
   
   ### Does this PR introduce _any_ user-facing change?
   It fixes metrics calculation.
   
   ### How was this patch tested?
   New UT is added.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.


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