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 BB018200D04 for ; Mon, 11 Sep 2017 15:14:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B9B3A1609C3; Mon, 11 Sep 2017 13:14:05 +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 0BF5B1609C4 for ; Mon, 11 Sep 2017 15:14:04 +0200 (CEST) Received: (qmail 28442 invoked by uid 500); 11 Sep 2017 13:14:04 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 28431 invoked by uid 99); 11 Sep 2017 13:14:04 -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; Mon, 11 Sep 2017 13:14:04 +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 5F4601A3530 for ; Mon, 11 Sep 2017 13:14:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id B8MFVfndQjMD for ; Mon, 11 Sep 2017 13:14:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1A408610F0 for ; Mon, 11 Sep 2017 13:14:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8373CE01D8 for ; Mon, 11 Sep 2017 13:14:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 82C9A2416A for ; Mon, 11 Sep 2017 13:14:00 +0000 (UTC) Date: Mon, 11 Sep 2017 13:14:00 +0000 (UTC) From: "Peter Somogyi (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-18368) FilterList with multiple FamilyFilters concatenated by OR does not work. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 11 Sep 2017 13:14:05 -0000 [ https://issues.apache.org/jira/browse/HBASE-18368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161214#comment-16161214 ] Peter Somogyi commented on HBASE-18368: --------------------------------------- [~openinx], are you still working on this? > FilterList with multiple FamilyFilters concatenated by OR does not work. > ------------------------------------------------------------------------ > > Key: HBASE-18368 > URL: https://issues.apache.org/jira/browse/HBASE-18368 > Project: HBase > Issue Type: Sub-task > Components: Filters > Affects Versions: 3.0.0, 2.0.0-alpha-1 > Reporter: Peter Somogyi > Assignee: Zheng Hu > Priority: Critical > Attachments: HBASE-18368.branch-1.patch, HBASE-18368.branch-1.v2.patch, HBASE-18368.branch-1.v3.patch, HBASE-18368.patch, HBASE-18368.v2.patch, HBASE-18368.v3.patch, HBASE-18368.v3.patch > > > Scan gives back incomplete list if multiple filters are combined with OR / MUST_PASS_ONE. > Using 2 FamilyFilters in a FilterList using MUST_PASS_ONE operator will give back results for only the first Filter. > {code:java|title=Test code} > @Test > public void testFiltersWithOr() throws Exception { > TableName tn = TableName.valueOf("MyTest"); > Table table = utility.createTable(tn, new String[] {"cf1", "cf2"}); > byte[] CF1 = Bytes.toBytes("cf1"); > byte[] CF2 = Bytes.toBytes("cf2"); > Put put1 = new Put(Bytes.toBytes("0")); > put1.addColumn(CF1, Bytes.toBytes("col_a"), Bytes.toBytes(0)); > table.put(put1); > Put put2 = new Put(Bytes.toBytes("0")); > put2.addColumn(CF2, Bytes.toBytes("col_b"), Bytes.toBytes(0)); > table.put(put2); > FamilyFilter filterCF1 = new FamilyFilter(CompareFilter.CompareOp.EQUAL, new BinaryComparator(CF1)); > FamilyFilter filterCF2 = new FamilyFilter(CompareFilter.CompareOp.EQUAL, new BinaryComparator(CF2)); > FilterList filterList = new FilterList(FilterList.Operator.MUST_PASS_ONE); > filterList.addFilter(filterCF1); > filterList.addFilter(filterCF2); > Scan scan = new Scan(); > scan.setFilter(filterList); > ResultScanner scanner = table.getScanner(scan); > System.out.println(filterList); > for (Result rr = scanner.next(); rr != null; rr = scanner.next()) { > System.out.println(rr); > } > } > {code} > {noformat:title=Output} > FilterList OR (2/2): [FamilyFilter (EQUAL, cf1), FamilyFilter (EQUAL, cf2)] > keyvalues={0/cf1:col_a/1499852754957/Put/vlen=4/seqid=0} > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)