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

Remove redundant code path in CompatibilityUtil

    XMLWordPrintableJSON

Details

    Description

      In CompatibilityUtil#resolveCompatibilityResult:

      CompatibilityResult<T> initialResult = resolveCompatibilityResult(
           (TypeSerializerSnapshot<T>) precedingSerializerConfigSnapshot,
           newSerializer);
      
      if (!initialResult.isRequiresMigration()) {
          return initialResult;
      } else {
           if (precedingSerializer != null && !(precedingSerializer.getClass().equals(dummySerializerClassTag))) {         
               // if the preceding serializer exists and is not a dummy, use
               // that for converting instead of any provided convert deserializer
              return CompatibilityResult.requiresMigration((TypeSerializer<T>) precedingSerializer);
           } else {
              // requires migration (may or may not have a convert deserializer)
              return initialResult;
      }
      
      

      initialResult can actually be returned already, since the case where we try to provide a convert deserializer is no longer relevant. We do not need to check if a convert deserializer is provided because that will never be the case.

      Attachments

        Issue Links

          Activity

            People

              tzulitai Tzu-Li (Gordon) Tai
              tzulitai Tzu-Li (Gordon) Tai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m