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 B626B103B9 for ; Mon, 29 Apr 2013 07:48:22 +0000 (UTC) Received: (qmail 84251 invoked by uid 500); 29 Apr 2013 07:48:22 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 83982 invoked by uid 500); 29 Apr 2013 07:48:21 -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 83892 invoked by uid 99); 29 Apr 2013 07:48:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Apr 2013 07:48:19 +0000 Date: Mon, 29 Apr 2013 07:48:19 +0000 (UTC) From: =?utf-8?Q?Micha=C5=82_Michalski_=28JIRA=29?= To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-2737) CQL: support IF EXISTS extension for DROP commands (table, keyspace, index) 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-2737?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 13644325#comment-13644325 ]=20 Micha=C5=82 Michalski commented on CASSANDRA-2737: --------------------------------------------- Thanks for reply, Sylvain! I definitely agree that my solution has some overhead and your is much simp= ler, but one of the things I aimed for was to distinguish the "critical" ex= ceptions from the ones that can be handled by such "IF (NOT) EXISTS" extens= ions, so - in the end - it could be possible to let user know what really h= appened and, maybe, display some descriptive NOTICE message instead of disp= laying nothing (I was a bit "inspired" in how it's reported in PostgreSQL i= n similar case). However, if you say it's not necessary, I'm fine with it := -)=20 Additionally, in most of the cases validation checking if KS/CF/Index exist= s (or not) happens outside *Statement classes (for example for CFs it's don= e in MigrationManager.announceColumnFamilyDrop()) and I didn't like the ide= a of passing additional parameter and handling it there - I preferred this = decision (if exception should be thrown or not) to be done by *Statement cl= ass itself, basing on what was returned/thrown by MigrationManager.=20 One thing I missed when coding was the fact that for KS/CF, when reporting = existing / inexistent KS/CF, ConfigurationException is thrown (index-relat= ed code throws InvalidRequestException, which looks like a little inconsist= ency to me, by the way), so I could have reused it, instead of creating new= ones. Anyway, I see your point :-) Tomorrow I'm leaving for three weeks and when = I'm back I'll reimplement it taking your suggestions into account :-) =20 > CQL: support IF EXISTS extension for DROP commands (table, keyspace, inde= x) > -------------------------------------------------------------------------= -- > > Key: CASSANDRA-2737 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2737 > Project: Cassandra > Issue Type: New Feature > Affects Versions: 0.8.0 > Reporter: Cathy Daw > Priority: Trivial > Labels: cql > Fix For: 2.0 > > Attachments: 2737-concept-v1.txt > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira