dtenedor commented on code in PR #41191:
URL: https://github.com/apache/spark/pull/41191#discussion_r1196972501


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -3187,7 +3187,24 @@ class AstBuilder extends 
SqlBaseParserBaseVisitor[AnyRef] with SQLConfHelper wit
       ctx: PropertyListContext): Map[String, String] = withOrigin(ctx) {
     val properties = ctx.property.asScala.map { property =>
       val key = visitPropertyKey(property.key)
-      val value = visitPropertyValue(property.value)
+      // A property value can be String, Integer, Boolean or Decimal. Here we 
extract the property
+      // value based on whether its a string, integer, boolean or decimal 
literal.
+      val value =
+      if (property.value == null) {
+        null
+      } else {
+        expression(property.value) match {
+          case Literal(str: UTF8String, StringType) => str.toString
+          case Literal(_, BooleanType) => 
property.value.getText.toLowerCase(Locale.ROOT)
+          case Literal(_, IntegerType | DecimalType()) => 
property.value.getText

Review Comment:
   OK, this is done.



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