cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7563) UserType, TupleType and collections in UDFs
Date Fri, 21 Nov 2014 19:47:34 GMT


Tyler Hobbs commented on CASSANDRA-7563:

When playing around with this, I discovered that you can trigger an assertion error when creating
a function with a UDT without an explicit keyspace:

cqlsh> use ks1;
cqlsh:ks1> create type mytype (a int);
cqlsh:ks1> create function bar (a mytype) RETURNS mytype LANGUAGE java AS $$return a;$$;
<ErrorMessage code=0000 [Server error] message="java.lang.AssertionError">

java.lang.AssertionError: null
	at org.apache.cassandra.config.Schema.getKSMetaData( ~[main/:na]
	at org.apache.cassandra.cql3.CQL3Type$Raw$RawUT.prepare( ~[main/:na]
	at org.apache.cassandra.cql3.statements.CreateFunctionStatement.announceMigration(
	at org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(
	at org.apache.cassandra.cql3.QueryProcessor.processStatement( ~[main/:na]
	at org.apache.cassandra.cql3.QueryProcessor.process( ~[main/:na]
	at org.apache.cassandra.transport.messages.QueryMessage.execute( ~[main/:na]
	at org.apache.cassandra.transport.Message$Dispatcher.channelRead0( [main/:na]
	at org.apache.cassandra.transport.Message$Dispatcher.channelRead0( [main/:na]
	at java.util.concurrent.Executors$ [na:1.8.0_25]
	at org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$
	at [main/:na]
	at [na:1.8.0_25]

A quick investigation shows that the keyspace being passed to {{prepare()}} is null.

Other than that, the post-test cleanup seems to have problems dropping some of the functions.
 I believe it's due to a signature mismatch.  This doesn't show up as an error, since {{DROP
IF EXISTS}} is used, but it causes {{DROP TYPE}} statements to fail later.  I'm not sure if
this is due to the way the tests are working, or if it's an actual problem with dropping functions.
 (I haven't narrowed it down to a particular set of functions, yet.)

> UserType, TupleType and collections in UDFs
> -------------------------------------------
>                 Key: CASSANDRA-7563
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>             Fix For: 3.0
>         Attachments: 7563-7740.txt, 7563.txt, 7563v2.txt, 7563v3.txt, 7563v4.txt, 7563v5.txt,
> * is Java Driver as a dependency required ?
> * is it possible to extract parts of the Java Driver for UDT/TT/coll support ?
> * CQL {{DROP TYPE}} must check UDFs
> * must check keyspace access permissions (if those exist)

This message was sent by Atlassian JIRA

View raw message