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 Fri, 30 Dec 2016 15:56:33 GMT
I think the ReturnCode opposite INCLUDE_AND_NEXT_COL is NEXT_COL : you're
not interested in any version of the current Cell.

Cheers

On Fri, Dec 30, 2016 at 4:53 AM, Carl M <soloninguno@hotmail.com> wrote:

> 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.
>
>
> Best,
>
> ________________________________
> 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
> 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