Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 691D318E93 for ; Thu, 10 Mar 2016 20:48:41 +0000 (UTC) Received: (qmail 20467 invoked by uid 500); 10 Mar 2016 20:48:41 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 20413 invoked by uid 500); 10 Mar 2016 20:48:41 -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 20185 invoked by uid 99); 10 Mar 2016 20:48:41 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Mar 2016 20:48:41 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 12E442C1F68 for ; Thu, 10 Mar 2016 20:48:41 +0000 (UTC) Date: Thu, 10 Mar 2016 20:48:41 +0000 (UTC) From: "Alex Petrov (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes 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/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15189913#comment-15189913 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/10/16 8:48 PM: ------------------------------------------------------------------ I've attached a very rough version, mostly to understand if it generally goes the right direction. I've tried to avoid adding {{useFiltering}} to the {{PrimaryKeyRestrictionSet}}, although that'd require exposing {{Restrictions}} iterator since the validations are different for queries that allow filtering. So I've left it "as-is" for now. Other than that - I've tried to cover several types of queries in tests. I'm still not sure if the handling of multi-columns is correct, since their {{SliceRestriction::addRowFilterTo}} is not permitted at the moment. {{CONAINS}} works as expected, too. I haven't yet ran / tried dtests, will do it hopefully tomorrow. was (Author: ifesdjeen): Here's a very rough version, mostly to understand if it generally goes the right direction. I've tried to avoid adding {{useFiltering}} to the {{PrimaryKeyRestrictionSet}}, although that'd require exposing {{Restrictions}} iterator since the validations are different for queries that allow filtering. So I've left it "as-is" for now. Other than that - I've tried to cover several types of queries in tests. I'm still not sure if the handling of multi-columns is correct, since their {{SliceRestriction::addRowFilterTo}} is not permitted at the moment. {{CONAINS}} works as expected, too. I haven't yet ran / tried dtests, will do it hopefully tomorrow. > Allow filtering on clustering columns for queries without secondary indexes > --------------------------------------------------------------------------- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Reporter: Benjamin Lerer > Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > Attachments: 0001-Allow-filtering-on-clustering-columns-for-queries-wi.patch > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)