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


##########
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 think using enums is better for future usage, and the code is more robust 
against changes with typo problems. And later we can reuse this enum at another 
place as well, when needed.



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