Skip to content

Commit fc3ac0f

Browse files
committed
Fix evaluated value type of ApproxCountDistinctMergeFunction to Int.
1 parent 9ed3719 commit fc3ac0f

File tree

1 file changed

+1
-1
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions

1 file changed

+1
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregates.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ case class ApproxCountDistinctMergeFunction(
340340
hyperLogLog.addAll(evaluatedExpr.asInstanceOf[HyperLogLog])
341341
}
342342

343-
override def eval(input: Row): Any = hyperLogLog.cardinality()
343+
override def eval(input: Row): Any = hyperLogLog.cardinality().toInt
344344
}
345345

346346
case class SumFunction(expr: Expression, base: AggregateExpression) extends AggregateFunction {

0 commit comments

Comments
 (0)