Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF2D1116AA for ; Mon, 19 May 2014 14:33:38 +0000 (UTC) Received: (qmail 30984 invoked by uid 500); 19 May 2014 14:33:38 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 30958 invoked by uid 500); 19 May 2014 14:33:38 -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 30950 invoked by uid 99); 19 May 2014 14:33:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 May 2014 14:33:38 +0000 Date: Mon, 19 May 2014 14:33:38 +0000 (UTC) From: "Aleksey Yeschenko (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-7248) Tuple type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-7248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14001723#comment-14001723 ] Aleksey Yeschenko commented on CASSANDRA-7248: ---------------------------------------------- I don't think it is. You can emulate 6710 w/ tuples, but it's not a direct clone. > Tuple type > ---------- > > Key: CASSANDRA-7248 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7248 > Project: Cassandra > Issue Type: Bug > Reporter: Sylvain Lebresne > Assignee: Sylvain Lebresne > Labels: cql3 > Fix For: 2.1 rc1 > > > For CASSANDRA-6875 we need to be able to talk about tuples values and types (for prepared variables). Since we need it there, clients will need to support them anyway and so I think it would be a lot cleaner to start supporting those more generally. Besides, having tuples is a relatively simple and natural extension to what we have. I'll note in particular that tuple have a close relationship to user type in the sense that a tuple will be really just like an anonymous with no name for the fields and in particular a tuple value will be the same than a user type value. > The syntax would simply look like that: > {noformat} > CREATE TABLE foo ( > k int PRIMARY KEY, > v tuple > ) > INSERT INTO foo(k, v) VALUES(0, (3, 'bar', 2.1)); > {noformat} > We can also add projections in selects if we want: > {noformat} > SELECT v[0], v[2] FROM foo WHERE k = 0; > {noformat} > but that can come later (after all, we still don't have projections for collections and it's not a big deal). -- This message was sent by Atlassian JIRA (v6.2#6252)