MaxGekk commented on code in PR #42365:
URL: https://github.com/apache/spark/pull/42365#discussion_r1286166383


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -3170,15 +3174,15 @@ class AstBuilder extends DataTypeAstBuilder with 
SQLConfHelper with Logging {
    */
   override def visitDefaultExpression(ctx: DefaultExpressionContext): String =
     withOrigin(ctx) {
-      verifyAndGetExpression(ctx.expression())
+      verifyAndGetExpression(ctx.expression(), "DEFAULT")

Review Comment:
   I believe new enum is overkill in this case while the value is used only 
once. You can make a typo in enum and in string literal with the same 
probability. I would propose to introduce such enum later when its value is 
used at least twice.



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