drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques Nadeau <jacq...@dremio.com>
Subject Re: Question about DrillAggFunc
Date Fri, 26 Feb 2016 18:33:07 GMT
I agree that reset() should set properly.

--
Jacques Nadeau
CTO and Co-Founder, Dremio

On Fri, Feb 26, 2016 at 9:51 AM, Abdel Hakim Deneche <adeneche@maprtech.com>
wrote:

> Looking at VarCharAggrFunctions.java I see the following (edited for the
> sake of this email):
>
> setup() {
> >    ...
> >    value = new ObjectHolder();
> >    value.obj = new DrillByteArray()
> > }
> > add() {
> >    ...
> >    // accesses value.obj.getLength()
> > }
> > reset() {
> >    ...
> >    value = new ObjectHolder()
> >    // we don't set value.obj
> > }
>
>
> The code expects setup() to be called whenever we call reset() otherwise we
> hit a NullPointerException when we call add()
>
> Is this the expected behavior ? or should reset() make sure value.obj is
> set properly ??
>
> Thanks
>
> --
>
> Abdelhakim Deneche
>
> Software Engineer
>
>   <http://www.mapr.com/>
>
>
> Now Available - Free Hadoop On-Demand Training
> <
> http://www.mapr.com/training?utm_source=Email&utm_medium=Signature&utm_campaign=Free%20available
> >
>

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