You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/02/28 17:38:29 UTC

[GitHub] [arrow-datafusion] GavinRay97 opened a new issue #1897: Postgres `ARRAY_AGG(JSON_BUILD_OBJECT())` equivalent? Possible with `struct` SQL operator?

GavinRay97 opened a new issue #1897:
URL: https://github.com/apache/arrow-datafusion/issues/1897


   Curious whether it's possible to write SQL queries that do nested JSON selections in Datafusion.
   IE, something like the below:
   
   ```sql
   select json_agg(json_build_object(
     'id', "houses"."id",
     'address', "houses"."address",
     'users', (
       select json_agg(json_build_object(
         'id', "users"."id",
         'name', "users"."name"
       ))
       from "users"
       where "users"."house_id" = "houses"."id"
     )
   ))
   from "houses" as "houses"
   ```
   
   Thank you =)


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org