[jira] [Updated] (CASSANDRA-2737) CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)

2013-06-20 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-2737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michał Michalski updated CASSANDRA-2737:


Attachment: (was: 2737-v2.txt)

 CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)
 ---

 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
Assignee: Michał Michalski
Priority: Trivial
  Labels: cql, cql3
 Fix For: 2.1

 Attachments: 2737-concept-v1.txt, 2737-poor-mans-testcase.cql




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-2737) CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)

2013-06-20 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-2737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michał Michalski updated CASSANDRA-2737:


Attachment: 2737-v2.txt

Replacing old v2 with v2 rebased onto current trunk.

 CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)
 ---

 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
Assignee: Michał Michalski
Priority: Trivial
  Labels: cql, cql3
 Fix For: 2.1

 Attachments: 2737-concept-v1.txt, 2737-poor-mans-testcase.cql, 
 2737-v2.txt




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-2737) CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)

2013-05-31 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-2737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-2737:
--

Reviewer: slebresne

 CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)
 ---

 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
Assignee: Michał Michalski
Priority: Trivial
  Labels: cql, cql3
 Fix For: 2.1

 Attachments: 2737-concept-v1.txt, 2737-poor-mans-testcase.cql, 
 2737-v2.txt




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-2737) CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)

2013-05-29 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-2737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michał Michalski updated CASSANDRA-2737:


Attachment: 2737-poor-mans-testcase.cql
2737-v2.txt

Attaching patch + poor man's testcase (set of CQL commands) :-)

 CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)
 ---

 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.1

 Attachments: 2737-concept-v1.txt, 2737-poor-mans-testcase.cql, 
 2737-v2.txt




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-2737) CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)

2013-05-28 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-2737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-2737:
--

Fix Version/s: (was: 2.0)
   2.1

 CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)
 ---

 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.1

 Attachments: 2737-concept-v1.txt




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-2737) CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)

2013-04-13 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-2737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michał Michalski updated CASSANDRA-2737:


Attachment: 2737-concept-v1.txt

Here's my idea of implementing this feature (see attached file for details):

# Move the validate(), checkAccess() and execute() method calls from 
QueryProcessor into separate wrapping method (I called it 
validateCheckAccessAndExecute for now ;-) ) defined in CQLStatement interface. 
All the classes implementing this interface will just execute these three 
methods one by one, like QueryProcessor did (a bit non-DRY). By doing so  we 
can handle the exceptions thrown by these methods internally (in specific 
Statement classes), without adding any logic to QueryProcessor.
# Define two exceptions inheriting from InvalidRequestException so we can 
distinguish when we can (if IF [NOT] EXISTS was used in the query) just ignore 
a problem that occured - let's call them: MissingObject and ObjectExists. They 
are - obviously - thrown when we try to create existing object or drop the one 
that does not exist.
# Define two subclasses of SchemaAlteringStatement: DropStatement and 
CreateStatement - they require one additional parameter in constructor  
(indicating if IF [NOT] EXISTS statement was used) and override the 
validateCheckAccessAndExecute() method to check if any of the exceptions 
mentioned above was thrown and - if allowed - handle it by returning null 
(converted to Void message in QueryProcessor) or re-throw the exception.

I've implemented this solution for DROP INDEX statement as an example - see 
attachment. If you're OK with this implementation, I'll do the rest. 

For now there are no changes in cqlsh (so autocompletion does not work), but of 
course it's also in the scope of this task.

*Important* QueryProcessor code, obviously, is not going to look like this - it 
will call only validateCheckAccessAndExecute() method, like it happens for 
DropIndexStatement now, without any if or so.


 CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)
 ---

 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 administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-2737) CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)

2013-01-25 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-2737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-2737:
--

Issue Type: New Feature  (was: Improvement)

 CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)
 ---

 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



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-2737) CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)

2013-01-25 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-2737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-2737:
--

Fix Version/s: 2.0

 CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)
 ---

 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




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira