hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl M <soloning...@hotmail.com>
Subject Re: Is it possible to implement a NOT filter in Hbase?
Date Fri, 30 Dec 2016 12:53:57 GMT
Thanks Ted! Great idea replacing the value in filterKeyValue. Although I'm not quite sure looking
at FilterList code if only INCLUDE/SKIP should be replaced, and which should be the correct
replacement for INCLUDE_AND_NEXT_COL. What do you think? If not maybe i should try to implement
DeMorgan's law but I think it would be harder.


De: Ted Yu <yuzhihong@gmail.com>
Enviado: jueves, 29 de diciembre de 2016 06:10 p.m.
Para: user@hbase.apache.org
Asunto: Re: Is it possible to implement a NOT filter in Hbase?

You can try negating the ReturnCode from filterKeyValue() (at the root of

  abstract public ReturnCode filterKeyValue(final Cell v) throws



Alternatively, you can use De Morgan's law to transfer the condition:

 NOT (a = '123' AND b = '456') becomes

 (NOT a = '123') OR (b = '456')

On Thu, Dec 29, 2016 at 12:56 PM, Carl M <soloninguno@hotmail.com> wrote:

> Hi guys
> I'm trying to implement some kind of NOT filter in Hbase, but don't know
> if possible, I'm playing with FilterIfMissing and FilterList.Operator but
> without luck.
> I know how to return rows not having a specific column, but I mean
> something like returning rows NOT fullfilling a condition, where condition
> could be not only a SingleColumnValueFilter but a combined condition with
> FilterList. In SQL would be something like this for example
> SELECT * FROM table WHERE NOT (a = '123' AND b = '456');
> Thanks in advance,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message