gene-db commented on code in PR #49450: URL: https://github.com/apache/spark/pull/49450#discussion_r1914193399
########## python/pyspark/sql/types.py: ########## @@ -1770,6 +1770,15 @@ def toJson(self, zone_id: str = "UTC") -> str: """ return VariantUtils.to_json(self.value, self.metadata, zone_id) + @classmethod + def parseJson(cls, json_str: str) -> "VariantVal": Review Comment: Ahhh, I see what you mean now. If we change it to `fromJson`, one potentially confusing thing would be that all of those `fromJson` have a different signature from this `parseJson` one. ``` def fromJson(cls, json: Dict[str, Any]) ``` vs ``` def parseJson(cls, json: str) ``` That actually leads to a related question, how is `_parse_datatype_json_value` used, and how should it interact with `VariantType`? -- 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