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

ramkrishna.s.vasudevan updated PHOENIX-1312:
--------------------------------------------
    Attachment: PHOENIX-1312_v3.patch

Udpated patch that projects the CF in where clause and allows the guide posts 
also to be picked up based on the CF in the where clause. If not found it will 
allow the default CF to be used. 
But in the case where there is a COUNT(*) query with a where clause then the 
projection happens only with the default case. So we are using the default CF 
only. Is that fine?
Because in TupleProjectionCompiler we have this
{code}
        Preconditions.checkArgument(!select.isJoin());
        // Non-group-by or group-by aggregations will create its own projected 
result.
        if (select.getInnerSelectStatement() != null 
                || select.getFrom() == null
                || select.isAggregate() 
                || select.isDistinct()
                || 
(context.getResolver().getTables().get(0).getTable().getType() != 
PTableType.TABLE
                && 
context.getResolver().getTables().get(0).getTable().getType() != 
PTableType.INDEX && 
context.getResolver().getTables().get(0).getTable().getType() != 
PTableType.VIEW))
            return null;
{code}


> Do not always project the empty column family
> ---------------------------------------------
>
>                 Key: PHOENIX-1312
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1312
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 4.7.0
>
>         Attachments: PHOENIX-1312_1.patch, PHOENIX-1312_v2.patch, 
> PHOENIX-1312_v3.patch, Phoenix-1312.patch
>
>
> Often times, we don't need to, but it seems we always are. See 
> MultiCfQueryExecIT.testGuidePostsForMultiCFs() where we run a query like this:
> {code}
> SELECT count(*) FROM multi_cf WHERE e.cpu_utilization IS NOT NULL
> {code}



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

Reply via email to