szehon-ho commented on code in PR #50701:
URL: https://github.com/apache/spark/pull/50701#discussion_r2078940102


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -1022,13 +1022,25 @@ trait CheckAnalysis extends LookupCatalog with 
QueryErrorsBase with PlanToString
       }
     }
 
+    def checkExistsDefaultDeterministic(colsToAdd: Seq[QualifiedColType]): 
Unit = {
+      colsToAdd.foreach { col =>
+        col.default.foreach { d =>
+          if (!d.deterministic) {
+            throw QueryCompilationErrors.defaultValueNotConstantError(

Review Comment:
   actually this one fails  
https://github.com/apache/spark/pull/50701/files#diff-1ca52084cb1c8f816d6002d507797e46ca495db46e0328220a168b6a59b4af60R528
  (current_catalog() as default value)
   
   I think the previous version ran 'FinishAnalysis', which replaced the 
'current_xxx' before the foldable check



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to