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 43360200C5D for ; Fri, 7 Apr 2017 09:41:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 41CF8160B97; Fri, 7 Apr 2017 07:41:46 +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 8864F160B93 for ; Fri, 7 Apr 2017 09:41:45 +0200 (CEST) Received: (qmail 30692 invoked by uid 500); 7 Apr 2017 07:41:44 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 30681 invoked by uid 99); 7 Apr 2017 07:41:44 -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; Fri, 07 Apr 2017 07:41:44 +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 2C8221A04EB for ; Fri, 7 Apr 2017 07:41:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, 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 rSfe7ExgcZwH for ; Fri, 7 Apr 2017 07:41:43 +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 828915F1E9 for ; Fri, 7 Apr 2017 07:41:42 +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 CEA3FE0629 for ; Fri, 7 Apr 2017 07:41:41 +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 864E924066 for ; Fri, 7 Apr 2017 07:41:41 +0000 (UTC) Date: Fri, 7 Apr 2017 07:41:41 +0000 (UTC) From: "Benjamin Lerer (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CASSANDRA-13147) Secondary index query on partition key columns might not return all the rows. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 07 Apr 2017 07:41:46 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13147?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15960413#comment-15960413 ]=20 Benjamin Lerer edited comment on CASSANDRA-13147 at 4/7/17 7:41 AM: -------------------------------------------------------------------- {quote} I see, thanks for the comments. I have just updated the 2.1 and 2.2 patches= to use {{hasNoRegularColumnsRestriction()}}/{{!hasRegularColumnsRestrictio= n()}} (I guess you meant this instead of {{hasClusteringColumnsRestriction(= )}}). {quote} Yes, sorry for the wrong copy past. {quote}Do you think we should add the aforementioned {{testIndexOnRegularCo= lumnWithPartitionWithoutRows}}?{quote} This test already exist in the 3.x branches. I will add it has part of the = commit in the 2.1 and 2.2 branches. was (Author: blerer): {quote} I see, thanks for the comments. I have just updated the 2.1 and 2.2 patches= to use {{hasNoRegularColumnsRestriction()}}/{{!hasRegularColumnsRestrictio= n()}} (I guess you meant this instead of {{hasClusteringColumnsRestriction(= )}}). {quote} Yes, sorry for the wrong copy past. {quote}Do you think we should add the aforementioned {{testIndexOnRegularCo= lumnWithPartitionWithoutRows}}?{quote} This test is already in the 3.X versions and will not bring much here due t= o the problem I mentioned previously.=20 > Secondary index query on partition key columns might not return all the r= ows. > -------------------------------------------------------------------------= ---- > > Key: CASSANDRA-13147 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1314= 7 > Project: Cassandra > Issue Type: Bug > Reporter: Benjamin Lerer > Assignee: Andr=C3=A9s de la Pe=C3=B1a > Fix For: 2.1.x, 2.2.x, 3.0.x, 3.11.x, 4.x > > > A secondary index query on a partition key column will, apparently, not r= eturn the empty partitions with static data. > The following unit test can be used to reproduce the problem. > {code} > public void testIndexOnPartitionKeyWithStaticColumnAndNoRows() throws= Throwable > { > createTable("CREATE TABLE %s (pk1 int, pk2 int, c int, s int stat= ic, v int, PRIMARY KEY((pk1, pk2), c))"); > createIndex("CREATE INDEX ON %s (pk2)"); > execute("INSERT INTO %s (pk1, pk2, c, s, v) VALUES (?, ?, ?, ?, ?= )", 1, 1, 1, 9, 1); > execute("INSERT INTO %s (pk1, pk2, c, s, v) VALUES (?, ?, ?, ?, ?= )", 1, 1, 2, 9, 2); > execute("INSERT INTO %s (pk1, pk2, s) VALUES (?, ?, ?)", 2, 1, 9)= ; > execute("INSERT INTO %s (pk1, pk2, c, s, v) VALUES (?, ?, ?, ?, ?= )", 3, 1, 1, 9, 1); > assertRows(execute("SELECT * FROM %s WHERE pk2 =3D ?", 1), > row(1, 1, 1, 9, 1), > row(1, 1, 2, 9, 2), > row(2, 1, null, 9, null), <-- is not returned > row(3, 1, 1, 9, 1)); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)