cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6227) Add 'WHERE 0=1', 'WHERE false', in SQL-compatible manner
Date Fri, 01 Nov 2013 11:46:17 GMT


Sylvain Lebresne commented on CASSANDRA-6227:

I don't think that kind of feature makes sense for CQL because:
# it doesn't give you any additional query power, it's not useful in itself.
# it does not fit CQL very well: contrarily to SQL, {{WHERE}} conditions in CQL always have
a column name on the left end side of conditions (or a function of the column name in the
case of {{WHERE token(c) = ...}}). This regularity is a good thing in that it makes things
simpler. Breaking such regularity is doable but we'd need a good reason, one that makes sense
for CQL.
# it's not trivial to implement given the current code base. The main reason being the fact
that regularity described above is used to simplify the code in more than one place, so that
support what this ticket suggest properly would require a substantial refactoring.

Overall, this clearly don't seem like a good fit to CQL and we've been pretty clear that we
do not want to add things to CQL *only* because SQL support it (added features have to make
sense for CQL).

> Add 'WHERE 0=1', 'WHERE false', in SQL-compatible manner
> --------------------------------------------------------
>                 Key: CASSANDRA-6227
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Yii2 PHP framework database abstarction level
>            Reporter: Sergey Nagaytsev
>              Labels: cql3
> Then DBAL thinks query result must be empty, it's deep inner method returns something
like '0=1', 'FALSE' etc. for inclusion into WHERE condition, to make result set empty.
> Nothing of this is recognised by Cassandra - instead, error is returned.
> Please, implement 'false', 'null', constant comparison etc. as valid parts of WHERE with

This message was sent by Atlassian JIRA

View raw message