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 B10A91772C for ; Fri, 15 May 2015 08:44:00 +0000 (UTC) Received: (qmail 44445 invoked by uid 500); 15 May 2015 08:44:00 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 44412 invoked by uid 500); 15 May 2015 08:44:00 -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 44384 invoked by uid 99); 15 May 2015 08:44:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2015 08:44:00 +0000 Date: Fri, 15 May 2015 08:44:00 +0000 (UTC) From: "Robert Stupp (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-9186) AbstractType vs. CQL3Type loses frozen keyword 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-9186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14545164#comment-14545164 ] Robert Stupp commented on CASSANDRA-9186: ----------------------------------------- Should we fix at least the {{signature}} column this for 2.2? I currently see the following options: # Fix the whole thing ({{FrozenType}}). But this makes drives fail (at least the Java driver does not expect {{FrozenType}} around a {{UserType}}) and feels too heavy for 2.2. # Assume that {{UserType}} + {{TupleType}} are always frozen, introduce {{MulticellUserType}} and {{MulticellTupleType}} later (if {{AbstractType}} is still alive), fix information in {{signature}} columns and introduce a {{return_cql_type}} column (so these include the {{frozen}} keyword). This change is not limited to UDFs - it's a change to the _toString_ of the {{CQL3Type.UserDefined}}. # Keep it as it is. I'd prefer option 2. UDFs do not need to distinguish frozen and non-frozen types. UDFs either receive fully deserialized collections and tuple/user types and return fully serialized ones. So they are always _frozen_ from UDF / Java driver point of view. > AbstractType vs. CQL3Type loses frozen keyword > ---------------------------------------------- > > Key: CASSANDRA-9186 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9186 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: Robert Stupp > Assignee: Robert Stupp > Priority: Minor > Fix For: 3.x > > > {code} > create keyspace functionmetadatatest with replication = {'class':'SimpleStrategy', 'replication_factor':1}; > use functionmetadatatest ; > CREATE TYPE udtx (x int); > CREATE FUNCTION u_frozen(u frozen)RETURNS int LANGUAGE java AS 'return new Integer(0);'; > SELECT function_name, signature, argument_types FROM system.schema_functions WHERE keyspace_name='functionmetadatatest'; > function_name | signature | argument_types > ---------------+------------------+-------------------------------------------------------------------------------------------------------------------------- > u_frozen | ['udtx'] | ['org.apache.cassandra.db.marshal.UserType(functionmetadatatest,75647478,78:org.apache.cassandra.db.marshal.Int32Type)'] > {code} > Problem is that {{UserType}} and {{TupleType}} do not have a _frozen_ (or _isMultiCell_) attribute. A conversion from type to cql3type therefore loses the _frozen_ status. > EDIT: The issue has been discovered by [~aholmber] -- This message was sent by Atlassian JIRA (v6.3.4#6332)