317brian commented on code in PR #15531:
URL: https://github.com/apache/druid/pull/15531#discussion_r1423118700


##########
docs/querying/sql-json-functions.md:
##########
@@ -40,7 +40,7 @@ You can use the following JSON functions to extract, 
transform, and create `COMP
 |`JSON_OBJECT(KEY expr1 VALUE expr2[, KEY expr3 VALUE expr4, ...])` | 
Constructs a new `COMPLEX<json>` object. The `KEY` expressions must evaluate to 
string types. The `VALUE` expressions can be composed of any input type, 
including other `COMPLEX<json>` values. `JSON_OBJECT` can accept 
colon-separated key-value pairs. The following syntax is equivalent: 
`JSON_OBJECT(expr1:expr2[, expr3:expr4, ...])`.|
 |`JSON_PATHS(expr)`| Returns an array of all paths which refer to literal 
values in `expr` in JSONPath format. |
 |`JSON_QUERY(expr, path)`| Extracts a `COMPLEX<json>` value from `expr`, at 
the specified `path`. |
-|`JSON_QUERY_ARRAY(expr, path)`| Extracts an `ARRAY<COMPLEX<json>>` value from 
`expr`, at the specified `path`. If value is not an `ARRAY`, it will be 
translated into a single element `ARRAY` containing the value at `path`.|
+|`JSON_QUERY_ARRAY(expr, path)`| Extracts an `ARRAY<COMPLEX<json>>` value from 
`expr`, at the specified `path`. If value is not an `ARRAY`, it will be 
translated into a single element `ARRAY` containing the value at `path`. The 
primary use of this function is to allow extracting arrays of objects to use as 
inputs to other [array functions](./sql-array-functions.md)|

Review Comment:
   ```suggestion
   |`JSON_QUERY_ARRAY(expr, path)`| Extracts an `ARRAY<COMPLEX<json>>` value 
from `expr` at the specified `path`. If value is not an `ARRAY`, it gets 
translated into a single element `ARRAY` containing the value at `path`. The 
primary use of this function is to extract arrays of objects to use as inputs 
to other [array functions](./sql-array-functions.md)|
   ```



##########
docs/querying/sql-functions.md:
##########
@@ -827,6 +827,14 @@ Returns an array of all paths which refer to literal 
values in `expr` in JSONPat
 
 Extracts a `COMPLEX<json>` value from `expr`, at the specified `path`.
 
+## JSON_QUERY_ARRAY
+
+**Function type:** [JSON](sql-json-functions.md)
+
+`JSON_QUERY_ARRAY(expr, path)`
+
+Extracts an `ARRAY<COMPLEX<json>>` value from `expr`, at the specified `path`. 
If value is not an `ARRAY`, it will be translated into a single element `ARRAY` 
containing the value at `path`. The primary use of this function is to allow 
extracting arrays of objects to use as inputs to other [array 
functions](./sql-array-functions.md).

Review Comment:
   ```suggestion
   Extracts an `ARRAY<COMPLEX<json>>` value from `expr` at the specified 
`path`. If value is not an `ARRAY`, it gets translated into a single element 
`ARRAY` containing the value at `path`. The primary use of this function is to 
extract arrays of objects to use as inputs to other [array 
functions](./sql-array-functions.md).
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to