You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "wangweiyi (JIRA)" <ji...@apache.org> on 2016/05/17 15:52:12 UTC
[jira] [Updated] (PHOENIX-2907) UDFs in where clause not work
[ https://issues.apache.org/jira/browse/PHOENIX-2907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
wangweiyi updated PHOENIX-2907:
-------------------------------
Description:
it's ok to use my UDF after select, like this:
select myudf("col") from MY_TABLE limit 1;
then will get:
+-----------------------+
MYUDF(cf."col")
+-----------------------+
2
+-----------------------+
then I try to use myudf after where clause, like this:
select * from MY_TABLE where myudf("col")='2';
however, this time I get nothing.
I know the reason is that the "col" column is null, if the "col" column is not null then everything works fine. So, how can I handle the null value in my UDF?
was:
it's ok to use my UDF after select, like this:
select myudf("col") from MY_TABLE limit 1;
then will get:
+-----------------------+
| MYUDF(cf."col") |
+-----------------------+
| 2 |
+-----------------------+
then I try to use myudf after where clause, like this:
select * from MY_TABLE where myudf("col")='2';
however, this time I get nothing.
I know the reason is that the "col" column is null, if the "col" column is not null then everything works fine. So, how can I handle the null value in my UDF?
> UDFs in where clause not work
> -----------------------------
>
> Key: PHOENIX-2907
> URL: https://issues.apache.org/jira/browse/PHOENIX-2907
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.7.0
> Environment: phoenix-4.7.0
> HBase-0.98
> Reporter: wangweiyi
>
> it's ok to use my UDF after select, like this:
> select myudf("col") from MY_TABLE limit 1;
> then will get:
> +-----------------------+
> MYUDF(cf."col")
> +-----------------------+
> 2
> +-----------------------+
> then I try to use myudf after where clause, like this:
> select * from MY_TABLE where myudf("col")='2';
> however, this time I get nothing.
> I know the reason is that the "col" column is null, if the "col" column is not null then everything works fine. So, how can I handle the null value in my UDF?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)