beliefer commented on code in PR #40355:
URL: https://github.com/apache/spark/pull/40355#discussion_r1136447424


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/LiteralExpressionProtoConverter.scala:
##########
@@ -106,6 +107,19 @@ object LiteralExpressionProtoConverter {
           toArrayData(lit.getArray),
           
ArrayType(DataTypeProtoConverter.toCatalystType(lit.getArray.getElementType)))
 
+      case proto.Expression.Literal.LiteralTypeCase.MAP =>
+        expressions.Literal.create(
+          toMapData(lit.getMap),
+          MapType(
+            DataTypeProtoConverter.toCatalystType(lit.getMap.getKeyType),
+            DataTypeProtoConverter.toCatalystType(lit.getMap.getValueType)))
+
+      case proto.Expression.Literal.LiteralTypeCase.STRUCT =>

Review Comment:
   Thank you for you detail review.
   AFAK, StringConverter covert `String` with `UTF8String.fromString`. It seems 
we no need to change code below `dataType.hasString`  and add 
`UTF8String.fromString(v.getString)`.



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