Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/18749#discussion_r129801316
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
---
@@ -492,13 +492,14 @@ case class JsonTuple(children: Seq[Expression])
// scalastyle:off line.size.limit
@ExpressionDescription(
usage = "_FUNC_(jsonStr, schema[, options]) - Returns a struct value
with the given `jsonStr` and `schema`.",
- extended = """
+ examples = """
Examples:
> SELECT _FUNC_('{"a":1, "b":0.8}', 'a INT, b DOUBLE');
{"a":1, "b":0.8}
> SELECT _FUNC_('{"time":"26/08/2015"}', 'time Timestamp',
map('timestampFormat', 'dd/MM/yyyy'));
{"time":"2015-08-26 00:00:00.0"}
- """)
+ """,
+ since = "2.2.0")
--- End diff --
I added `since` for both `from_json` and `to_json` as examples here. These
were added into SQL since 2.2.0 -
(https://issues.apache.org/jira/browse/SPARK-19637 and
https://issues.apache.org/jira/browse/SPARK-19967)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]