Annotation Type FunctionAnnotation.NonForwardedFields


  • @Target(TYPE)
    @Retention(RUNTIME)
    public static @interface FunctionAnnotation.NonForwardedFields
    The NonForwardedFields annotation declares ALL fields which not preserved on the same position in a functions output. ALL other fields are considered to be unmodified at the same position. Hence, the NonForwardedFields annotation is inverse to the FunctionAnnotation.ForwardedFields annotation.

    NOTE: The use of the NonForwardedFields 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 are declared.

    Non-forwarded fields are declared as a list of field expressions, e.g., \@NonForwardedFields({"f1; f3"}) declares that the second and fourth field of a Java tuple are modified and all other fields are are not changed and remain on their position. A NonForwardedFields annotation can only be used on functions where the type of the input and output are identical.

    Multiple non-forwarded fields can be annotated in one ( \@NonForwardedFields({"f1; f3"})) or separate Strings ( \@NonForwardedFields({"f1", "f3"})).

    Please refer to the JavaDoc of Function or Flink's documentation for details on field expressions such as nested fields and wildcard.

    See Also:
    FunctionAnnotation.ForwardedFields
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String[] value