phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <jamestay...@apache.org>
Subject Re: UPSERT null vlaues
Date Sat, 28 Apr 2018 15:19:55 GMT
The contract with immutable tables is that a row will never be partially
updated (including setting a column to null). Phoenix can’t enforce this
and retain the perf gain it gives you, so it’s on an honor system instead.
Attempts to set a value to null are stripped out rather than potentially
placing a delete marker that in theory shouldn’t be needed.

So short answer is to not declare your table as immutable if you need to
set column values to null.

Thanks,
James

On Sat, Apr 28, 2018 at 3:24 AM Stepan Migunov <
Stepan.Migunov@firstlinesoftware.com> wrote:

> Thank you James, it was “immutable”. I didn't know that it affects.
>
>
>
> *From:* James Taylor [mailto:jamestaylor@apache.org]
> *Sent:* Friday, April 27, 2018 5:37 PM
> *To:* user@phoenix.apache.org
> *Subject:* Re: UPSERT null vlaues
>
>
>
> Hi Stepan,
>
> Please post your complete DDL and indicate the version of Phoenix and
> HBase you’re using.  Your example should work as expected barring
> declaration of the table as immutable or COL2 being part of the primary key.
>
>
>
> Thanks,
>
> James
>
>
>
> On Fri, Apr 27, 2018 at 6:13 AM Stepan Migunov <
> stepan.migunov@firstlinesoftware.com> wrote:
>
> Hi,
> Could you please clarify, how I can set a value to NULL?
>
> After upsert into temp.table (ROWKEY, COL1, COL2) values (100, "ABC",
> null); the value of COL2 still has a previous value (COL1 has "ABC" as
> expected).
>
> Or there is only one way - to set  STORE_NULLS = true?
>
> Thanks,
> Stepan.
>
>

Mime
View raw message