You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/16 11:05:34 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #26899:
[SPARK-28332][SQL] Reserve init value -1 only when do min max statistics in
SQLMetrics
cloud-fan commented on a change in pull request #26899: [SPARK-28332][SQL] Reserve init value -1 only when do min max statistics in SQLMetrics
URL: https://github.com/apache/spark/pull/26899#discussion_r358173494
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala
##########
@@ -67,7 +67,9 @@ class SQLMetric(val metricType: String, initValue: Long = 0L) extends Accumulato
def +=(v: Long): Unit = _value += v
- override def value: Long = _value
+ def getRawValue(): Long = _value
+
+ override def value: Long = Math.max(_value, 0)
Review comment:
can you explain how are you going to change the initial value? This change here doesn't change the initial value directly.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org