hi tison,

It is always better to make the codebase more clear, so it would be great
if you would do an investigation.

tison <wander4...@gmail.com> 于2020年4月22日周三 下午2:42写道:

> Hi Vinoth,
>
> >much of the code actually does not depend on the templatized type at all
>
> Agree.
>
> Let's say I'm ok with untyped HoodieRecordPayload since all payload is
> effectively untyped(Object) which we deal with type and cast at runtime.
>
> Though, it is noisy we implement it in a half-generic form. Meanwhile,
> wildcard doesn't work for every case since <? capture HoodieRecordPayload>
> is NOT compatible with <? capture HoodieRecordPayload> and any
> exact T extends HoodieRecordPayload.
>
> We don't actually use the type parameter heavily, so it is an alternative
> that we define HoodieRecordPayload just
>
>   public class HoodieRecordPayload { }
>
> If the community think it is a worth effort, I'm glad to do more
> investigation
> and evaluate its impact, also find a practical way.
>
> Best,
> tison.
>
>
> Vinoth Chandar <vin...@apache.org> 于2020年4月22日周三 下午2:22写道:
>
> > Hi Tison,
> >
> > Thanks for raising this.. In most places doing a HoodieTable<?> wildcard
> > should be totally acceptable, since much of the code actually does not
> > depend on the templatized type at all..
> >
> > Def, worth taking another look holistically and see if we can address
> > this..
> >
> > My 2c.
> > Vinoth
> >
> >
> > On Mon, Apr 20, 2020 at 11:32 PM tison <wander4...@gmail.com> wrote:
> >
> > > Hi developers,
> > >
> > > Recently when I went through Hudi codebase, I found some annoying
> warning
> > > 'raw use of
> > > parameterized class' and some other generic type related.
> > >
> > > It seems the root of this wide usage of raw type is HoodieRecordPayload
> > > where
> > >
> > >   HoodieRecordPayload<T extends HoodieRecordPayload>
> > >
> > > should have been
> > >
> > >   HoodieRecordPayload<T extends HoodieRecordPayload<T>>
> > >
> > > I'm not sure what community think of this wide usage of raw type and
> > given
> > > it affect most of our
> > > code I'd like to start this thread for advice. Personally explicit type
> > > signature benefits from strong
> > > type system but it might cause some signature breaking changes as well
> as
> > > require a huge
> > > engineering effort.
> > >
> > > Shall Hudi live with these raw types? Or we will have a plan migrate to
> > > explicit generic type?
> > >
> > > Best,
> > > tison.
> > >
> >
>

Reply via email to