@Target(value=TYPE) @Retention(value=RUNTIME) public static @interface FunctionAnnotation.ConstantFieldsFirst
RichFlatJoinFunction
, RichCoGroupFunction
, or RichCrossFunction
.
The following example illustrates a join function that copies fields from the first and second input to the return value:
\@ConstantFieldsFirst("1 -> 0") \@ConstantFieldsFirst("1 -> 1") public class MyJoin extends JoinFunction, Tuple2 , Tuple2 > { public Tuple2 map(Tuple2 first, Tuple2 second) { return new Tuple2 (first.f1, second.f1); } }
This annotation is mutually exclusive with the FunctionAnnotation.ConstantFieldsFirstExcept
annotation.
If neither this annotation, nor the FunctionAnnotation.ConstantFieldsFirstExcept
annotation are set, it is
assumed that no field in the first input is forwarded/copied unmodified.
public abstract String[] value
Copyright © 2015 The Apache Software Foundation. All rights reserved.