[
https://issues.apache.org/jira/browse/FLINK-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14277105#comment-14277105
]
ASF GitHub Bot commented on FLINK-1398:
---------------------------------------
GitHub user FelixNeutatz opened a pull request:
https://github.com/apache/flink/pull/308
[FLINK-1398] Introduce extractSingleField() in DataSet
This is a prototype how we could implement extractSingleField() for
DataSet. Let's discuss :)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/FelixNeutatz/incubator-flink
ExtractSingleField-FLINK1398
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/308.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 #308
----
commit c3162413b2f6979595393f20d347e6e2057620fa
Author: FelixNeutatz <[email protected]>
Date: 2015-01-14T15:50:37Z
[FLINK-1398] Introduce extractSingleField() in DataSet
----
> A new DataSet function: extractElementFromTuple
> -----------------------------------------------
>
> Key: FLINK-1398
> URL: https://issues.apache.org/jira/browse/FLINK-1398
> Project: Flink
> Issue Type: Wish
> Reporter: Felix Neutatz
> Priority: Minor
>
> This is the use case:
> {code:xml}
> DataSet<Tuple2<Integer, Double>> data = env.fromElements(new
> Tuple2<Integer, Double>(1,2.0));
>
> data.map(new ElementFromTuple());
>
> }
> public static final class ElementFromTuple implements
> MapFunction<Tuple2<Integer, Double>, Double> {
> @Override
> public Double map(Tuple2<Integer, Double> value) {
> return value.f1;
> }
> }
> {code}
> It would be awesome if we had something like this:
> {code:xml}
> data.extractElement(1);
> {code}
> This means that we implement a function for DataSet which extracts a certain
> element from a given Tuple.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)