flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timo Walther (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-1098) flatArray() operator that converts arrays to elements
Date Tue, 16 Sep 2014 14:27:33 GMT
Timo Walther created FLINK-1098:
-----------------------------------

             Summary: flatArray() operator that converts arrays to elements
                 Key: FLINK-1098
                 URL: https://issues.apache.org/jira/browse/FLINK-1098
             Project: Flink
          Issue Type: New Feature
            Reporter: Timo Walther
            Priority: Minor


It would be great to have an operator that converts e.g. from String[] to String. Actually,
it is just a flatMap over the elements of an array.

A typical use case is a WordCount where we then could write:

{code}
text
.map((line) -> line.toLowerCase().split("\\W+"))
.flatArray()
.map((word) -> new Tuple2(word, 1))
.groupBy(0)
.sum(1);
{code}



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

Mime
View raw message