cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anastasios Kichidis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
Date Fri, 21 Jul 2017 13:37:00 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16096262#comment-16096262
] 

Anastasios Kichidis commented on CASSANDRA-13717:
-------------------------------------------------

After some quick debugging I saw that this error is thrown because of the tuple validation
on Tuples.java:

{noformat}
        if (!(receiver.type instanceof TupleType))
            throw invalidRequest("Invalid tuple type literal for %s of type %s", receiver.name,
receiver.type.asCQL3Type());
{noformat}

When the default ordering on tuple is DESC, the *receiver.type* is instance of type *ReversedType*
and not *TupleType* . However, I don't have the expertise to know the cause of this.


> INSERT statement fails when Tuple type is used as clustering column with default DESC
order
> -------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-13717
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13717
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Cassandra 3.11
>            Reporter: Anastasios Kichidis
>         Attachments: example_queries.cql
>
>
> When a column family is created and a Tuple is used on clustering column with default
clustering order DESC, then the INSERT statement fails. 
> For example, the following table will make the INSERT statement fail with error message
"Invalid tuple type literal for tdemo of type frozen<tuple<timestamp, text>>"
, although the INSERT statement is correct (works as expected when the default order is ASC)
> {noformat}
> create table test_table (
> 	id int,
> 	tdemo tuple<timestamp, varchar>,
> 	primary key (id, tdemo)
> ) with clustering order by (tdemo desc);
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message