You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2024/02/02 11:58:40 UTC

Re: [PR] [SPARK-46958][SQL] Fix bug when the canUpcast branch result non-foldable default value expression [spark]

cloud-fan commented on code in PR #45000:
URL: https://github.com/apache/spark/pull/45000#discussion_r1475971219


##########
sql/core/src/test/scala/org/apache/spark/sql/ResolveDefaultColumnsSuite.scala:
##########
@@ -256,4 +256,11 @@ class ResolveDefaultColumnsSuite extends QueryTest with SharedSparkSession {
       checkAnswer(sql("select * from t"), Row(1, "apache", "spark "))
     }
   }
+
+  test("SPARK-46958: Fix bug when canUpcast and result non-foldable expression") {
+    sql(s"CREATE TABLE t(key int, c STRING DEFAULT date '2018-11-17') " +

Review Comment:
   does it work if the default expression is `CAST(date '2018-11-17' AS STRING)`? I think we should find the root cause and understand why the casted expression was considered as non-foldable.



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