[ 
https://issues.apache.org/jira/browse/CASSANDRA-10365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14980356#comment-14980356
 ] 

Alexandre Dutra commented on CASSANDRA-10365:
---------------------------------------------

[~snazy] While testing the Java driver against your branch I came across this 
bug, also reproducible via cqlsh:

{code}
cqlsh> create keyspace test with replication = { 'class' : 'SimpleStrategy', 
'replication_factor' : 1 };
cqlsh> use test;
cqlsh:test> create type "Foo" (f1 int);
cqlsh:test> describe type "Foo";

CREATE TYPE test."Foo" (
    f1 'int'
);

cqlsh:test> create table t1 (pk int primary key, c1 frozen<"Foo">);
ServerError: <ErrorMessage code=0000 [Server error] 
message="java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
org.apache.cassandra.exceptions.InvalidRequestException: Unknown type test.foo">
{code}

It seems that mixed-case identifiers are being lower-cased somewhere.

The server logs show:

{noformat}
Caused by: org.apache.cassandra.exceptions.InvalidRequestException: Unknown 
type test.foo
        at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawUT.prepare(CQL3Type.java:536) 
~[main/:na]
        at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawTuple.prepare(CQL3Type.java:596) 
~[main/:na]
        at 
org.apache.cassandra.schema.CQLTypeParser.parse(CQLTypeParser.java:55) 
~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.createColumnFromColumnRow(SchemaKeyspace.java:1024)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.lambda$fetchColumns$242(SchemaKeyspace.java:1008)
 ~[main/:na]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_66]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchColumns(SchemaKeyspace.java:1008)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:962) 
~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:941) 
~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:889)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesOnly(SchemaKeyspace.java:881)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.mergeSchema(SchemaKeyspace.java:1281)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.mergeSchemaAndAnnounceVersion(SchemaKeyspace.java:1260)
 ~[main/:na]
{noformat}

> Consider storing types by their CQL names in schema tables instead of 
> fully-qualified internal class names
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-10365
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Aleksey Yeschenko
>            Assignee: Aleksey Yeschenko
>              Labels: client-impacting
>             Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to