@Target(value=TYPE) @Retention(value=RUNTIME) public static @interface FunctionAnnotation.ForwardedFieldsFirst
{@literal @}ForwardedFieldsFirst({"f2"})
declares that the third field of a Java input tuple at the first input is
copied to the third field of an output tuple.
Fields which are unchanged copied to another position in the output are declared by specifying the
source field expression in the input and the target field expression in the output.
{@literal @}ForwardedFieldsFirst({"f0->f2"})
denotes that the first field of the Java input tuple at the first input is
unchanged copied to the third field of the Java output tuple. When using the wildcard ("*") ensure that
the number of declared fields and their types in input and output type match.
Multiple forwarded fields can be annotated in one ({@literal @}ForwardedFieldsFirst({"f2; f3->f0; f4"})
)
or separate Strings ({@literal @}ForwardedFieldsFirst({"f2", "f3->f0", "f4"})
).
NOTE: The use of the ForwardedFieldsFirst annotation is optional.
If used correctly, it can help the Flink optimizer to generate more efficient execution plans.
However if used incorrectly, it can cause invalid plan choices and the computation of wrong results!
It is NOT required that all forwarded fields are declared, but all declarations must be correct.
Please refer to the JavaDoc of Function
or Flink's documentation for
details on field expressions such as nested fields and wildcard.
Forwarded fields from the second input can be specified using the
FunctionAnnotation.ForwardedFieldsSecond
annotation.public abstract String[] value
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.