From 33f2df9f6bef01097dc70bafc6c4fff9308a684b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E6=B7=BB?= Date: Tue, 27 Aug 2024 16:47:31 +0800 Subject: [PATCH] add unit test --- .../org/apache/gluten/execution/MiscOperatorSuite.scala | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backends-velox/src/test/scala/org/apache/gluten/execution/MiscOperatorSuite.scala b/backends-velox/src/test/scala/org/apache/gluten/execution/MiscOperatorSuite.scala index fa7eae37b1c9..296e98ca96d1 100644 --- a/backends-velox/src/test/scala/org/apache/gluten/execution/MiscOperatorSuite.scala +++ b/backends-velox/src/test/scala/org/apache/gluten/execution/MiscOperatorSuite.scala @@ -2086,4 +2086,12 @@ class MiscOperatorSuite extends VeloxWholeStageTransformerSuite with AdaptiveSpa val df2 = runQueryAndCompare("SELECT round(cast(0.19324999999999998 as double), 2)") { _ => } checkLengthAndPlan(df2, 1) } + + test("Fix wrong rescale") { + withTable("t") { + sql("create table t (col0 decimal(10, 0), col1 decimal(10, 0)) using parquet") + sql("insert into t values (0, 0)") + runQueryAndCompare("select col0 / (col1 + 1E-8) from t") { _ => } + } + } }