You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Mikhail Stepura (JIRA)" <ji...@apache.org> on 2014/06/20 07:29:26 UTC

[jira] [Updated] (CASSANDRA-7399) cqlsh: describe table shows wrong data type for CompositeType

     [ https://issues.apache.org/jira/browse/CASSANDRA-7399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Stepura updated CASSANDRA-7399:
---------------------------------------

    Attachment: CASSANDRA-2.1-7399.patch
                CASSANDRA-1.2-7399.patch

The problem here is that CQL drivers (cassandra-dbapi2 for 1.2/2.0 and python-driver for 2.1) are trying to figure out a CQL-like representation for a Composite types, which probably doesn't make sense.

I'm attaching monkey patches for both drivers to override that behavior and always return fully-qualified names for Composites.

> cqlsh: describe table shows wrong data type for CompositeType
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-7399
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7399
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Robert Stupp
>            Assignee: Mikhail Stepura
>         Attachments: CASSANDRA-1.2-7399.patch, CASSANDRA-2.1-7399.patch
>
>
> {{DESCRIBE}} for {{CompositeType}} produces wrong output.
> Currently:
> {noformat}
> CREATE TABLE compo.comp (
>     id int PRIMARY KEY,
>     comp 'org.apache.cassandra.db.marshal.CompositeType'<int, text>
> )...
> {noformat}
> Correct:
> {noformat}
> CREATE TABLE compo.comp (
>     id int PRIMARY KEY,
>     comp 'org.apache.cassandra.db.marshal.CompositeType(Int32Type,UTF8Type)'
> )...
> {noformat}
> Means:
> 1. use normal brackets instead of {{<>}}
> 1. use C* type names instead of CQL3 names
> 1. move types inside quoted



--
This message was sent by Atlassian JIRA
(v6.2#6252)