bq. the cell/value that was originally skip is not return Can you be a bit more specific (with a concrete example) : the skipped cell would not be returned (as indicated by the ReturnCode).
Thanks On Mon, Jan 2, 2017 at 1:06 PM, Carl M <soloning...@hotmail.com> wrote: > Hi Ted, > > > I tried your suggestion, unfortunately it doesn't work as expected. I > don't fully understand FilterList, but if a cell value was skip and I > reverse the ReturnCode, i get the right row but the cell/value that was > originally skip is not return. > > I also tried reversing only filterRow() method of FilterList, but I got > the same behaviour (the original cell/value missing). > > > Best, > > > ________________________________ > De: Ted Yu <yuzhih...@gmail.com> > Enviado: viernes, 30 de diciembre de 2016 12:56 p.m. > Para: user@hbase.apache.org > Asunto: Re: Is it possible to implement a NOT filter in Hbase? > > 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 <soloning...@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 <yuzhih...@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 <soloning...@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, > > > > > >