You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Matthias J. Sax (JIRA)" <ji...@apache.org> on 2016/04/06 12:44:25 UTC

[jira] [Assigned] (KAFKA-3337) Extract selector as a separate groupBy operator for KTable aggregations

     [ https://issues.apache.org/jira/browse/KAFKA-3337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias J. Sax reassigned KAFKA-3337:
--------------------------------------

    Assignee: Matthias J. Sax

> Extract selector as a separate groupBy operator for KTable aggregations
> -----------------------------------------------------------------------
>
>                 Key: KAFKA-3337
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3337
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: kafka streams
>            Reporter: Guozhang Wang
>            Assignee: Matthias J. Sax
>              Labels: newbie++
>             Fix For: 0.10.1.0
>
>
> Currently KTable aggregation takes a selector used for selecting the aggregate key.and an aggregator for aggregating the values with the same selected key, which makes the function a little bit "heavy":
> {code}
> table.groupBy(initializer, adder, substractor, selector, /* optional serde*/);
> {code}
>  It is better to extract the selector in a separate groupBy function such that
> {code}
> KTableGrouped KTable#groupBy(selector);
> KTable KTableGrouped#aggregate(initializer, adder, substractor, /* optional serde*/);
> {code}
> Note that "KTableGrouped" only have APIs for aggregate and reduce, and none else. So users have to follow the pattern below:
> {code}
> table.groupBy(...).aggregate(...);
> {code}
> This pattern is more natural for users who are familiar with SQL / Pig or Spark DSL, etc.



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