liusong created PHOENIX-2861:
--------------------------------
Summary: phoenix user-defined function
Key: PHOENIX-2861
URL: https://issues.apache.org/jira/browse/PHOENIX-2861
Project: Phoenix
Issue Type: Test
Affects Versions: 4.4.0
Environment: hbase 0.98 phoenix4.4
Reporter: liusong
Fix For: 4.4.1
I'm coding phoenix user-defined function recently.I have a problem when i code
the function.I need to check the filed is null or not null.I upsert the data in
phoenix set the filed null.Here is the code.
String sourceStr = (String) getSourceStrExpression().getDataType().toObject(ptr,
getSourceStrExpression().getSortOrder());
if (ptr.getLength() == 0) {
ptr.set(PVarchar.INSTANCE.toBytes("false"));}
else{
ptr.set(PVarchar.INSTANCE.toBytes("true"));}
I always get true in phoenix but i think i will get false.
How can i check the field is null?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)