[ 
https://issues.apache.org/jira/browse/PHOENIX-2160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14707955#comment-14707955
 ] 

ramkrishna.s.vasudevan commented on PHOENIX-2160:
-------------------------------------------------

Thanks for the patch Dumindu.
{code}
indexKVs.add(new KeyValueColumnExpression(expression.getColumn()));
648                                  children.set(0, new 
KeyValueColumnExpression(expression.getColumn()));
{code}
Two KeyValueColumnExpression objects need not be created. Create one and use it.
{code}
 //Find the Cell with exact value of array index
{code}
This part why is it having other cells other than the special KV that gives the 
given array index.
Because in the server we have removed the other cells and create a result with 
the dummy KV.
See BaseScannerRegionObserver in 
{code}
                result.add(new KeyValue(rowKv.getRowArray(), 
rowKv.getRowOffset(), rowKv.getRowLength(),
                        QueryConstants.ARRAY_VALUE_COLUMN_FAMILY, 0, 
QueryConstants.ARRAY_VALUE_COLUMN_FAMILY.length,
                        QueryConstants.ARRAY_VALUE_COLUMN_QUALIFIER, 0,
                        QueryConstants.ARRAY_VALUE_COLUMN_QUALIFIER.length, 
HConstants.LATEST_TIMESTAMP,
                        Type.codeToType(rowKv.getTypeByte()), value, 0, 
value.length));
{code}

> Projection of specific array index does not work
> ------------------------------------------------
>
>                 Key: PHOENIX-2160
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2160
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: PHOENIX-2160.patch
>
>
> PHOENIX-10 that allowed projection of specific array index does not work now. 
> Was looking into the code for some thing and found this issue. Let me know if 
> am missing something.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to