phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ankit beohar <ankitbeoha...@gmail.com>
Subject Re: Phoenix Ifnull
Date Fri, 12 Aug 2016 07:51:21 GMT
Hi Lukáš/James,

I have one table in which only one rowkey is available and for my null
check case I am firing below queries and in that null check is not working:-

[image: Inline image 1]

Please see and let me know if I am doing right thing or missed something.

Best Regards,
ANKIT BEOHAR


On Thu, Aug 11, 2016 at 9:18 PM, James Taylor <jamestaylor@apache.org>
wrote:

> Lukáš is correct, but if the CASE WHEN variant of the same didn't work,
> please file a JIRA (ideally with a unit test that repros the problem).
>
> Thanks,
> James
>
> On Thu, Aug 11, 2016 at 12:20 AM, Lukáš Lalinský <lalinsky@gmail.com>
> wrote:
>
>> On Thu, Aug 11, 2016 at 9:00 AM, ankit beohar <ankitbeohar90@gmail.com>
>> wrote:
>>
>>> I want to implement If null in apache phoenix like mysql.
>>>
>>> select ifnull(rowkey,myvalue),ifnull(col1,mycolvalue) from table where
>>> rowkey='abc';
>>>
>>> I tried below query but did not work:-
>>>
>>> select case when APP_KEY is null then 'nullvalue' else APP_KEY end from
>>> "CheckDump";
>>>
>>
>> The standard SQL function for this is coalesce(col, 'nullvalue').
>>
>> https://phoenix.apache.org/language/functions.html#coalesce
>>
>> Lukas
>>
>
>

Mime
View raw message