drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abdel Hakim Deneche <adene...@maprtech.com>
Subject Question about DrillAggFunc
Date Fri, 26 Feb 2016 17:51:26 GMT
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