Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhli1142015 committed Jan 3, 2025
1 parent 9721b5d commit 1ce4f81
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion velox/docs/functions/spark/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,21 @@ JSON Functions
Casts a JSON string to an ARRAY, MAP, or ROW type, with the output type
determined by the expression. Returns NULL, if the input string is unparsable.
Supported element types include BOOLEAN, TINYINT, SMALLINT, INTEGER, BIGINT,
REAL, DOUBLE, VARCHAR, ARRAY, MAP, and ROW. When casting to ARRAY or MAP,
REAL, DOUBLE, VARCHAR, ARRAY, MAP and ROW. When casting to ARRAY or MAP,
the element type of the array or the value type of the map must be one of
these supported types, and for maps, the key type must be VARCHAR. Casting
to ROW supports only JSON objects, where the keys must exactly match the ROW
field names (case sensitivity).
The current implementation has the following limitations.

* Does not support user provided options.

* Does not support enablePartialResults = false.

* Does not support single quotes as delimiters.

* Does not support schemas that include a corrupt record column.

Behaviors of the casts are shown with the examples below. ::

SELECT from_json('{"a": true}'); -- {'a'=true} // Output type: ROW({"a"}, {BOOLEAN()})
Expand Down

0 comments on commit 1ce4f81

Please sign in to comment.