From 65eead90750a6836728df174d1dd8186eddbae13 Mon Sep 17 00:00:00 2001 From: Yuan Zhou Date: Tue, 7 May 2024 11:23:19 +0800 Subject: [PATCH] fix Signed-off-by: Yuan Zhou --- .../scala/org/apache/gluten/utils/DecimalArithmeticUtil.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gluten-core/src/main/scala/org/apache/gluten/utils/DecimalArithmeticUtil.scala b/gluten-core/src/main/scala/org/apache/gluten/utils/DecimalArithmeticUtil.scala index cf914a5cc010..aa13c1bdbb8c 100644 --- a/gluten-core/src/main/scala/org/apache/gluten/utils/DecimalArithmeticUtil.scala +++ b/gluten-core/src/main/scala/org/apache/gluten/utils/DecimalArithmeticUtil.scala @@ -68,8 +68,8 @@ object DecimalArithmeticUtil { decDig -= diff / 2 + 1 intDig = MAX_SCALE - decDig } - resultScale = intDig + decDig - resultPrecision = decDig + resultPrecision = intDig + decDig + resultScale = decDig } case OperationType.MOD => resultScale = Math.max(type1.scale, type2.scale)