spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloud-fan <>
Subject [GitHub] spark pull request #18113: [SPARK-20890][SQL] Added min and max typed aggreg...
Date Sat, 27 May 2017 03:09:37 GMT
Github user cloud-fan commented on a diff in the pull request:
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/typedaggregators.scala
    @@ -99,3 +97,67 @@ class TypedAverage[IN](val f: IN => Double) extends Aggregator[IN,
(Double, Long
         toColumn.asInstanceOf[TypedColumn[IN, java.lang.Double]]
    +class TypedMinDouble[IN](val f: IN => Double) extends Aggregator[IN, Double, Double]
    +  override def zero: Double = Double.PositiveInfinity
    +  override def reduce(b: Double, a: IN): Double = if (b < f(a)) b else f(a)
    --- End diff --
    `math.min(b, f(a))`.  Similar to other places

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message