flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gyula Fóra <gyf...@apache.org>
Subject Streaming groupby and aggregation by field expressions
Date Wed, 05 Nov 2014 17:37:46 GMT
Hey guys,

Just a quick note on some upcoming API updates for the Streaming api.

Now it will be possible to use field expressions for both grouping and
aggregations in the streaming api. You can check it out here
<https://github.com/mbalassi/incubator-flink/blob/daba36e142537ca0bd7e4d0f1209ce8b0ebecda5/flink-addons/flink-streaming/flink-streaming-examples/src/main/java/org/apache/flink/streaming/examples/wordcount/PojoWordCount.java#L102>
.

Or in a concise form:
DataStream<Word> counts = text.flatMap(new Tokenizer()).groupBy("word")
.sum("frequency");

I will still do some more testing before it will be available in the master
branch.

I am also planning to extend aggregations to more fields at the same time
like
sum(1,2,2) or max("a","c").

Regards,
Gyula

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message