From 59ac574dbf8a63e8ce25c393c3e4014b75669339 Mon Sep 17 00:00:00 2001 From: Parth Chandra Date: Wed, 17 Apr 2024 17:55:06 -0700 Subject: [PATCH] spotless apply --- .../comet/CometSparkSessionExtensions.scala | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala b/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala index 04b7758f9..d5abd2b60 100644 --- a/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala +++ b/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala @@ -389,27 +389,27 @@ class CometSparkSessionExtensions if (sparkFinalMode) { op } else { - val newOp = transform1(op) - newOp match { - case Some(nativeOp) => - val modes = aggExprs.map(_.mode).distinct - // The aggExprs could be empty. For example, if the aggregate functions only have - // distinct aggregate functions or only have group by, the aggExprs is empty and + val newOp = transform1(op) + newOp match { + case Some(nativeOp) => + val modes = aggExprs.map(_.mode).distinct + // The aggExprs could be empty. For example, if the aggregate functions only have + // distinct aggregate functions or only have group by, the aggExprs is empty and // modes is empty too. If aggExprs is not empty, we need to verify all the // aggregates have the same mode. - assert(modes.length == 1 || modes.length == 0) - CometHashAggregateExec( - nativeOp, - op, - groupingExprs, - aggExprs, - child.output, - if (modes.nonEmpty) Some(modes.head) else None, - child, - SerializedPlan(None)) - case None => - op - } + assert(modes.length == 1 || modes.length == 0) + CometHashAggregateExec( + nativeOp, + op, + groupingExprs, + aggExprs, + child.output, + if (modes.nonEmpty) Some(modes.head) else None, + child, + SerializedPlan(None)) + case None => + op + } } }