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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -3380,6 +3380,10 @@ class AstBuilder extends DataTypeAstBuilder with 
SQLConfHelper with Logging {
     val options = ctx.expressionProperty.asScala.map { property =>
       val key: String = visitPropertyKey(property.key)
       val value: Expression = Option(property.value).map(expression).orNull
+      if (value == null) {
+        operationNotAllowed(
+          s"Value must be specified for key: $key.", ctx)
+      }

Review Comment:
   ```suggestion
         val value: Expression = 
Option(property.value).map(expression).getOrElse {
           operationNotAllowed(s"A value must be specified for the key: $key.", 
ctx)
         }
   ```



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