Github user ramkrish86 commented on a diff in the pull request:

    https://github.com/apache/incubator-phoenix/pull/8#discussion_r9902702
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/expression/ArrayConstructorExpression.java
 ---
    @@ -39,18 +32,30 @@
         private PDataType baseType;
         private int position = -1;
         private Object[] elements;
    -    
    -    
    +    private TrustedByteArrayOutputStream byteStream = null;
    +    private DataOutputStream oStream = null;
    +    private int estimatedSize = 0;
    +    private byte[] offsetArr;
    +
         public ArrayConstructorExpression(List<Expression> children, PDataType 
baseType) {
             super(children);
             init(baseType);
    +        estimatedSize = PArrayDataType.estimateSize(this.children.size(), 
this.baseType);
    +        if (!this.baseType.isFixedWidth() || 
baseType.isCoercibleTo(PDataType.VARCHAR)) {
    +            offsetArr = new byte[estimatedSize];
    +            estimatedSize = estimatedSize + (2 * Bytes.SIZEOF_BYTE) + (2 * 
Bytes.SIZEOF_INT);
    +        } else {
    +            estimatedSize = estimatedSize + Bytes.SIZEOF_BYTE + 
Bytes.SIZEOF_INT;
    +        }
    +        byteStream = new TrustedByteArrayOutputStream(estimatedSize);
    --- End diff --
    
    Okie.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
[email protected] or file a JIRA ticket with INFRA.
---

Reply via email to