fusheng9399 commented on code in PR #49875: URL: https://github.com/apache/spark/pull/49875#discussion_r1957769480
########## python/pyspark/sql/functions/builtin.py: ########## @@ -20115,11 +20115,26 @@ def get_json_object(col: "ColumnOrName", path: str) -> Column: Examples -------- + Example 1: Extracts a json object from json string + >>> data = [("1", '''{"f1": "value1", "f2": "value2"}'''), ("2", '''{"f1": "value12"}''')] >>> df = spark.createDataFrame(data, ("key", "jstring")) >>> df.select(df.key, get_json_object(df.jstring, '$.f1').alias("c0"), \\ Review Comment: ok, done~ ########## python/pyspark/sql/functions/builtin.py: ########## @@ -20115,11 +20115,26 @@ def get_json_object(col: "ColumnOrName", path: str) -> Column: Examples -------- + Example 1: Extracts a json object from json string + >>> data = [("1", '''{"f1": "value1", "f2": "value2"}'''), ("2", '''{"f1": "value12"}''')] >>> df = spark.createDataFrame(data, ("key", "jstring")) >>> df.select(df.key, get_json_object(df.jstring, '$.f1').alias("c0"), \\ ... get_json_object(df.jstring, '$.f2').alias("c1") ).collect() Review Comment: ok, done~ -- 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