You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/28 06:51:59 UTC

[jira] [Commented] (TRAFODION-2270) support ORDER BY clause in GROUP_CONCAT function

    [ https://issues.apache.org/jira/browse/TRAFODION-2270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15614522#comment-15614522 ] 

ASF GitHub Bot commented on TRAFODION-2270:
-------------------------------------------

GitHub user traflm opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/795

    [TRAFODION-2270] support ORDER BY in PIVOT_GROUP/GROUP_CONCAT function

    to support ORDER BY in PIVOT_GROUP function, so as in GROUP_CONCAT function.
    
    The idea is to introduce a new attribute in GroupBy, named as extraOrderExpr(). Which record the extra sort requirement for this groupby. 
    In the optimizer, generate sort requirement for this groupby with the new extraOrderExpr() if available. 
    This can be reused in some other functions as well, who need special order so can add the itemexpr into this extraOrderExpr().

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/traflm/incubator-trafodion TRAFODION-2270

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/795.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #795
    
----
commit 3fb43cb056f9e93c533ef3706937df0664b505f6
Author: Liu Ming <ov...@sina.com>
Date:   2016-10-28T06:44:59Z

    [TRAFODION-2270] support ORDER BY in PIVOT_GROUP/GROUP_CONCAT function

----


> support ORDER BY clause in GROUP_CONCAT function
> ------------------------------------------------
>
>                 Key: TRAFODION-2270
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2270
>             Project: Apache Trafodion
>          Issue Type: Sub-task
>            Reporter: liu ming
>            Assignee: liu ming
>
> currently, GROUP_CONCAT() in Trafodion cannot recognize order by clause, need to support it.
> for example:
> SELECT student_name,
>           GROUP_CONCAT(DISTINCT test_score
>                     ORDER BY test_score asc SEPARATOR ' ')
>           FROM student
>           GROUP BY student_name;   
> 		  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)