@Target(value=TYPE) @Retention(value=RUNTIME) public static @interface FunctionAnnotation.ForwardedFields
Fields that are forwarded at the same position can be specified by their position.
The specified position must be valid for the input and output data type and have the same type.
For example {@literal @}ForwardedFields({"f2"})
declares that the third field of a Java input tuple 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 @}ForwardedFields({"f0->f2"})
denotes that the first field of the Java input tuple 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 @}ForwardedFields({"f2; f3->f0; f4"})
)
or separate Strings ({@literal @}ForwardedFields({"f2", "f3->f0", "f4"})
).
NOTE: The use of the ForwardedFields 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.
public abstract String[] value
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.