fusheng9399 opened a new pull request, #582:
URL: https://github.com/apache/spark-website/pull/582

   <!-- *Make sure that you generate site HTML with `bundle exec jekyll build`, 
and include the changes to the HTML in your pull request. See README.md for 
more information.* -->
   Most users are unaware of how to retrieve the corresponding JSON object 
using get_json_object when the JSON object is of a JSON array type. 
   Before this PR,  the example:
   ```java
   SELECT get_json_object('{"a":"b"}', '$.a');
   +-------------------------------+
   |get_json_object({"a":"b"}, $.a)|
   +-------------------------------+
   |                              b|
   +-------------------------------+
   ``` 
   
   After this PR, the example of get_json_object has been changed to look like 
this:
   ```java
   SELECT get_json_object('{"a":"b"}', '$.a');
   +-------------------------------+
   |get_json_object({"a":"b"}, $.a)|
   +-------------------------------+
   |                              b|
   +-------------------------------+
   
   SELECT get_json_object('[{"a":"b"},{"a":"c"}]', '$[*].a');
   +----------------------------------------------+
   |get_json_object([{"a":"b"},{"a":"c"}], $[*].a)|
   +----------------------------------------------+
   |                                     ["b","c"]|
   +----------------------------------------------+
   ``` 
   


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