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

Biju Nair commented on PHOENIX-3917:
------------------------------------

Hi [~giacomotaylor], For a query like {{SELECT A_ID, A_DATA FROM TABLE}} the 
projected columns families are not added to the {{scan}} until 
[here|https://github.com/apache/phoenix/blob/e7629ca39224e7cbc49e8a7740ed96877a16df76/phoenix-core/src/main/java/org/apache/phoenix/compile/ProjectionCompiler.java#L493-L501]
 and that being the reason for moving the size calculation logic after the 
{{if}} condition. With out the move the estimated size of the projection is 
returned as zero for the queries mentioned in the description. 

> RowProjector#getEstimatedRowByteSize() returns incorrect value
> --------------------------------------------------------------
>
>                 Key: PHOENIX-3917
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3917
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Biju Nair
>            Assignee: Biju Nair
>            Priority: Minor
>         Attachments: PHOENIX-3917_v2.patch
>
>
> {{queryPlan..getProjector().getEstimatedRowByteSize()}} returns "0" for a 
> query {{SELECT A_ID FROM TABLE}} where {{A_ID}} is Primary Key. Same is the 
> case for the query {{SELECT A_ID, A_DATA FROM TABLE}} where {{A_DATA}} is a 
> non key column. Assuming that the method is meant to return the estimated 
> number of bytes from the query projection the returned value of 0 is 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to