Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> filtering rows for column values not null


Copy link to this message
-
Re: filtering rows for column values not null
I will have said:
scan.addColumn(YOUR_CF, Bytes.toBytes("firstName"));
But not sure if it really makes a difference...
2013/10/24 Vladimir Rodionov <[EMAIL PROTECTED]>

> If 'firstName' is NULL - it is missing completely from a row. Add
> explicitly this column to Scan you create:
>
> scan.addColumn(YOUR_CF, 'firstName'.getBytes());
>
> Best regards,
> Vladimir Rodionov
> Principal Platform Engineer
> Carrier IQ, www.carrieriq.com
> e-mail: [EMAIL PROTECTED]
>
> ________________________________________
> From: Ted [[EMAIL PROTECTED]]
> Sent: Thursday, October 24, 2013 1:54 AM
> To: [EMAIL PROTECTED]
> Subject: filtering rows for column values not null
>
> Hi I have a relatively simple situation,
>
> As an example I have a table of Users, with first and last name.
>
> I set a scan a FilterList and I add a SingleColumnValueFilter, with
> column qualifier=firstName, CompareOp.EQUAL, and value="bob".
>
> The problem is, I'm getting "bob" as well as anyone with out a firstName.
>
> I tried adding NOT_EQUALS null and NOT_EQUALS (new byte[0]) and neither
> helped.
>
> Does anyone know of how to filter on a column value not null?
> --
> Ted.
>
> Confidentiality Notice:  The information contained in this message,
> including any attachments hereto, may be confidential and is intended to be
> read only by the individual or entity to whom this message is addressed. If
> the reader of this message is not the intended recipient or an agent or
> designee of the intended recipient, please note that any review, use,
> disclosure or distribution of this message or its attachments, in any form,
> is strictly prohibited.  If you have received this message in error, please
> immediately notify the sender and/or [EMAIL PROTECTED] and
> delete or destroy any copy of this message and its attachments.
>