@Target(value=TYPE) @Retention(value=RUNTIME) public static @interface FunctionAnnotation.ConstantFieldsSecond
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.ConstantFieldsSecond
annotation.
If neither this annotation, nor the FunctionAnnotation.ConstantFieldsSecondExcept
annotation are set, it is
assumed that no field in the second input is forwarded/copied unmodified.
public abstract String[] value
Copyright © 2015 The Apache Software Foundation. All rights reserved.