in src/main/scala/org/apache/spark/sql/datasketches/kll/aggregate/KllDoublesSketchAggMerge.scala [143:154]
override def merge(union: KllDoublesSketch, other: KllDoublesSketch): KllDoublesSketch = {
if (union != null && other != null) {
union.merge(other)
union
} else if (union != null && other == null) {
union
} else if (union == null && other != null) {
other
} else {
union
}
}