[
https://issues.apache.org/jira/browse/CASSANDRA-909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Ellis updated CASSANDRA-909:
-------------------------------------
Summary: unclosed brackets and string literals cause cli exceptions (was:
Multiple Crashes in CLI)
> unclosed brackets and string literals cause cli exceptions
> ----------------------------------------------------------
>
> Key: CASSANDRA-909
> URL: https://issues.apache.org/jira/browse/CASSANDRA-909
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 0.6
> Reporter: gabriele renzi
> Priority: Minor
>
> As of r925353 (but also in 0.5.1) it seems that the AST is not complete
> For example in 0.5.1
> cassandra> get Messages_test.Messages['twitter.com:10731838401
> line 1:51 mismatched character '<EOF>' expecting '''
> line 0:-1 mismatched input '<EOF>' expecting StringLiteral
> Exception in thread "main" java.lang.AssertionError
> at org.apache.cassandra.cli.CliClient.executeGet(CliClient.java:279)
> at
> org.apache.cassandra.cli.CliClient.executeCLIStmt(CliClient.java:57)
> at org.apache.cassandra.cli.CliMain.processCLIStmt(CliMain.java:131)
> at org.apache.cassandra.cli.CliMain.main(CliMain.java:172)
> A little debug added in trunk shows that ANTLR is emitting "mismatched token"
> nodes:
> cassandra> get Messages_test.Conversations[f
> line 1:32 mismatched input 'f' expecting StringLiteral
> (NODE_THRIFT_GET <mismatched token: [...@-1,0:0='<no text>',<-1>,0:-1],
> resync=Messages_test.Conversations[f>)
> 0
> Exception in thread "main" java.lang.AssertionError
> at org.apache.cassandra.cli.CliClient.executeGet(CliClient.java:312)
> at org.apache.cassandra.cli.CliClient.executeCLIStmt(CliClient.java:60)
> at org.apache.cassandra.cli.CliMain.processCLIStmt(CliMain.java:213)
> at org.apache.cassandra.cli.CliMain.main(CliMain.java:270)
> thus the assertion _is_ correct in complaining that it did not get a
> NODE_COLUMN_ACCESS but it should probably be handled instead of crashing.
> but sadly, I can't really understand where this happens, as I'm no expert of
> antlr, but I wonder if it could be just instructed to fail fast without
> reaching the ast walking?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.