Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/1663#discussion_r81990483
--- Diff: storm-core/src/jvm/org/apache/storm/trident/Stream.java ---
@@ -421,6 +421,25 @@ public Stream map(MapFunction function) {
}
/**
+ * Returns a stream consisting of the result of applying the given
mapping function to the values of this stream.
+ * This method replaces old output fields with new output fields,
achieving T -> V conversion.
+ *
+ * @param function a mapping function to be applied to each value in
this stream.
+ * @param outputFields new output fields
+ * @return the new stream
+ */
+ public Stream map(MapFunction function, Fields outputFields) {
+ projectionValidation(getOutputFields());
--- End diff --
`projectionValidation()` checks that input fields are all existing in
current output fields. Not for output fields.
Btw, `projectionValidation(getOutputFields())` is no effect, hence can be
removed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---