[ 
https://issues.apache.org/jira/browse/PHOENIX-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ramkrishna.s.vasudevan updated PHOENIX-10:
------------------------------------------

    Attachment: Phoenix-10_2.patch

Attaching an updated patch. Just follows what you have said James.  
This also does not work with the select with case and array and also with Group 
by.  You can see that in the SelectClause visitor's visit leave method where I 
have checked an instance of check to make the group by to work.
I had a change done on the GroupedAggregateRegionObserver also where the Scan 
attribute has to be read and form similar thing as in ScanREgionObserver.  But 
for now I have removed it because in group by the expression that comes in is 
RowKeyExpression. 
The patch that I attached earlier also failed in the above two cases only 
making all other cases to pass.  There I had tried to use the same 
ARrayIndexFunction but with an if/else condition.  KeyValueSchema is a better 
idea though as it is handling all cases.  Sorry, that am taking a lot of time. 
First am not spending the whole of time on this and second is there are more 
scnearios to verify ( and am not fully aware of the join code where 
keyvalueschema is getting utilised).  I have some 2 more testcases in my mind.  
Will add that later once the approach is fine.
Once again thanks James for your help.


> Push projection of a single ARRAY element to the server
> -------------------------------------------------------
>
>                 Key: PHOENIX-10
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-10
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: James Taylor
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: Phoenix-10_1.patch, Phoenix-10_2.patch
>
>
> If only a single array element is selected, we'll still return the entire 
> array back to the client. Instead, we should push this to the server and only 
> return the single array element. The same goes for the reference to an ARRAY 
> in the WHERE clause. There's a general HBase fix for this (i.e. the ability 
> to define a separate set of key values that will be returned versus key 
> values available to filters) that has a patch here, but is deemed not 
> possible to pull into the 0.94 branch by @lhofhansl.
> My thought is that we can add a Filter at the end our our filter chain that 
> filters out any KeyValues that aren't in the SELECT expressions (i.e. filter 
> out if a column is referenced in the WHERE clause, but not in the SELECT 
> expressions). This same Filter could handle returning only the elements of 
> the array that are referenced in the SELECT expression rather than the entire 
> array.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to