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


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/types/StructTypeSuite.scala:
##########
@@ -471,34 +471,22 @@ class StructTypeSuite extends SparkFunSuite with 
SQLHelper {
     assert(source1.existenceDefaultValues(1) == UTF8String.fromString("abc"))
     assert(source1.existenceDefaultValues(2) == null)
 
-    // Positive test: StructType.defaultValues works because the existence 
default value parses and
-    // resolves successfully, then evaluates to a non-literal expression: this 
is constant-folded at

Review Comment:
   This is done in a more type-safe way, via `DefaultValueExpression`. The 
analyzer makes sure `DefaultValueExpression.child` is foldable, and at 
execution time we require `DefaultValueExpression.child` to be a literal before 
passing it to catalogs.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to