hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Is it possible to implement a NOT filter in Hbase?
Date Thu, 29 Dec 2016 21:11:18 GMT
Last line should have read:

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

On Thu, Dec 29, 2016 at 1:10 PM, Ted Yu <yuzhihong@gmail.com> wrote:

> You can try negating the ReturnCode from filterKeyValue() (at the root of
> FilterList):
>
>   abstract public ReturnCode filterKeyValue(final Cell v) throws
> IOException;
>
> INCLUDE -> SKIP
>
> SKIP -> INCLUDE
>
> 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,
>>
>
>

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