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 8ACEE18BD1 for ; Tue, 12 Jan 2016 13:45:40 +0000 (UTC) Received: (qmail 96744 invoked by uid 500); 12 Jan 2016 13:45:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 96662 invoked by uid 500); 12 Jan 2016 13:45:40 -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 96622 invoked by uid 99); 12 Jan 2016 13:45:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jan 2016 13:45:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0A2632C1F5C for ; Tue, 12 Jan 2016 13:45:40 +0000 (UTC) Date: Tue, 12 Jan 2016 13:45:40 +0000 (UTC) From: =?utf-8?Q?Andr=C3=A9s_de_la_Pe=C3=B1a_=28JIRA=29?= To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-10924) Pass base table's metadata to Index.validateOptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-10924?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15093890#comment-15093890 ]=20 Andr=C3=A9s de la Pe=C3=B1a commented on CASSANDRA-10924: ----------------------------------------------- I'm attaching a second version of the patch with the suggested changes. The= re are two overloaded methods to validate the index options, the original a= nd a new one including the base table's metadata in its signature. {IndexMe= tadata} tries to invoke the new method and, if there is no such method, it = tries to invoke the old one. I hope you find it OK. > Pass base table's metadata to Index.validateOptions > --------------------------------------------------- > > Key: CASSANDRA-10924 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1092= 4 > Project: Cassandra > Issue Type: Improvement > Components: CQL, Local Write-Read Paths > Reporter: Andr=C3=A9s de la Pe=C3=B1a > Assignee: Andr=C3=A9s de la Pe=C3=B1a > Priority: Minor > Labels: 2i, index, validation > Fix For: 3.0.x, 3.x > > Attachments: CASSANDRA-10924-v0.diff, CASSANDRA-10924-v1.diff > > > Some custom index implementations require the base table's metadata to va= lidate their creation options. For example, the options of these implementa= tions can contain information about which base table's columns are going to= be indexed and how, so the implementation needs to know the existence and = the type of the columns to be indexed to properly validate. > The attached patch proposes to add base table's {{CFMetaData}} to Index' = optional static method to validate the custom index options: > {{public static Map validateOptions(CFMetaData cfm, Map options);}} -- This message was sent by Atlassian JIRA (v6.3.4#6332)