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 C7463200D20 for ; Tue, 3 Oct 2017 02:36:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C5738160BCB; Tue, 3 Oct 2017 00:36:04 +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 16AF71609EF for ; Tue, 3 Oct 2017 02:36:03 +0200 (CEST) Received: (qmail 26330 invoked by uid 500); 3 Oct 2017 00:36:03 -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 26318 invoked by uid 99); 3 Oct 2017 00:36:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Oct 2017 00:36:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 70F7218130B for ; Tue, 3 Oct 2017 00:36:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ihIl3fhuWMtJ for ; Tue, 3 Oct 2017 00:36:01 +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 76E345F6D3 for ; Tue, 3 Oct 2017 00:36:01 +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 0C0D8E00DF for ; Tue, 3 Oct 2017 00:36: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 B8F69242BF for ; Tue, 3 Oct 2017 00:36:00 +0000 (UTC) Date: Tue, 3 Oct 2017 00:36:00 +0000 (UTC) From: "Samarth Jain (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4265) NPE when hinting index on table with ROW_TIMESTAMP MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 Oct 2017 00:36:05 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-4265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16189120#comment-16189120 ] Samarth Jain commented on PHOENIX-4265: --------------------------------------- Almost there. I found one more issue where we are not computing the timerange correctly when table is salted. Will upload a patch shortly. > NPE when hinting index on table with ROW_TIMESTAMP > -------------------------------------------------- > > Key: PHOENIX-4265 > URL: https://issues.apache.org/jira/browse/PHOENIX-4265 > Project: Phoenix > Issue Type: Improvement > Reporter: James Taylor > > See email discussion here: https://lists.apache.org/thread.html/d87a508e5b4e2fc6b7110d861b71209d2385adaecd0152b790ee00e9@%3Cuser.phoenix.apache.org%3E > I'm not able to repro with this unit test: > {code} > @Test > public void testIndexHintOnTableWithRowTimestamp() throws Exception { > Connection conn = DriverManager.getConnection(getUrl()); > try { > conn.createStatement().execute("CREATE IMMUTABLE TABLE t1 (k1 TIMESTAMP not null, k2 bigint not null, v bigint, constraint pk primary key (k1 row_timestamp,k2 ))"); > conn.createStatement().execute("CREATE INDEX idx ON t1 (v)"); > conn.createStatement().execute("SELECT /*+ INDEX(T1 IDX) */ K1,K2,V FROM t1 WHERE v = 5"); > } finally { > conn.close(); > } > } > {code} > FYI, due to the inability to keep an index in sync when there's a ROW_TIMESTAMP column, as of 4.12 we're disallowing the creation of mutable secondary indexes when a table has a ROW_TIMESTAMP column. Usually, since the timestamp is part of the row key, the data table can be declared IMMUTABLE. In this case, the index would still be allowed. -- This message was sent by Atlassian JIRA (v6.4.14#64029)