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 134D31840A for ; Tue, 15 Sep 2015 13:40:58 +0000 (UTC) Received: (qmail 58830 invoked by uid 500); 15 Sep 2015 13:40:47 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 58760 invoked by uid 500); 15 Sep 2015 13:40:47 -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 58688 invoked by uid 99); 15 Sep 2015 13:40:47 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2015 13:40:47 +0000 Date: Tue, 15 Sep 2015 13:40:47 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-10216) Remove target type from internal index metadata 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-10216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14745462#comment-14745462 ] Sylvain Lebresne commented on CASSANDRA-10216: ---------------------------------------------- I don't think {{!column.toString().equals(column.toString().toLowerCase(Locale.US));}} works all the time as a test to know if the name should be quoted, because we actually allow identifiers with spaces in them if they are quoted (so a name could be all lowercase, but still require quoting because it has spaces or some other weird character). The proper test is probably to check if the name matches the grammar for non-quoted identifer, i.e. {{IDENT : LETTER (LETTER | DIGIT | '_')*}}. Similarly, {{columnName.replaceAll("\\\"", "");}} is a tad dangerous because you can have quotes inside a column identifier if you escape it by doubling it (so {{"foo""bar"}} is the identifier {{foo"bar}}). I guess just checking if the first character is a quote, and remove that and the last character would be good enough however. > Remove target type from internal index metadata > ----------------------------------------------- > > Key: CASSANDRA-10216 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10216 > Project: Cassandra > Issue Type: Improvement > Reporter: Sam Tunnicliffe > Assignee: Sam Tunnicliffe > Labels: client-impacting > Fix For: 3.0.0 rc1 > > > As part of CASSANDRA-6716 & in anticipation of CASSANDRA-10124, a distinction was introduced between secondary indexes which target a fixed set of 1 or more columns in the base data, and those which are agnostic to the structure of the underlying rows. This distinction is manifested in {{IndexMetadata.targetType}} and {{system_schema.indexes}}, in the {{target_type}} column. It could be argued that this distinction complicates the codebase without providing any tangible benefit, given that the target type is not actually used anywhere. > It's only the impact on {{system_schema.indexes}} that makes puts this on the critical path for 3.0, any code changes are just implementation details. -- This message was sent by Atlassian JIRA (v6.3.4#6332)