I1 - The type of the first input DataSet of the Cross transformation.I2 - The type of the second input DataSet of the Cross transformation.OUT - The type of the result of the Cross transformation.public static final class CrossOperator.ProjectCross<I1,I2,OUT extends Tuple> extends CrossOperator<I1,I2,OUT>
CrossOperator.CrossProjection<I1,I2>, CrossOperator.DefaultCross<I1,I2>, CrossOperator.DefaultCrossFunction<T1,T2>, CrossOperator.ProjectCross<I1,I2,OUT extends Tuple>, CrossOperator.ProjectCrossFunction<T1,T2,R extends Tuple>| Modifier | Constructor and Description |
|---|---|
protected |
CrossOperator.ProjectCross(DataSet<I1> input1,
DataSet<I2> input2,
int[] fields,
boolean[] isFromFirst,
TupleTypeInfo<OUT> returnType) |
protected |
CrossOperator.ProjectCross(DataSet<I1> input1,
DataSet<I2> input2,
int[] fields,
boolean[] isFromFirst,
TupleTypeInfo<OUT> returnType,
CrossOperator.CrossProjection<I1,I2> crossProjection) |
| Modifier and Type | Method and Description |
|---|---|
<OUT extends Tuple> |
projectFirst(int... firstFieldIndexes)
|
<OUT extends Tuple> |
projectSecond(int... secondFieldIndexes)
|
<OUT extends Tuple> |
types(Class<?>... types)
Deprecated.
|
CrossOperator<I1,I2,OUT> |
withConstantSetFirst(String... constantSetFirst)
Adds a constant-set annotation for the first input of the UDF.
|
CrossOperator<I1,I2,OUT> |
withConstantSetSecond(String... constantSetSecond)
Adds a constant-set annotation for the second input of the UDF.
|
generateProjectionProperties, translateToDataFlowextractSemanticAnnotationsFromUdf, getBroadcastSets, getParameters, getSemanticProperties, setSemanticProperties, withBroadcastSet, withParametersgetInput1, getInput1Type, getInput2, getInput2TypegetName, getParallelism, getResultType, name, setParallelismaggregate, checkSameExecutionContext, clean, coGroup, cross, crossWithHuge, crossWithTiny, distinct, distinct, distinct, distinct, filter, first, flatMap, getExecutionEnvironment, getType, groupBy, groupBy, groupBy, iterate, iterateDelta, join, join, joinWithHuge, joinWithTiny, map, mapPartition, max, maxBy, min, minBy, output, partitionByHash, partitionByHash, partitionByHash, partitionCustom, partitionCustom, partitionCustom, print, printToErr, project, rebalance, reduce, reduceGroup, runOperation, sum, union, write, write, writeAsCsv, writeAsCsv, writeAsCsv, writeAsCsv, writeAsFormattedText, writeAsFormattedText, writeAsText, writeAsTextprotected CrossOperator.ProjectCross(DataSet<I1> input1, DataSet<I2> input2, int[] fields, boolean[] isFromFirst, TupleTypeInfo<OUT> returnType)
protected CrossOperator.ProjectCross(DataSet<I1> input1, DataSet<I2> input2, int[] fields, boolean[] isFromFirst, TupleTypeInfo<OUT> returnType, CrossOperator.CrossProjection<I1,I2> crossProjection)
public <OUT extends Tuple> CrossOperator.ProjectCross<I1,I2,OUT> projectFirst(int... firstFieldIndexes)
Tuple DataSet, fields can be selected by their index.
If the first cross input is not a Tuple DataSet, no parameters should be passed.projectFirst(int...) and
projectSecond(int...).
Note: With the current implementation, the Project transformation looses type information.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.Tuple,
DataSet,
CrossOperator.ProjectCrosspublic <OUT extends Tuple> CrossOperator.ProjectCross<I1,I2,OUT> projectSecond(int... secondFieldIndexes)
Tuple DataSet, fields can be selected by their index.
If the second cross input is not a Tuple DataSet, no parameters should be passed.projectFirst(int...) and
projectSecond(int...).
Note: With the current implementation, the Project transformation looses type information.secondFieldIndexes - If the second 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.Tuple,
DataSet,
CrossOperator.ProjectCross@Deprecated public <OUT extends Tuple> CrossOperator<I1,I2,OUT> types(Class<?>... types)
types - public CrossOperator<I1,I2,OUT> withConstantSetFirst(String... constantSetFirst)
TwoInputUdfOperator
Constant set annotations are used by the optimizer to infer the existence of data properties (sorted, partitioned, grouped).
In certain cases, these annotations allow the optimizer to generate a more efficient execution plan which can lead to improved performance.
Constant set annotations can only be specified if the first input and the output type of the UDF are of
Tuple data types.
A constant-set annotation is a set of constant field specifications. The constant field specification String "4->3" specifies, that this UDF copies the fourth field of an input tuple to the third field of the output tuple. Field references are zero-indexed.
NOTICE: Constant set annotations are optional, but if given need to be correct. Otherwise, the program might produce wrong results!
withConstantSetFirst in class TwoInputUdfOperator<I1,I2,OUT extends Tuple,CrossOperator<I1,I2,OUT extends Tuple>>constantSetFirst - A list of constant field specification Strings for the first input.public CrossOperator<I1,I2,OUT> withConstantSetSecond(String... constantSetSecond)
TwoInputUdfOperator
Constant set annotations are used by the optimizer to infer the existence of data properties (sorted, partitioned, grouped).
In certain cases, these annotations allow the optimizer to generate a more efficient execution plan which can lead to improved performance.
Constant set annotations can only be specified if the second input and the output type of the UDF are of
Tuple data types.
A constant-set annotation is a set of constant field specifications. The constant field specification String "4->3" specifies, that this UDF copies the fourth field of an input tuple to the third field of the output tuple. Field references are zero-indexed.
NOTICE: Constant set annotations are optional, but if given need to be correct. Otherwise, the program might produce wrong results!
withConstantSetSecond in class TwoInputUdfOperator<I1,I2,OUT extends Tuple,CrossOperator<I1,I2,OUT extends Tuple>>constantSetSecond - A list of constant field specification Strings for the second input.Copyright © 2015 The Apache Software Foundation. All rights reserved.