Hi Hangxiang,

I'm ok with your proposed Step 2, but I'm afraid you missed my point.
As I described in the option 2, it is unnecessary to call the new and
old interface both. Instead of that, replace any use of the old
interface with the new interface, and call the old interface in the
default implementation of the new interface. The benefits we get:
1. Since we have replace the use of the old interface, it's very
convenient to remove the old interface in future.
2. Code is more straightforward. The user will know exactly how the
compatibility checking is done, and they could decide whether the old
logic would affect the result.

And BTW, if option 2 is adopted, there is no need using option 1.

What do you think?

Best,
Zakelly

On Fri, Oct 14, 2022 at 11:39 AM Han Yin <alexyin...@gmail.com> wrote:
>
> Hi Hangxiang,
>
> Thanks for the proposal. It seems more reasonable to let the new serializer 
> claim the compatibility in the cases you mentioned.
>
> I have but one question here. What happens in the case of 
> “compatibleAfterMigration” after we completely reverse the direction (in step 
> 3)?  To be specific, migration from an old schema calls for the previous 
> serializer to read bytes into state objects. How should a new serializer 
> decide whether the migration is possible?
>
> Best,
> Han
>
> On 2022/10/12 12:41:07 Hangxiang Yu wrote:
> > Dear Flink developers,
> >
> > I would like to start a discussion thread on FLIP-263[1] proposing to
> > improve the usability of resolving schema compatibility.
> >
> > Currently, the place for compatibility checks is
> > TypeSerializerSnapshot#resolveSchemaCompatibility
> > which belongs to the old serializer, There are no ways for users to specify 
> > the
> > compatibility with the old serializer in the new customized serializer.
> >
> > The FLIP hopes to reverse the direction of resolving schema compatibility
> > to improve the usability of resolving schema compatibility.
> >
> > [1]
> > https://cwiki.apache.org/confluence/display/FLINK/FLIP-263%3A+Improve+resolving+schema+compatibility
> >

Reply via email to