You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Michael Mior (JIRA)" <ji...@apache.org> on 2019/02/26 16:17:00 UTC
[jira] [Commented] (CALCITE-2786) Add order by clause support for
JSON_ARRAYAGG
[ https://issues.apache.org/jira/browse/CALCITE-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16778135#comment-16778135 ]
Michael Mior commented on CALCITE-2786:
---------------------------------------
Fixed in [67b439f|https://github.com/apache/calcite/commit/67b439fc1d98fd0082517684b74b53cd1050bbf4].
> Add order by clause support for JSON_ARRAYAGG
> ---------------------------------------------
>
> Key: CALCITE-2786
> URL: https://issues.apache.org/jira/browse/CALCITE-2786
> Project: Calcite
> Issue Type: Sub-task
> Components: core
> Reporter: Hongze Zhang
> Assignee: Hongze Zhang
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Both Oracle[1] and SQL:2016[2] supports or introduces an optional order by clause in JSON_ARRAYAGG, the feature can be implemented since Calcite already supports sorted aggregation.
> AFAICS, JSON_ARRAYAGG's order by clause has no difference with the definition of WITHIN GROUP's, so I think it might be feasible to do sort by expanding JSON_ARRAYAGG(... ORDER BY ...) to JSON_ARRAYAGG(...) WITHIN GROUP (ORDER BY...) during SQL parsing.
> [1] https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/JSON_ARRAYAGG.html#GUID-6D56077D-78DE-4CC0-9498-225DDC42E054
> [2] http://standards.iso.org/ittf/PubliclyAvailableStandards/c065143_ISO_IEC_TR_19075-5_2016.zip
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)