cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michaël Figuière (JIRA) <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-6075) The token function should allow column identifiers in the correct order only
Date Sat, 21 Sep 2013 02:08:51 GMT
Michaël Figuière created CASSANDRA-6075:
-------------------------------------------

             Summary: The token function should allow column identifiers in the correct order
only
                 Key: CASSANDRA-6075
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6075
             Project: Cassandra
          Issue Type: Bug
         Environment: Cassandra 1.2.9
            Reporter: Michaël Figuière
            Priority: Minor


Given the following table:
{code}
CREATE TABLE t1 (a int, b text, PRIMARY KEY ((a, b)));
{code}

The following request returns an error in cqlsh as literal arguments order is incorrect:
{code}
SELECT * FROM t1 WHERE token(a, b) > token('s', 1);
Bad Request: Type error: 's' cannot be passed as argument 0 of function token of type int
{code}

But surprisingly if we provide the column identifier arguments in the wrong order no error
is returned:
{code}
SELECT * FROM t1 WHERE token(a, b) > token(1, 'a'); // correct order is valid
SELECT * FROM t1 WHERE token(b, a) > token(1, 'a'); // incorrect order is valid as well
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message