ericm-db commented on code in PR #58476:
URL: https://github.com/apache/spark/pull/58476#discussion_r3984449127


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStore.scala:
##########
@@ -681,6 +681,14 @@ trait StateStoreInstanceMetric {
    */
   def combine(originalMetric: SQLMetric, value: Long): Long
 
+  def combine(originalValue: Long, value: Long): Long = {

Review Comment:
   Existing StateStoreInstanceMetric implementations are required to implement 
combine(SQLMetric, Long), but the accumulator now calls this new overload 
directly and its default is always max. A custom state-store provider whose 
existing combine method uses min, sum, or another policy will continue to 
compile but silently get max semantics when duplicate task attempts are merged. 
Could we preserve the existing combine contract here, or explicitly establish 
one canonical primitive-value method with compatibility handling? A regression 
test using a metric whose combine policy differs from max would cover this.



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