By default, the null values are not inserted into hbase. If the column is
nullable, the first additional byte determines if the column value is null
or not. When a value is inserted into nullable column the first byte is
always 0x00. When the column value is updated to null, the existing column
value will be replaced with 0xFF in the first byte because it is not
possible to switch to delete cell value in the midst of data execution.

Selva

-----Original Message-----
From: Eric Owhadi [mailto:[email protected]]
Sent: Thursday, October 29, 2015 11:06 AM
To: [email protected]
Subject: question on NULL representation in DB?

Reading the code, I have a hard time understanding the various ways NULLs
are represented in the DB for non-aligned format.

I see comments in the code suggesting that nullable columns have the first
value byte representing if the value is null, but I also see special cases
all over the place that take care of null as being totally absent cells.

The former method (adding a first byte indicating a null) having
consequences on predicate push down -> need to re-do predicate evaluation at
trafodion layer to deal with null semantic.



But I am not sure why we have this special situation of coding null with a
byte, instead of always dealing with nulls as being “absent” cell? I am sure
there is a reason, but I just could not figure it out…

Someone can help?

Eric

Reply via email to