HyukjinKwon commented on code in PR #46737:
URL: https://github.com/apache/spark/pull/46737#discussion_r1670275284


##########
python/pyspark/sql/types.py:
##########
@@ -747,8 +747,8 @@ def jsonValue(self) -> Dict[str, Any]:
     def fromJson(
         cls,
         json: Dict[str, Any],
-        fieldPath: str,
-        collationsMap: Optional[Dict[str, str]],
+        fieldPath: str = "",
+        collationsMap: Optional[Dict[str, str]] = None,
     ) -> "ArrayType":
         elementType = _parse_datatype_json_value(
             json["elementType"], fieldPath + ".element", collationsMap

Review Comment:
   I feel like it has to be `{"element": collation}` and `{"key": collation}`. 
`.element` sounds a bit awkward. While I am fine because this JSON format is 
supposed to be internal-only, is this backward compatible? E.g., can old JSON 
data types be read? I have seen many tickets related to this, e.g., 
https://github.com/apache/spark/pull/43474



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