cloud-fan commented on a change in pull request #25016: [SPARK-28200][SQL] Decimal overflow handling in ExpressionEncoder URL: https://github.com/apache/spark/pull/25016#discussion_r298877783
########## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoderSuite.scala ########## @@ -379,6 +380,78 @@ class ExpressionEncoderSuite extends CodegenInterpretedPlanTest with AnalysisTes assert(e.getMessage.contains("tuple with more than 22 elements are not supported")) } + // Scala / Java big decimals ---------------------------------------------------------- + + encodeDecodeTest(BigDecimal(("9" * 20) + "." + "9" * 18), + "scala decimal within precision/scale limit") + encodeDecodeTest(new java.math.BigDecimal(("9" * 20) + "." + "9" * 18), + "java decimal within precision/scale limit") + + encodeDecodeTest(BigDecimal(("9" * 20) + "." + "9" * 18).unary_-, Review comment: shall we use `-BigDecimal...` instead of `.unary_-` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org