From 4f63a5b7301943ccf7fe7261691abd1ac4ed40e3 Mon Sep 17 00:00:00 2001 From: zhli1142015 Date: Fri, 27 Dec 2024 15:54:34 +0800 Subject: [PATCH] address comments --- velox/docs/functions/spark/json.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/velox/docs/functions/spark/json.rst b/velox/docs/functions/spark/json.rst index a8615e01dcb2..e1d02caae71d 100644 --- a/velox/docs/functions/spark/json.rst +++ b/velox/docs/functions/spark/json.rst @@ -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()})