[
https://issues.apache.org/jira/browse/CASSANDRA-4184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13261772#comment-13261772
]
Sylvain Lebresne commented on CASSANDRA-4184:
---------------------------------------------
bq. Is the main point of ident is to say "this can be a column name?"
Yes.
bq. I still do like the idea of saying "uuids are a native data type and don't
need quoting, like ints or doubles" though.
Sure, I'm not proposing to remove that. They are "uuid constants" and are
special in the grammar. Currently a value is <number> | <string> | <uuid> |
<identifier>. I'm proposing to remove <identifier>. Because, if we allow it and
have a table with columns {{foo}} and {{bar}}, then the behavior of {{SELECT *
WHERE foo=bar}} is *very* unintuitive, as it does not return the records who
have the same value for {{foo}} and {{bar}}, but rather {{bar}} is silently
accepted as an equivalent for {{'bar'}}.
> Make identifier and value grammar for CQL3 stricter
> ---------------------------------------------------
>
> Key: CASSANDRA-4184
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4184
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.1.0
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Labels: cql3
> Fix For: 1.1.1
>
> Attachments:
> 0001-Disallow-integer-and-uuid-constants-as-identifier.txt,
> 0002-Disallow-identifier-as-value.txt
>
>
> The current grammar for CQL3 allows:
> # uuid and integer constants as identifiers
> # identifier as value (aka term in the grammar)
> I think both of those should be removed.
> For 1, mostly because this feels useless and slightly complicates the grammar
> which is annoying for the documentation of CQL3 for instance (note that this
> doesn't mean forbidding integer or uuid as identifier, but means they have to
> be double-quoted when used as such).
> For 2, I think that allowing identifier as value is actually misleading,
> typically if you write things like {{SELECT foo WHERE foo=foo}}. It suggests
> we support JOIN when we do not.
> Also, if both are done, then one will always be able to distinguish between
> identifier and value even without any context, which is a nice property.
--
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