stefankandic commented on code in PR #48750:
URL: https://github.com/apache/spark/pull/48750#discussion_r1827965985


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ExprUtils.scala:
##########
@@ -40,8 +40,8 @@ object ExprUtils extends EvalHelper with QueryErrorsBase {
         case s: UTF8String if s != null =>
           val dataType = DataType.parseTypeWithFallback(
             s.toString,
-            DataType.fromDDL,
-            DataType.fromJson)
+            DataType.fromJson,
+            DataType.fromDDL)

Review Comment:
   You are right, but won't it make sense to do it from json first? Pyspark 
also does this using `toJson` 
https://github.com/apache/spark/blob/91c01dbad451254e0e3f5efc3e33b7f5d612b5fa/python/pyspark/sql/functions/builtin.py#L18299



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