You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "C. Scott Andreas (JIRA)" <ji...@apache.org> on 2018/11/19 02:24:01 UTC
[jira] [Updated] (CASSANDRA-12055) UDT named 'return' causes error
in DESC TABLE
[ https://issues.apache.org/jira/browse/CASSANDRA-12055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
C. Scott Andreas updated CASSANDRA-12055:
-----------------------------------------
Component/s: CQL
> UDT named 'return' causes error in DESC TABLE
> ---------------------------------------------
>
> Key: CASSANDRA-12055
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12055
> Project: Cassandra
> Issue Type: Bug
> Components: CQL
> Reporter: Robert Stupp
> Priority: Minor
>
> Having a schema like
> {code}
> CREATE TYPE foo.return ( a int, order_id text, b int, c text );
> CREATE TABLE foo.bar ( pk int PRIMARY KEY,returns frozen<list<frozen<return>>> );
> {code}
> created in 2.2.6.
> Executing {{DESC TABLE}} causes cqlsh to error out, if it's executed from 2.2 branch - but funnily it works fine with cqlsh on trunk. Funnily because both 2.2 and trunk use the same driver version and I don't really get what's different there.
> The error message on 2.2.3 (using driver version 2.7.2) on the original cluster is:
> {code}
> Warning: Table abcd.efgh is incomplete because of an error processing metadata.
> Traceback (most recent call last):
> File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/metadata.py", line 438, in _build_table_metadata
> column_meta = self._build_column_metadata(table_meta, col_row)
> File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/metadata.py", line 471, in _build_column_metadata
> data_type = types.lookup_casstype(row["validator"])
> File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cqltypes.py", line 184, in lookup_casstype
> raise ValueError("Don't know how to parse type string %r: %s" % (casstype, e))
> ValueError: Don't know how to parse type string u'org.apache.cassandra.db.marshal.FrozenType(org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.UserType(foo,72657475726e,...:org.apache.cassandra.db.marshal.Int32Type,...:org.apache.cassandra.db.marshal.UTF8Type,...:org.apache.cassandra.db.marshal.Int32Type,...:org.apache.cassandra.db.marshal.UTF8Type)))': Type names and field names cannot be a keyword: 'return'
> {code}
> The error message on latest 2.2 is:
> {code}
> Warning: Table foo.bar is incomplete because of an error processing metadata.
> Traceback (most recent call last):
> File "/Users/snazy/devel/cassandra/2.2/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/metadata.py", line 1893, in _build_table_metadata
> column_meta = self._build_column_metadata(table_meta, col_row)
> File "/Users/snazy/devel/cassandra/2.2/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/metadata.py", line 1931, in _build_column_metadata
> data_type = types.lookup_casstype(type_string)
> File "/Users/snazy/devel/cassandra/2.2/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cqltypes.py", line 182, in lookup_casstype
> return parse_casstype_args(casstype)
> File "/Users/snazy/devel/cassandra/2.2/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cqltypes.py", line 150, in parse_casstype_args
> prev_types[-1] = prev_types[-1].apply_parameters(types, names)
> File "/Users/snazy/devel/cassandra/2.2/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cqltypes.py", line 883, in apply_parameters
> return cls.make_udt_class(keyspace, udt_name, field_names, tuple(subtypes[2:]))
> File "/Users/snazy/devel/cassandra/2.2/bin/cqlsh.py", line 632, in new_make_udt_class
> formatter_for(udt_class.tuple_type.__name__)(format_value_utype)
> AttributeError: 'NoneType' object has no attribute '__name__'
> {code}
> Both seem to be caused by the UDT name {{return}} (which is not a wise choice).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org