You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org> on 2011/11/14 22:30:52 UTC

[jira] [Commented] (CASSANDRA-3493) cqlsh complains when you try to do UPDATE with counter columns

    [ https://issues.apache.org/jira/browse/CASSANDRA-3493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149942#comment-13149942 ] 

Jonathan Ellis commented on CASSANDRA-3493:
-------------------------------------------

+1
                
> cqlsh complains when you try to do UPDATE with counter columns
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-3493
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3493
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>         Attachments: 3493.patch.txt
>
>
> trying to do a counter column UPDATE in cqlsh causes an "Invalid syntax" error:
> {noformat}
> cqlsh:foo> update brongo SET boo = boo+1 where key='hi';
> Invalid syntax at line 1, char 28
>   update brongo SET boo = boo+1 where key='hi';
>                              ^
> {noformat}
> This is cause cqlsh's lexer doesn't know that + and - are valid operators in CQL. Don't worry, I'm not trying to make cqlsh be able to parse all CQL with exactness- it tries, in order to provide the best tab completion, but when it fails to parse it can still pass on CQL text to the server. This case is different because it's the lexer that can't understand the operators, before we even get to the parser. We do need a working and correct lexer, along with at least minimal parsing capability, in order to reliably split up statements, tell when the user is changing the keyspace, or SELECTing on a columnfamily with ASSUMEd types.
> Also, the parser should be tweaked in a manner similar to CASSANDRA-3418.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira