phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dumindu Buddhika (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-2160) Projection of specific array index does not work
Date Tue, 25 Aug 2015 11:22:45 GMT


Dumindu Buddhika commented on PHOENIX-2160:

@james taylor, [~ram_krish] Thanks for the reviews. I have found an issue with this while
running a test.
In a query like this,
SELECT ARRAY_APPEND(doubles, doubles[2]) FROM regions WHERE region_name = 'SF Bay Area'
Where we refer to the same array at two places. When we need the whole array and a single
array element (here doubles is a double array) in the same query.

But with this optimization, since we have  doubles[2] in the query we remove the kv with the
full array at BaseScannerRegionObserver.replaceArrayIndexElement 
if (Bytes.equals(kvExp.getColumnFamily(), 0, kvExp.getColumnFamily().length,
                                    kv.getFamilyArray(), kv.getFamilyOffset(), kv.getFamilyLength())
                                && Bytes.equals(kvExp.getColumnName()
                                    , 0, kvExp.getColumnName().length,
                                        kv.getQualifierArray(), kv.getQualifierOffset(), kv.getQualifierLength()))
                                // remove the kv that has the full array values.

Because of this ARRAY_APPEND fails to evaluate the array expression. Any idea on what can
be done to prevent this from happening?

> Projection of specific array index does not work
> ------------------------------------------------
>                 Key: PHOENIX-2160
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: PHOENIX-2160.patch, PHOENIX-2160_v2.patch, PHOENIX-2160_v3.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

View raw message