flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Ewen <se...@apache.org>
Subject Re: PojoComparator question
Date Tue, 31 May 2016 15:56:30 GMT
The "compareSerialized" should probably internally always reuse instances,
where possible.
Since these are never passed into user code or anything, that should be
okay to do.

On Tue, May 31, 2016 at 11:52 AM, Aljoscha Krettek <aljoscha@apache.org>
wrote:

> Hi,
> I think this is an artifact from the past. Using the "non-reuse"
> deserialize seems more correct, especially in the presence of subclasses.
>
> Best,
> Aljoscha
>
> On Mon, 30 May 2016 at 19:13 Gábor Horváth <xazax.hun@gmail.com> wrote:
>
> > Hi!
> >
> > While I was working on code generation support for PojoComparators, I
> > stumbled upon the compareSerialized method [1]. It first creates two new
> > instances and then it is using the reusing overloads of the serializer.
> > Calling the non-reusing overload would create the instance anyways. Is
> > there a reason why the reusing overload is used here?
> >
> > Regards,
> > Gábor
> >
> > [1]
> >
> >
> https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoComparator.java#L277
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message