Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-3001

Add Support for Java 8 Optional type

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Reopened
    • Not a Priority
    • Resolution: Unresolved
    • 0.10.0
    • None
    • None

    Description

      Using Optional is a good way to handle nullable fields.
      The missing support for null fields in tuples can be easily handled by using Optional<T> for nullable fields and T directly for non nullable fields.
      That also retains best serialization efficiency.

      Since we cannot always assume the presence of Optional (only introduced in Java8), the TypeExtractor needs to analyze and create that TypeInfo with reflection.

      Further more, we need to add the OptionalTypeInfo to the flink-java8 project and people need to include flink-java8 in their project if they want to use the Optional.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sewen Stephan Ewen
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: