Skip to content

Commit 034e1f5

Browse files
committed
fix format
1 parent d7b43fc commit 034e1f5

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

common/src/main/scala/org/apache/comet/udf/CometBatchKernelCodegenInput.scala

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,9 +600,11 @@ private[udf] object CometBatchKernelCodegenInput {
600600
| }""".stripMargin
601601
case dt: DecimalType =>
602602
val body =
603-
if (dt.precision <= 18)
603+
if (dt.precision <= 18) {
604604
emitDecimalFastBodyUnsafe(s"${childField}_valueAddr", "startIndex + i", " ")
605-
else emitDecimalSlowBody(childField, "startIndex + i", " ")
605+
} else {
606+
emitDecimalSlowBody(childField, "startIndex + i", " ")
607+
}
606608
s""" @Override
607609
| public org.apache.spark.sql.types.Decimal getDecimal(
608610
| int i, int precision, int scale) {
@@ -802,9 +804,11 @@ private[udf] object CometBatchKernelCodegenInput {
802804
val dt = f.sparkType.asInstanceOf[DecimalType]
803805
val field = s"${path}_f$fi"
804806
val body =
805-
if (dt.precision <= 18)
807+
if (dt.precision <= 18) {
806808
emitDecimalFastBodyUnsafe(s"${field}_valueAddr", "this.rowIdx", " ")
807-
else emitDecimalSlowBody(field, "this.rowIdx", " ")
809+
} else {
810+
emitDecimalSlowBody(field, "this.rowIdx", " ")
811+
}
808812
s""" case $fi: {
809813
|$body
810814
| }""".stripMargin

0 commit comments

Comments
 (0)