vkorukanti commented on a change in pull request #32914:
URL: https://github.com/apache/spark/pull/32914#discussion_r651734966



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/SymmetricHashJoinStateManager.scala
##########
@@ -319,15 +319,7 @@ class SymmetricHashJoinStateManager(
       keyWithIndexToValueMetrics.numKeys,       // represent each buffered row 
only once
       keyToNumValuesMetrics.memoryUsedBytes + 
keyWithIndexToValueMetrics.memoryUsedBytes,
       keyWithIndexToValueMetrics.customMetrics.map {
-        case (s @ StateStoreCustomSumMetric(_, desc), value) =>

Review comment:
       The main point is to avoid making changes here (in 
`SymmetricHashJoinManager`) whenever you add a new case class. You just add all 
the code required in the case class when a new one is added. It is easy to miss 
adding the code here and with this patch we can avoid exposing the subclasses 
of `StateStoreCustomMetric` here.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to