Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9D2BD200BEC for ; Thu, 29 Dec 2016 22:11:24 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9BCC6160B2D; Thu, 29 Dec 2016 21:11:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E5D1E160B23 for ; Thu, 29 Dec 2016 22:11:23 +0100 (CET) Received: (qmail 20302 invoked by uid 500); 29 Dec 2016 21:11:22 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 20270 invoked by uid 99); 29 Dec 2016 21:11:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2016 21:11:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C71691A00D7 for ; Thu, 29 Dec 2016 21:11:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id fYzmRl-_imXm for ; Thu, 29 Dec 2016 21:11:20 +0000 (UTC) Received: from mail-yw0-f172.google.com (mail-yw0-f172.google.com [209.85.161.172]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 29C2E5F1B3 for ; Thu, 29 Dec 2016 21:11:20 +0000 (UTC) Received: by mail-yw0-f172.google.com with SMTP id v81so112474421ywb.2 for ; Thu, 29 Dec 2016 13:11:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=NkKc8kVL9uZaRNTLLlvp/CUaA7QeuuQ+M+KvP2XRxWM=; b=OanokaWqYpEnkiO3zNe3NTNncXyF/IFS4ZS9gkeIP8C3FWQ6G86Dr89Bamtxzei+fm vpGUdVSQJsa1oTgzWhYru2sY+wLMo5x2B+24oVfe00sSm3e7V5iGmtSQyKPhoY1e9lSW mA5txTk6CXTC37zmHFDSQS511KEvWQ4MMNrpWscHLwe18yKzYsXxKSy+Fc4u7Nzw3Z/R gD3EJz7LnYKK2p0yruJ0NCplyEI4tYTri3SO/PZHlRvvXNDhw7kyFhDXR3JYYD0+RB8f eUUbVBjYNgTMwQhBAxE3fsVSL1br6FH0GMdSdlrsdB9bGbx/RRJByxh7uxAJfaMCoqDC TX+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=NkKc8kVL9uZaRNTLLlvp/CUaA7QeuuQ+M+KvP2XRxWM=; b=mRz4t2vmFERX9I8DLIVlZOht9i5up8ODoWb9T8DOztgFLPAQLI7tGnW6Qi+hpAOav7 GjdHfOmJZGUrvPWmK4Y3iBzwVWkq0yldgCOpxpct/Pn7W8j4YX+h8O6kYK5lboyKRSo7 4u4SQu5hOj4T6vdew3BXdvOb9y7PL/vyCvmkWd2wMCBt5CgVwCZPmUoGL5iPRtjiJl/5 iBPgrSaCa6EIbw1l47qG7ru2TtqkK2/eR4kyqtHHKDOntBAAoWZHqBMeRXhjCnapZZiV te1FlV83s8bpAyDi6G8eHpH3f3Q9xdzQprI7VbzhTVQ33f3bbXTeAaJaLYvUiIrlUKKk EB2Q== X-Gm-Message-State: AIkVDXLIhzdNlllPLB0m9Q+4E5MWGsJFsmfT8m9j4GTWf53SOn8n1G64hPrA+wGpXp84UDJA9MX8B7LvAgz5pA== X-Received: by 10.129.77.68 with SMTP id a65mr39966017ywb.287.1483045879190; Thu, 29 Dec 2016 13:11:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.244.79 with HTTP; Thu, 29 Dec 2016 13:11:18 -0800 (PST) In-Reply-To: References: From: Ted Yu Date: Thu, 29 Dec 2016 13:11:18 -0800 Message-ID: Subject: Re: Is it possible to implement a NOT filter in Hbase? To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=001a1140b770d0a1b70544d2865a archived-at: Thu, 29 Dec 2016 21:11:24 -0000 --001a1140b770d0a1b70544d2865a Content-Type: text/plain; charset=UTF-8 Last line should have read: (a != '123') OR (b != '456') On Thu, Dec 29, 2016 at 1:10 PM, Ted Yu 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 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, >> > > --001a1140b770d0a1b70544d2865a--