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

James Taylor commented on PHOENIX-988:
--------------------------------------

Note that an expression should be able to return true with it's ptr set to a 
length of zero, which should tell the parent expression that it's definitively 
calculated that the expression evaluates to null (as opposed to an expression 
not having enough information to evaluate completely which is when it returns 
false).

> The result is not expected when select case when case
> -----------------------------------------------------
>
>                 Key: PHOENIX-988
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-988
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: jay wong
>             Fix For: 3.1
>
>         Attachments: PHOENIX-988.patch
>
>
> A table : 
> select count( int_column_a ) count from table1 where int_column_a<10;
> |   COUNT    |
> | 0          |
> then select with sql :
> select count( distinct case when int_column_a<10 then 2 else null end ) count 
> from table1;
> the expected reuslt is 0. but 1 we got.
> As the CaseExcression#evaluate doesn't handle the case.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to