Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4086417793 for ; Mon, 9 Mar 2015 05:53:00 +0000 (UTC) Received: (qmail 32207 invoked by uid 500); 9 Mar 2015 05:53:00 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 32150 invoked by uid 500); 9 Mar 2015 05:53:00 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 32139 invoked by uid 99); 9 Mar 2015 05:53:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2015 05:53:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 09 Mar 2015 05:52:58 +0000 Received: (qmail 31926 invoked by uid 99); 9 Mar 2015 05:52:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2015 05:52:38 +0000 Date: Mon, 9 Mar 2015 05:52:38 +0000 (UTC) From: "daniel meng (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-1709) And expression of primary key RVCs can not compile MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PHOENIX-1709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352585#comment-14352585 ] daniel meng commented on PHOENIX-1709: -------------------------------------- i find two issues after apply v2.patch 1. WHERE (pk1, pk2) IN ((1, 2), (2, 3)) AND pk2 = 4 will compile as FULL SCAN, but it should be DEGENERATE SCAN 2. when the table is a multi-tenant table and the tenant column data type is not fixed length. the RowKeySchema's iterator can not be use directly on iterating primary key RCVs. because the first next() will skip one byte for SEPERATOR. i made a new v3.patch based on v2.patch > And expression of primary key RVCs can not compile > -------------------------------------------------- > > Key: PHOENIX-1709 > URL: https://issues.apache.org/jira/browse/PHOENIX-1709 > Project: Phoenix > Issue Type: Bug > Reporter: James Taylor > Assignee: James Taylor > Attachments: PHOENIX-1709.patch, PHOENIX-1709_v2.patch > > > 1 . create table t (a integer not null, b integer not null, c integer > constraint pk primary key (a,b)); > 2. select c from t where a in (1,2) and b = 3 and (a,b) in ( (1,2) , (1,3)); > I got exception on compile : > java.lang.IllegalArgumentException > at > com.google.common.base.Preconditions.checkArgument(Preconditions.java:76) > at > org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor$KeySlot.inter > sect(WhereOptimizer.java:955) > at > org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.intersectSlot > s(WhereOptimizer.java:506) > at > org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.andKeySlots(W > hereOptimizer.java:551) > at > org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh > ereOptimizer.java:725) > at > org.apache.phoenix.compile.WhereOptimizer$KeyExpressionVisitor.visitLeave(Wh > ereOptimizer.java:349) > at > org.apache.phoenix.expression.AndExpression.accept(AndExpression.java:100) > at > org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOpti > mizer.java:117) > at > org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105) > at > org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.ja > va:324) > at > org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:132) > at > org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl > an(PhoenixStatement.java:296) > at > org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePl > an(PhoenixStatement.java:284) > at > org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:208) > at > org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:204) > at > org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.j > ava:54) > at > org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java: > 204) > at > org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:967) > at sqlline.SqlLine$Commands.execute(SqlLine.java:3673) > at sqlline.SqlLine$Commands.sql(SqlLine.java:3584) > at sqlline.SqlLine.dispatch(SqlLine.java:821) > at sqlline.SqlLine.begin(SqlLine.java:699) > at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441) > at sqlline.SqlLine.main(SqlLine.java:424) -- This message was sent by Atlassian JIRA (v6.3.4#6332)