[
https://issues.apache.org/jira/browse/STORM-1505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15122411#comment-15122411
]
ASF GitHub Bot commented on STORM-1505:
---------------------------------------
Github user ptgoetz commented on the pull request:
https://github.com/apache/storm/pull/1050#issuecomment-176445555
@arunmahadevan you read my mind with the addition of the `filter()` method,
but I'm curious why you didn't use the existing `each()` method for it?
For example:
```java
public Stream filter(Fields inputFields, Filter filter) {
return each(inputFields, new FilterExecutor(filter), new Fields());
}
public Stream filter(Filter filter) {
return filter(getOutputFields(), filter);
}
```
> Add map, flatMap and filter operations in trident api
> -----------------------------------------------------
>
> Key: STORM-1505
> URL: https://issues.apache.org/jira/browse/STORM-1505
> Project: Apache Storm
> Issue Type: Improvement
> Reporter: Arun Mahadevan
> Assignee: Arun Mahadevan
>
> map and flatMap are common stream operations.
> Right now in trident this has to be implemented via each() which also sends
> the input field values in addition to the mapped field values, so the map and
> flatmap should make things slightly more efficient and easy.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)