Skip to content

Commit

Permalink
[SPARK] Add a test case for implicit decimal conversion casts in DML …
Browse files Browse the repository at this point in the history
…commands
  • Loading branch information
olaky committed Feb 28, 2024
1 parent 5d25578 commit ec116b9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ class ImplicitDMLCastingSuite extends QueryTest
sourceTypeInErrorMessage = "MAP<STRING, BIGINT>", targetType = "MAP<STRING, INT>",
targetTypeInErrorMessage = "MAP<STRING, INT>", validValue = "map('abc', 1)",
overflowValue = s"map('abc', ${Long.MaxValue.toString})",
exceptionAnsiCast = "SparkArithmeticException"),
TestConfiguration(sourceType = "DECIMAL(3,1)",
sourceTypeInErrorMessage = "DECIMAL(3,1)", targetType = "DECIMAL(3,2)",
targetTypeInErrorMessage = "DECIMAL(3,2)", validValue = "CAST(1 AS DECIMAL(3,1))",
overflowValue = s"CAST(12.3 AS DECIMAL(3,1))",
exceptionAnsiCast = "SparkArithmeticException")
)

Expand Down

0 comments on commit ec116b9

Please sign in to comment.