File tree Expand file tree Collapse file tree
common/src/main/scala/org/apache/comet/udf Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments