Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 377FA200CCC for ; Fri, 21 Jul 2017 15:37:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 361EE16D29E; Fri, 21 Jul 2017 13:37:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7D23B16D29B for ; Fri, 21 Jul 2017 15:37:08 +0200 (CEST) Received: (qmail 12945 invoked by uid 500); 21 Jul 2017 13:37:02 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 12577 invoked by uid 99); 21 Jul 2017 13:37:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2017 13:37:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 0731B1A1C86 for ; Fri, 21 Jul 2017 13:37:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id W2TQ9wbAjIYA for ; Fri, 21 Jul 2017 13:37:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id EB7355FB43 for ; Fri, 21 Jul 2017 13:37:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4A78AE0045 for ; Fri, 21 Jul 2017 13:37:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0A18221E92 for ; Fri, 21 Jul 2017 13:37:00 +0000 (UTC) Date: Fri, 21 Jul 2017 13:37:00 +0000 (UTC) From: "Anastasios Kichidis (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 21 Jul 2017 13:37:09 -0000 [ 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>" , although the INSERT statement is correct (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple, > 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