Skip to content

Commit

Permalink
Update functions.scala
Browse files Browse the repository at this point in the history
Adjusted scala style
  • Loading branch information
sfc-gh-sjayabalan committed Jul 31, 2024
1 parent e340e9f commit 7c544f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/scala/com/snowflake/snowpark/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3151,7 +3151,7 @@ object functions {
* Usage:
* df = session.createDataFrame(Seq(("CR", "{\"id\": 5, \"name\": \"Jose\", \"age\": 29}"))).toDF(Seq("nationality", "json_string"))
* When the result of this function is the only part of
* the select statement, no changes are needed:
* the select statement, no changes are needed
* df.select(json_tuple(col("json_string"), "id", "name", "age")).show()
*
* <pre>
Expand Down Expand Up @@ -3217,9 +3217,9 @@ object functions {
* function would return different datatypes.
* To convert the datatype and it to be printed as the expected datatype,
* it should be read on the
* selectExpr function as "json['relative']['age']::integer".
* selectExpr function as "json['relative']['age']::integer"
* val data_for_json = Seq(
* (1, "{\"id\": 172319, \"age\": 41, \"relative\": {\"id\": 885471, \"age\": 29}}"),
* (1, "{\"id\": 172319, \"age\": 41, \"relative\": {\"id\": 885471, \"age\": 29}}")
* (2, "{\"id\": 532161, \"age\": 17, \"relative\":{\"id\": 873513, \"age\": 47}}")
* )
* val data_for_json_column = Seq("col1", "col2")
Expand Down

0 comments on commit 7c544f3

Please sign in to comment.