Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
蒋添 authored and 蒋添 committed Aug 27, 2024
1 parent e32c494 commit 33f2df9
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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") { _ => }
}
}
}

0 comments on commit 33f2df9

Please sign in to comment.