But this is the same size you're using to estimate the entire serialized
size of the array. Are you estimating one byte per element? At least use
ValueSchema.ESTIMATED_VARIABLE_LENGTH_SIZE as a factor to multiply the
number of elements by for the estimated size.


On Sun, Feb 23, 2014 at 8:08 PM, ramkrish86 <notifications@github.com>wrote:

> In
> phoenix-core/src/main/java/org/apache/phoenix/expression/ArrayConstructorExpression.java:
>
> >      public ArrayConstructorExpression(List<Expression> children, PDataType baseType) {
> >          super(children);
> >          init(baseType);
> > +        estimatedSize = PArrayDataType.estimateSize(this.children.size(), this.baseType);
> > +        if (!this.baseType.isFixedWidth()) {
> > +            offsetPos = new int[estimatedSize];
>
> Sorry i forgot to update on this here. Actually the estimateSize would
> return children.size internally. Hence i used estimateSize. Let me change
> it explicitly here.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/apache/incubator-phoenix/pull/8/files#r9980773>
> .
>