Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 05386183CC for ; Tue, 22 Dec 2015 15:06:50 +0000 (UTC) Received: (qmail 11907 invoked by uid 500); 22 Dec 2015 15:06:46 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 11877 invoked by uid 500); 22 Dec 2015 15:06:46 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 11837 invoked by uid 99); 22 Dec 2015 15:06:46 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Dec 2015 15:06:46 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B92CE2C1F55 for ; Tue, 22 Dec 2015 15:06:46 +0000 (UTC) Date: Tue, 22 Dec 2015 15:06:46 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-4020) The not-equal operator returns incorrect results when used on the HBase row key MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-4020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15068215#comment-15068215 ] ASF GitHub Bot commented on DRILL-4020: --------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/drill/pull/238 > The not-equal operator returns incorrect results when used on the HBase row key > ------------------------------------------------------------------------------- > > Key: DRILL-4020 > URL: https://issues.apache.org/jira/browse/DRILL-4020 > Project: Apache Drill > Issue Type: Bug > Components: Storage - HBase > Affects Versions: 1.2.0 > Environment: Drill Sandbox > Reporter: Akihiko Kusanagi > Priority: Critical > Attachments: DRILL-4020.1.patch.txt > > > Create a test HBase table: > {noformat} > hbase> create 'table', 'f' > hbase> put 'table', 'row1', 'f:c', 'value1' > hbase> put 'table', 'row2', 'f:c', 'value2' > hbase> put 'table', 'row3', 'f:c', 'value3' > {noformat} > The table looks like this: > {noformat} > 0: jdbc:drill:zk=maprdemo:5181> SELECT CONVERT_FROM(row_key, 'UTF8') FROM hbase.`table`; > +---------+ > | EXPR$0 | > +---------+ > | row1 | > | row2 | > | row3 | > +---------+ > 1 row selected (4.596 seconds) > {noformat} > However, this query returns incorrect results when a not-equal operator is used on the row key: > {noformat} > 0: jdbc:drill:zk=maprdemo:5181> SELECT CONVERT_FROM(row_key, 'UTF8') FROM hbase.`table` WHERE row_key <> 'row1'; > +---------+ > | EXPR$0 | > +---------+ > | row1 | > | row2 | > | row3 | > +---------+ > 1 row selected (0.573 seconds) > {noformat} > In the query plan, there is no RowFilter: > {noformat} > 00-00 Screen > 00-01 Project(EXPR$0=[CONVERT_FROMUTF8($0)]) > 00-02 Scan(groupscan=[HBaseGroupScan [HBaseScanSpec=HBaseScanSpec [tableName=table, startRow=, stopRow=, filter=null], columns=[`row_key`]]]) > {noformat} > When the query has multiple not-equal operators, it works fine: > {noformat} > 0: jdbc:drill:zk=maprdemo:5181> SELECT CONVERT_FROM(row_key, 'UTF8') FROM hbase.`table` WHERE row_key <> 'row1' AND row_key <> 'row2'; > +---------+ > | EXPR$0 | > +---------+ > | row3 | > +---------+ > 1 row selected (0.255 seconds) > {noformat} > In the query plan, a FilterList has two RowFilters with NOT_EQUAL operators: > {noformat} > 00-00 Screen > 00-01 Project(EXPR$0=[CONVERT_FROMUTF8($0)]) > 00-02 Scan(groupscan=[HBaseGroupScan [HBaseScanSpec=HBaseScanSpec [tableName=table, startRow=, stopRow=, filter=FilterList AND (2/2): [RowFilter (NOT_EQUAL, row1), RowFilter (NOT_EQUAL, row2)]], columns=[`row_key`]]]) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)