cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9186) AbstractType vs. CQL3Type loses frozen keyword
Date Mon, 18 May 2015 08:15:00 GMT


Sylvain Lebresne commented on CASSANDRA-9186:

Honestly, I'm hoping we'll get rid of AbstractType in schema tables sooner than later with
CASSANDRA-6717, and that's more than likely to happen before we support non-frozen UDT, so
I'm not convinced it's worth getting too fancy here (if we were to introduce a {{FrozenType}},
not only the drivers will have to handle them but upgrades too. And then we'll still have
to deal with CASSANDRA-6717 later anyway. So better having to deal with this only once with
CASSANDRA-6717). Typically, just making it an assumption than {{UserType}} and {{TupleType}}
are frozen would be imo good enough for now (so option 3 really). And as Robert said, if it
does happen that we support non-frozen UDT before CASANDRA-6717, we can easily use a separate
class name for them.

> AbstractType vs. CQL3Type loses frozen keyword
> ----------------------------------------------
>                 Key: CASSANDRA-9186
>                 URL:
>             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<udtx>)RETURNS int LANGUAGE java AS 'return new
> 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

View raw message