drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abdel Hakim Deneche <adene...@maprtech.com>
Subject Re: Question about DrillAggFunc
Date Mon, 07 Mar 2016 05:50:39 GMT
Thanks Jacques,

I will submit a patch.

On Fri, Feb 26, 2016 at 7:33 PM, Jacques Nadeau <jacques@dremio.com> wrote:

> 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
> > >
> >
>



-- 

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