gene-db commented on code in PR #49450: URL: https://github.com/apache/spark/pull/49450#discussion_r1913982782
########## 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: The sql expression is `parse_json`, so wouldn't `parseJson()` match the name more? The sql `from_json()` is a little bit different, because we provide the schema to the function. `parse_json` only takes in a json string, and will always parse it to create a Variant. -- 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