When averaging Spark doesn't change these types: - BigDecimal -> BigDecimal - Double -> Double But it changes these types : - Int -> Double - Short -> Double - Long -> Double
Types that can be ordered/compared by Catalyst.
When summing Spark doesn't change these types: - Long -> Long - BigDecimal -> BigDecimal - Double -> Double
Spark's variance and stddev functions always return Double
An Injection[A, B] is a reverible function from A to B.
An Injection[A, B] is a reverible function from A to B.
Must obey forAll { a: A => invert(apply(a)) == a }
.
When summing Spark doesn't change these types: - Long -> Long - BigDecimal -> BigDecimal - Double -> Double
For other types there are conversions: - Int -> Long - Short -> Long