[
https://issues.apache.org/jira/browse/FLINK-1040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14206207#comment-14206207
]
ASF GitHub Bot commented on FLINK-1040:
---------------------------------------
Github user dukechain commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/194#discussion_r20139821
--- Diff: flink-java/src/main/java/org/apache/flink/api/java/DataSet.java
---
@@ -246,6 +247,24 @@ public ExecutionEnvironment getExecutionEnvironment() {
return new Projection<T>(this, fieldIndexes);
}
+ /**
+ * Initiates a Project transformation on a {@link Tuple} {@link
DataSet}.<br/>
+ * <b>Note: Only Tuple DataSets can be projected.</b></br>
+ * The transformation projects each Tuple of the DataSet onto a
(sub)set of fields.</br>
+ * This method returns a {@link ProjectOperator} to complete the
transformation.
+ *
+ * @param fieldIndexes The field indexes of the input tuples that are
retained.
+ * The order of fields in the
output tuple corresponds to the order of field indexes.
+ * @return A ProjectOperator to complete the Project transformation.
+ *
+ * @see Tuple
+ * @see DataSet
+ * @see org.apache.flink.api.java.operators.ProjectOperator
+ */
+ public <OUT extends Tuple> ProjectOperator<?, OUT> projection(int...
fieldIndexes) {
--- End diff --
I agree with you absolutely. For a safe consideration, I retain the
original project() method. I would like to change this API totally.
> Make type() call in projections optional (or remove it)
> -------------------------------------------------------
>
> Key: FLINK-1040
> URL: https://issues.apache.org/jira/browse/FLINK-1040
> Project: Flink
> Issue Type: Improvement
> Components: Java API
> Reporter: Stephan Ewen
> Priority: Minor
> Labels: simple, starter
>
> I think the type() call should be optional. The compiler can also cast the
> data set directly and the result type is computed from the input types
> anyways.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)