stefankandic commented on code in PR #46737:
URL: https://github.com/apache/spark/pull/46737#discussion_r1670761724
##########
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:
On the second thought I agree with you, it definitely makes more sense to
special case this so we don't have this weird dangling dot.
This should be completely backwards compatible; if we don't care about
collations and don't pass `fieldPath` and `collationsMap` everything will be
the same as before.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]