[
https://issues.apache.org/jira/browse/FLINK-1040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14206229#comment-14206229
]
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_r20141144
--- Diff:
flink-java/src/main/java/org/apache/flink/api/java/operators/ProjectOperator.java
---
@@ -93,6 +113,30 @@ public Projection(DataSet<T> ds, int[] fieldIndexes) {
this.fieldIndexes = fieldIndexes;
}
+ public void acceptAdditionalIndexes(int... additionalIndexes) {
--- End diff --
In order to remove types() call in project(), project() should return a
ProjectOperator object. As projectOperator inherites from DataSet, Hence, at
user-end, there is no compiling error for chained projection like
dataset.project(0).project(1). If we do not accept the additional index, the
run-time result would be wrong.
> 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)