You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/01/11 07:01:45 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #31120: [34066][SQL] Fix misleading json function `from_json` 's example result

cloud-fan commented on a change in pull request #31120:
URL: https://github.com/apache/spark/pull/31120#discussion_r554814398



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
##########
@@ -509,9 +509,9 @@ case class JsonTuple(children: Seq[Expression])
   examples = """
     Examples:
       > SELECT _FUNC_('{"a":1, "b":0.8}', 'a INT, b DOUBLE');
-       {"a":1,"b":0.8}
+       {1, 0.8}

Review comment:
       The doc example of `CreateNamedStruct` is
   ```
   > SELECT _FUNC_("a", 1, "b", 2, "c", 3);
          {"a":1,"b":2,"c":3}
   ```
   
   I think it's a valid syntax for named rows.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org