[
https://issues.apache.org/jira/browse/CASSANDRA-7111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14058013#comment-14058013
]
Tyler Hobbs commented on CASSANDRA-7111:
----------------------------------------
I should have noticed these in the first review, but a couple of additional
changes:
* Since ErrorCollector is the only implementation of ErrorListener, I would
prefer to just leave out the ErrorListener interface (unless you have plans to
use it soon)
* For mock test classes like MockToken, you can leave out things like {{/\*\*
\{\@inheritDoc\} \*/}} javadocs
There's also still a bit of trailing whitespace in ErrorCollector and Cql.g in
the patch, and the unit tests need to be updated for the whitespace change.
> Include snippet of CQL query near error in SyntaxError messages
> ---------------------------------------------------------------
>
> Key: CASSANDRA-7111
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7111
> Project: Cassandra
> Issue Type: Improvement
> Components: API, Tools
> Reporter: Tyler Hobbs
> Assignee: Benjamin Lerer
> Labels: cql
> Fix For: 2.1.1
>
> Attachments: CASSANDRA-7111-V2.txt, CASSANDRA-7111.txt
>
>
> When a SyntaxError is returned, including a snippet of the query close to the
> error would make a lot of error messages easier to understand. For example,
> if you did this with the python driver:
> {code}
> session.execute(SELECT * FROM users WHERE username='%s', ['Joe Smith'])
> {code}
> you would wind up with an extra set of single quotes (the driver
> automatically escapes and quotes input). If a snippet like {{...WHERE
> username=''Joe Smith''}} were included in the error message, this would be
> pretty easy to spot.
--
This message was sent by Atlassian JIRA
(v6.2#6252)