Reputation: 2074
So I have a function called AggregateByKey,
val initialValue:(Double, Double,Double,Double,Double) = (0.0,0.0,0.0,0.0,0.0)
I have a component of the AggregateByKey that does a min: math.min(u._4,v) The problem is that the initial value is 0.0 so if there are no negative numbers it always is 0.0 because its comparing the incoming number to 0.0. I've also tried to null.asInstanceOf[Double] but that also does not work. Does anyone have any thoughts on how to solve for this?
Upvotes: 1
Views: 312