[ https://issues.apache.org/jira/browse/PHOENIX-2907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15543667#comment-15543667 ]
Sergey Soldatov commented on PHOENIX-2907: ------------------------------------------ There is a useful blog post how to create UDFs. This code perfectly handle null values (so you may use statements like where myudf("col") is null ) > 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 > Assignee: Sergey Soldatov > > 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. My question is how can I handle the null > value in my UDF then I can use it in where clause correctly? -- This message was sent by Atlassian JIRA (v6.3.4#6332)