From dev-return-51460-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Thu May 3 19:18:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A429F180625 for ; Thu, 3 May 2018 19:18:05 +0200 (CEST) Received: (qmail 95349 invoked by uid 500); 3 May 2018 17:18:04 -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 95338 invoked by uid 99); 3 May 2018 17:18: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; Thu, 03 May 2018 17:18: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 169501A1D01 for ; Thu, 3 May 2018 17:18:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -101.511 X-Spam-Level: X-Spam-Status: No, score=-101.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id KXBnUDIdSnIe for ; Thu, 3 May 2018 17:18:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9041E5FB46 for ; Thu, 3 May 2018 17:18: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 39F52E12D8 for ; Thu, 3 May 2018 17:18: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 73F0A212A6 for ; Thu, 3 May 2018 17:18:00 +0000 (UTC) Date: Thu, 3 May 2018 17:18:00 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (PHOENIX-2272) Unable to run count(1), count(*) or select explicit columns queries on a table with a secondary index 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-2272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor resolved PHOENIX-2272. ----------------------------------- Resolution: Cannot Reproduce > Unable to run count(1), count(*) or select explicit columns queries on a table with a secondary index > ----------------------------------------------------------------------------------------------------- > > Key: PHOENIX-2272 > URL: https://issues.apache.org/jira/browse/PHOENIX-2272 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.5.1 > Environment: HBase1.0, CDH5.4.5 > Reporter: Kumar Palaniappan > Priority: Major > Labels: verify > Fix For: 4.14.0 > > > Unable to run select count(1) from table_name or select count(*) from table_name or select "id1" from table_name when there is a secondary index on a column in that table. It returns 0 records. > But select * from table_name works. > select count(*) from r3.ads; > +------------------------------------------+ > | COUNT(1) | > +------------------------------------------+ > | 0 | > +------------------------------------------+ > 1 row selected (0.104 seconds) > 0: jdbc:phoenix:labs-**********> select count(1) from r3.ads; > +------------------------------------------+ > | COUNT(1) | > +------------------------------------------+ > | 0 | > +------------------------------------------+ > select count(distinct("cstId")) from r3.ads; > +------------------------------------------+ > | DISTINCT_COUNT("cstId") | > +------------------------------------------+ > | 0 | > +------------------------------------------+ > 1 row selected (0.114 seconds) > jdbc:phoenix:labs-**********> select /*+ NO_INDEX */count(1) from r3.ads; > +------------------------------------------+ > | COUNT(1) | > +------------------------------------------+ > | 1617732 | > +------------------------------------------+ > 1 row selected (2.007 seconds) > If I force with a hint NO_INDEX works. > Is that related to somewhat this one? https://issues.apache.org/jira/browse/PHOENIX-1203 -- This message was sent by Atlassian JIRA (v7.6.3#76005)