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 1D4E3186BF for ; Tue, 16 Feb 2016 18:07:21 +0000 (UTC) Received: (qmail 67917 invoked by uid 500); 16 Feb 2016 18:07:21 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 67857 invoked by uid 500); 16 Feb 2016 18:07:21 -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 67846 invoked by uid 99); 16 Feb 2016 18:07:20 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2016 18:07:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 822C2C0D48 for ; Tue, 16 Feb 2016 18:07:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.349 X-Spam-Level: X-Spam-Status: No, score=-4.349 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.329] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id pg-dzJw4G4Sc for ; Tue, 16 Feb 2016 18:07:19 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id D94915FB15 for ; Tue, 16 Feb 2016 18:07:18 +0000 (UTC) Received: (qmail 67494 invoked by uid 99); 16 Feb 2016 18:07:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2016 18:07:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 292F52C14F2 for ; Tue, 16 Feb 2016 18:07:18 +0000 (UTC) Date: Tue, 16 Feb 2016 18:07:18 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (PHOENIX-2631) Exception when parsing boundary timestamp values 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/PHOENIX-2631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor reassigned PHOENIX-2631: ------------------------------------- Assignee: James Taylor > Exception when parsing boundary timestamp values > ------------------------------------------------ > > Key: PHOENIX-2631 > URL: https://issues.apache.org/jira/browse/PHOENIX-2631 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.6.0, 4.7.0 > Reporter: Nick Dimiduk > Assignee: James Taylor > Fix For: 4.7.0 > > Attachments: 2631-workaround.patch > > > I get a stack trace when querying or explaining a query that contains a timestamp value on the boundary of the day. > {noformat} > > CREATE TABLE FOO( > a VARCHAR NOT NULL, > b TIMESTAMP NOT NULL, > c VARCHAR, > CONSTRAINT pk PRIMARY KEY (a, b DESC ROW_TIMESTAMP, c) > ) IMMUTABLE_ROWS=true, > SALT_BUCKETS=20 > ; > No rows affected (1.532 seconds) > > explain select * from foo where a = 'a' and b >= timestamp '2016-01-28 00:00:00' and b < timestamp '2016-01-29 00:00:00'; > Error: ERROR 201 (22000): Illegal data. (state=22000,code=201) > java.sql.SQLException: ERROR 201 (22000): Illegal data. > at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:419) > at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145) > at org.apache.phoenix.schema.types.PDataType.newIllegalDataException(PDataType.java:286) > at org.apache.phoenix.schema.types.PUnsignedInt$UnsignedIntCodec.decodeInt(PUnsignedInt.java:165) > at org.apache.phoenix.schema.types.PTimestamp.toObject(PTimestamp.java:108) > at org.apache.phoenix.schema.types.PTimestamp.toObject(PTimestamp.java:32) > at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:968) > at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:972) > at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:1001) > at org.apache.phoenix.schema.types.PDataType.toStringLiteral(PDataType.java:1074) > at org.apache.phoenix.schema.types.PDataType.toStringLiteral(PDataType.java:1070) > at org.apache.phoenix.iterate.ExplainTable.appendPKColumnValue(ExplainTable.java:194) > at org.apache.phoenix.iterate.ExplainTable.appendScanRow(ExplainTable.java:270) > at org.apache.phoenix.iterate.ExplainTable.appendKeyRanges(ExplainTable.java:282) > at org.apache.phoenix.iterate.ExplainTable.explain(ExplainTable.java:125) > at org.apache.phoenix.iterate.BaseResultIterators.explain(BaseResultIterators.java:830) > at org.apache.phoenix.iterate.RoundRobinResultIterator.explain(RoundRobinResultIterator.java:153) > at org.apache.phoenix.execute.BaseQueryPlan.getPlanSteps(BaseQueryPlan.java:468) > at org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:322) > at org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:193) > at org.apache.phoenix.execute.BaseQueryPlan.getExplainPlan(BaseQueryPlan.java:463) > at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:459) > at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:438) > at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:266) > at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:261) > at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) > at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:260) > at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1349) > at sqlline.Commands.execute(Commands.java:822) > at sqlline.Commands.sql(Commands.java:732) > at sqlline.SqlLine.dispatch(SqlLine.java:808) > at sqlline.SqlLine.begin(SqlLine.java:681) > at sqlline.SqlLine.start(SqlLine.java:398) > at sqlline.SqlLine.main(SqlLine.java:292) > {noformat} > In this case, down in {{PUnsignedInt$UnsignedIntCodec#decodeInt}}, I see the parsed {{v}} is {{-1}}, and the if clause throws. -- This message was sent by Atlassian JIRA (v6.3.4#6332)