You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by combineads <gi...@git.apache.org> on 2016/05/20 09:46:07 UTC

[GitHub] tajo pull request: TAJO-2160: Implement string_agg function.

GitHub user combineads opened a pull request:

    https://github.com/apache/tajo/pull/1029

    TAJO-2160: Implement string_agg function.

    I'll implement to concatenate the strings of a field within a group by query.
    I have a table:
    ID COMPANY_ID EMPLOYEE
    1           1                  Anna
    2           1                   Bill
    3           2                 Carol
    4           2                 Dave
    
    and I wanted to group by company_id to get something like:
    
    SELECT company_id, string_agg(employee, ', ')
    FROM mytable
    GROUP BY company_id;
    
    COMPANY_ID EMPLOYEE
    1                         Anna, Bill
    2                      Carol, Dave
    
    PostgreSQL supports string_agg function.
    
    http://www.postgresql.org/docs/current/static/functions-aggregate.html#FUNCTIONS-AGGREGATE-
    TABLE
    
    Thank you.

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

    $ git pull https://github.com/combineads/tajo TAJO-2160

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

    https://github.com/apache/tajo/pull/1029.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 #1029
    
----
commit 6bda513bb7c270c252986dfd43ee80f5b59d8eea
Author: Byunghwa Yun <co...@combineads.co.kr>
Date:   2016-05-20T09:43:40Z

    TAJO-2160: Implement string_agg function.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo issue #1029: TAJO-2160: Implement string_agg function.

Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on the issue:

    https://github.com/apache/tajo/pull/1029
  
    This patch looks good to me. @jinossy do you have more comments?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-2160: Implement string_agg function.

Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/1029#discussion_r65018556
  
    --- Diff: tajo-core/src/main/proto/InternalTypes.proto ---
    @@ -45,3 +45,8 @@ message CorrProto {
       required double yvar = 5;
       required double covar = 6;
     }
    +
    +message StringAggProto {
    +  required string value = 1;
    --- End diff --
    
    IMO, this proto is unnecessary define. the StringAgg is only to aggregate a value.
    What do you think about that?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-2160: Implement string_agg function.

Posted by combineads <gi...@git.apache.org>.
Github user combineads commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/1029#discussion_r65019897
  
    --- Diff: tajo-core/src/main/proto/InternalTypes.proto ---
    @@ -45,3 +45,8 @@ message CorrProto {
       required double yvar = 5;
       required double covar = 6;
     }
    +
    +message StringAggProto {
    +  required string value = 1;
    --- End diff --
    
    It needs to keep the second parameter, delimiter, in the merge method of StringAgg  when the second stages execute to merge the result of fisrt stage of StringAgg.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo issue #1029: TAJO-2160: Implement string_agg function.

Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on the issue:

    https://github.com/apache/tajo/pull/1029
  
    @jihoonson 
    No. +1  The patch looks good to me.
    @combineads 
    Thanks for your contribution!



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request #1029: TAJO-2160: Implement string_agg function.

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/tajo/pull/1029


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-2160: Implement string_agg function.

Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/1029#discussion_r65019730
  
    --- Diff: tajo-core/src/main/proto/InternalTypes.proto ---
    @@ -45,3 +45,8 @@ message CorrProto {
       required double yvar = 5;
       required double covar = 6;
     }
    +
    +message StringAggProto {
    +  required string value = 1;
    --- End diff --
    
    Oops. I\u2019m wrong. delimiter should send to context for merge phase.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---