You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/09/08 08:31:00 UTC

[GitHub] [spark] gengliangwang commented on a diff in pull request #37832: [SPARK-40389][SQL] Decimals can't upcast as integral types if the cast can overflow

gengliangwang commented on code in PR #37832:
URL: https://github.com/apache/spark/pull/37832#discussion_r965662647


##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala:
##########
@@ -4476,6 +4476,18 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
       sql("select * from test_temp_view"),
       Row(1, 2, 3, 1, 2, 3, 1, 1))
   }
+
+  test("SPARK-40389: Don't eliminate a cast which can cause overflow") {

Review Comment:
   The test case requires creating a real table. Otherwise, the rule "constant folding" will take effect...
   In the `sql-tests`, creating a table and dropping it at the end in the golden file seems heavy.
   



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org