IN - The type of the data set projected by the operator.OUT - The type of data set that is the result of the projection.public class ProjectOperator<IN,OUT extends Tuple> extends SingleInputOperator<IN,OUT,ProjectOperator<IN,OUT>>
| Modifier and Type | Class and Description |
|---|---|
static class |
ProjectOperator.Projection<T> |
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
fields |
| Constructor and Description |
|---|
ProjectOperator(DataSet<IN> input,
int[] fields,
TupleTypeInfo<OUT> returnType) |
ProjectOperator(DataSet<IN> input,
int[] fields,
TupleTypeInfo<OUT> returnType,
ProjectOperator.Projection<IN> proj) |
| Modifier and Type | Method and Description |
|---|---|
<OUT extends Tuple> |
project(int... fieldIndexes)
Continues a Project transformation on a
Tuple DataSet.Note: Only Tuple DataSets can be projected using field indexes. The transformation projects each Tuple of the DataSet onto a (sub)set of fields. Additional fields can be added to the projection by calling project(int[]). |
protected MapOperatorBase<IN,OUT,MapFunction<IN,OUT>> |
translateToDataFlow(Operator<IN> input)
Translates this operation to a data flow operator of the common data flow API.
|
<OUT extends Tuple> |
types(Class<?>... types)
Deprecated.
|
getInput, getInputTypegetName, 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, rebalance, reduce, reduceGroup, runOperation, sum, union, write, write, writeAsCsv, writeAsCsv, writeAsCsv, writeAsCsv, writeAsFormattedText, writeAsFormattedText, writeAsText, writeAsTextpublic ProjectOperator(DataSet<IN> input, int[] fields, TupleTypeInfo<OUT> returnType)
public ProjectOperator(DataSet<IN> input, int[] fields, TupleTypeInfo<OUT> returnType, ProjectOperator.Projection<IN> proj)
protected MapOperatorBase<IN,OUT,MapFunction<IN,OUT>> translateToDataFlow(Operator<IN> input)
SingleInputOperatortranslateToDataFlow in class SingleInputOperator<IN,OUT extends Tuple,ProjectOperator<IN,OUT extends Tuple>>input - The data flow operator that produces this operation's input data.public <OUT extends Tuple> ProjectOperator<?,OUT> project(int... fieldIndexes)
Tuple DataSet.project(int[]).
Note: With the current implementation, the Project transformation looses type information.project in class DataSet<OUT extends Tuple>fieldIndexes - The field indexes which are added to the Project transformation.
The order of fields in the output tuple corresponds to the order of field indexes.Tuple,
DataSet,
ProjectOperator@Deprecated public <OUT extends Tuple> ProjectOperator<IN,OUT> types(Class<?>... types)
types - Copyright © 2015 The Apache Software Foundation. All rights reserved.