Support Questions

Find answers, ask questions, and share your expertise

Apache Phoenix Upsert not working while trying to update null/empty columns

avatar
New Contributor

Step1: Update a column with null/'' value . Upsert into abc.tablename (Rowkeycombo1, Rowkeycombo2, columnname) values (123,to_date('1988-08-06'),null);

This works fine and the column then appears to have no data while doing a select.

Step2:Update the same column with a valid value. Upsert into abc.tablename (Rowkeycombo1, Rowkeycombo2, columnname) values (123,to_date('1988-08-06'),'TRYVAL'); Shows 1 row affected but the column still appears null/empty.

However there is no issue while updating a column which has a valid value to any other value.

I'm very new to Phoenix and hbase so I'm at a loss here.

4 REPLIES 4

avatar
Expert Contributor

Hbase does not store NULL. Actually it stores nothing when you give null. So output you are getting is expected.

avatar
New Contributor

Hello, I know this is aged topic... but I have the same issue.

I've not understood the answer from @schhabra1 : ok, hbase does not store NULL, but with "step2" @ananya_antony is trying to upsert the previous value...

is there any setting to configure in order to update previously "not stored column" with a new "not null" value?

 

can anybody give me some clues please? thanks

avatar
Community Manager

@frankthel, as this is an older post, you would have a better chance of receiving a resolution by starting a new thread. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Contributor

Hi,

This a BUG from Phoenix 

if I use upsert with null value, it "insert" the field with 0x00 0x00 bytes values and we cannot change

 

https://issues.apache.org/jira/browse/PHOENIX-6583

 

Please check the above BUG jira