Github user fhueske commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/194#discussion_r20137228
--- Diff:
flink-java/src/main/java/org/apache/flink/api/java/operators/CrossOperator.java
---
@@ -163,6 +162,31 @@ public DefaultCross(DataSet<I1> input1, DataSet<I2>
input2) {
public CrossProjection<I1, I2> projectFirst(int...
firstFieldIndexes) {
return new CrossProjection<I1, I2>(input1, input2,
firstFieldIndexes, null);
}
+
+
+ /**
+ * Initiates a ProjectCross transformation and projects the
first cross input<br/>
+ * If the first cross input is a {@link Tuple} {@link DataSet},
fields can be selected by their index.
+ * If the first cross input is not a Tuple DataSet, no
parameters should be passed.<br/>
+ *
+ * Fields of the first and second input can be added by
chaining the method calls of
+ * {@link
org.apache.flink.api.java.operators.CrossOperator.ProjectCross#projectionFirst(int...)}
and
+ * {@link
org.apache.flink.api.java.operators.CrossOperator.ProjectCross#projectionSecond(int...)}.
+ *
+ * @param firstFieldIndexes If the first input is a Tuple
DataSet, the indexes of the selected fields.
+ * For a non-Tuple
DataSet, do not provide parameters.
+ * The order of fields
in the output tuple is defined by to the order of field indexes.
+ * @return A CrossProjection to complete the Cross
transformation.
+ *
+ * @see Tuple
+ * @see DataSet
+ * @see
org.apache.flink.api.java.operators.CrossOperator.CrossProjection
+ * @see
org.apache.flink.api.java.operators.CrossOperator.ProjectCross
+ */
+ public <OUT extends Tuple> ProjectCross<I1, I2, OUT>
projectionFirst(int... firstFieldIndexes) {
--- End diff --
Same here. No need for two operators that do the same thing. Just replace
the {{projectFirst()}} and {{projectSecond()}} by your changes.
---
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.
---