[jira] [Updated] (FLINK-11075) Remove redundant code path in CompatibilityUtil
[ https://issues.apache.org/jira/browse/FLINK-11075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chesnay Schepler updated FLINK-11075: - Fix Version/s: (was: 1.8.0) > Remove redundant code path in CompatibilityUtil > --- > > Key: FLINK-11075 > URL: https://issues.apache.org/jira/browse/FLINK-11075 > Project: Flink > Issue Type: Improvement > Components: API / Type Serialization System >Reporter: Tzu-Li (Gordon) Tai >Assignee: Tzu-Li (Gordon) Tai >Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > In {{CompatibilityUtil#resolveCompatibilityResult}}: > {code:java} > CompatibilityResult initialResult = resolveCompatibilityResult( > (TypeSerializerSnapshot) 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) > precedingSerializer); > } else { > // requires migration (may or may not have a convert deserializer) > return initialResult; > } > {code} > {{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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (FLINK-11075) Remove redundant code path in CompatibilityUtil
[ https://issues.apache.org/jira/browse/FLINK-11075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated FLINK-11075: --- Labels: pull-request-available (was: ) > Remove redundant code path in CompatibilityUtil > --- > > Key: FLINK-11075 > URL: https://issues.apache.org/jira/browse/FLINK-11075 > Project: Flink > Issue Type: Improvement > Components: Type Serialization System >Reporter: Tzu-Li (Gordon) Tai >Assignee: Tzu-Li (Gordon) Tai >Priority: Major > Labels: pull-request-available > Fix For: 1.8.0 > > > In {{CompatibilityUtil#resolveCompatibilityResult}}: > {code:java} > CompatibilityResult initialResult = resolveCompatibilityResult( > (TypeSerializerSnapshot) 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) > precedingSerializer); > } else { > // requires migration (may or may not have a convert deserializer) > return initialResult; > } > {code} > {{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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (FLINK-11075) Remove redundant code path in CompatibilityUtil
[ https://issues.apache.org/jira/browse/FLINK-11075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tzu-Li (Gordon) Tai updated FLINK-11075: Description: In {{CompatibilityUtil#resolveCompatibilityResult}}: {code:java} CompatibilityResult initialResult = resolveCompatibilityResult( (TypeSerializerSnapshot) 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) precedingSerializer); } else { // requires migration (may or may not have a convert deserializer) return initialResult; } {code} {{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. was: In {{CompatibilityUtil#resolveCompatibilityResult}}: {code} CompatibilityResult initialResult = resolveCompatibilityResult( (TypeSerializerSnapshot) 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) precedingSerializer); } else { // requires migration (may or may not have a convert deserializer) return initialResult; } {code} {{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. > Remove redundant code path in CompatibilityUtil > --- > > Key: FLINK-11075 > URL: https://issues.apache.org/jira/browse/FLINK-11075 > Project: Flink > Issue Type: Improvement > Components: Type Serialization System >Reporter: Tzu-Li (Gordon) Tai >Assignee: Tzu-Li (Gordon) Tai >Priority: Major > Fix For: 1.8.0 > > > In {{CompatibilityUtil#resolveCompatibilityResult}}: > {code:java} > CompatibilityResult initialResult = resolveCompatibilityResult( > (TypeSerializerSnapshot) 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) > precedingSerializer); > } else { > // requires migration (may or may not have a convert deserializer) > return initialResult; > } > {code} > {{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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (FLINK-11075) Remove redundant code path in CompatibilityUtil
[ https://issues.apache.org/jira/browse/FLINK-11075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tzu-Li (Gordon) Tai updated FLINK-11075: Description: In {{CompatibilityUtil#resolveCompatibilityResult}}: {code} CompatibilityResult initialResult = resolveCompatibilityResult( (TypeSerializerSnapshot) 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) precedingSerializer); } else { // requires migration (may or may not have a convert deserializer) return initialResult; } {code} {{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. was: In {{CompatibilityUtil#resolveCompatibilityResult}}: ``` CompatibilityResult initialResult = resolveCompatibilityResult( (TypeSerializerSnapshot) 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) 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. > Remove redundant code path in CompatibilityUtil > --- > > Key: FLINK-11075 > URL: https://issues.apache.org/jira/browse/FLINK-11075 > Project: Flink > Issue Type: Improvement > Components: Type Serialization System >Reporter: Tzu-Li (Gordon) Tai >Assignee: Tzu-Li (Gordon) Tai >Priority: Major > Fix For: 1.8.0 > > > In {{CompatibilityUtil#resolveCompatibilityResult}}: > {code} > CompatibilityResult initialResult = resolveCompatibilityResult( > (TypeSerializerSnapshot) 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) > precedingSerializer); } > else > { // requires migration (may or may not have a convert deserializer) > return initialResult; } > {code} > {{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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)