Github user JamesRTaylor commented on the pull request:

    https://github.com/apache/incubator-phoenix/pull/8#discussion_r9854967
  
    You do still need to do some of this work, but you do it up front at 
construction time. You just need to figure out the array element type first. It 
can be based solely on the data types of the children (not on the actual data). 
If all children are fixed width, then you have a fixed width array with a size 
of the biggest fixed width child. If any of the children are not fixed width, 
then you have a variable array. You need to figure out the common base type 
based on all the children (there's example code around for this - I think you 
have this already).
    
    Based on this, at construction time you need to wrap children in a 
CoerceExpression to coerce them to the expected type (i.e. the array element 
type). Then, as you evaluate each child, they will all be of the same type, so 
you can just serialize them as you go. No need to turn them into objects first.


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