flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-1040) Make type() call in projections optional (or remove it)
Date Wed, 19 Nov 2014 11:22:33 GMT

    [ https://issues.apache.org/jira/browse/FLINK-1040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14217763#comment-14217763
] 

ASF GitHub Bot commented on FLINK-1040:
---------------------------------------

Github user uce commented on a diff in the pull request:

    https://github.com/apache/incubator-flink/pull/194#discussion_r20569311
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/operators/CrossOperator.java
---
    @@ -517,859 +542,426 @@ public CrossProjection(DataSet<I1> ds1, DataSet<I2>
ds2, int[] firstFieldIndexes
     	// GENERATED FROM org.apache.flink.api.java.tuple.TupleGenerator.
     
     		/**
    +		 * Chooses a projectTupleX according to the length of {@link CrossProjection#fieldIndexes}

    +		 * 
    +		 * @return The projected DataSet.
    +		 * 
    +		 * @see Projection
    +		 */
    +		@SuppressWarnings("unchecked")
    +		public <OUT extends Tuple> ProjectCross<I1, I2, OUT> projectTupleX() {
    +			ProjectCross<I1, I2, OUT> projectionCross = null;
    +
    +			switch (fieldIndexes.length) {
    +			case 1: projectionCross = (ProjectCross<I1, I2, OUT>) projectTuple1(); break;
    --- End diff --
    
    Can you add a warning to the TupleGenerator classes that this method depends on the number
of available tuples? It's a corner case, but it might happen that the number of available
tuples and this method get out of sync.


> 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)

Mime
View raw message