Annotation Type FunctionAnnotation.NonForwardedFieldsFirst
-
@Target(TYPE) @Retention(RUNTIME) public static @interface FunctionAnnotation.NonForwardedFieldsFirst
The NonForwardedFieldsFirst annotation declares for a function ALL fields of its first input which are not preserved on the same position in its output. ALL other fields are considered to be unmodified at the same position. Hence, the NonForwardedFieldsFirst annotation is inverse to theFunctionAnnotation.ForwardedFieldsFirstannotation.NOTE: The use of the NonForwardedFieldsFirst 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! Since all not declared fields are considered to be forwarded, it is required that ALL non-forwarded fields of the first input are declared.
Non-forwarded fields are declared as a list of field expressions, e.g.,
\@NonForwardedFieldsFirst({"f1; f3"})declares that the second and fourth field of a Java tuple from the first input are modified and all other fields of the first input are are not changed and remain on their position. A NonForwardedFieldsFirst annotation can only be used on functions where the type of the first input and the output are identical.Multiple non-forwarded fields can be annotated in one (
\@NonForwardedFieldsFirst({"f1; f3"})) or separate Strings (\@NonForwardedFieldsFirst({"f1", "f3"})).Please refer to the JavaDoc of
Functionor Flink's documentation for details on field expressions such as nested fields and wildcard.
-
-
Element Detail
-
value
String[] value
-
-