Skip to content

Commit f206580

Browse files
committed
Cast to double to fix SPARK-7687
1 parent 307ecbf commit f206580

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ class DataFrame private[sql](
10631063

10641064
val ret: Seq[Row] = if (outputCols.nonEmpty) {
10651065
val aggExprs = statistics.flatMap { case (_, colToAgg) =>
1066-
outputCols.map(c => Column(colToAgg(Column(c).expr)).as(c))
1066+
outputCols.map(c => Column(Cast(colToAgg(Column(c).expr), DoubleType)).as(c))
10671067
}
10681068

10691069
val row = agg(aggExprs.head, aggExprs.tail: _*).head().toSeq

0 commit comments

Comments
 (0)