cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Stupp (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9186) AbstractType vs. CQL3Type loses frozen keyword
Date Tue, 14 Apr 2015 10:57:12 GMT


Robert Stupp commented on CASSANDRA-9186:

Hm - prepared a branch with a "fix" for this one. Changes include that {{frozen}} is added
to the CQL3 type signature - that's fine.

But adding {{FrozenType()}} (which would be theoretically correct) around tuple and user types
just produces failures in the Java Driver since it seems not to expect {{FrozenType()}} around
a tuple or user defined type.
Seems that if we keep AbstractType, we would need something like _MulticellUserType_ and _MulticellTupleType_
in the future.

> AbstractType vs. CQL3Type loses frozen keyword
> ----------------------------------------------
>                 Key: CASSANDRA-9186
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Robert Stupp
>            Priority: Minor
>             Fix For: 3.0
> {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