You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (Resolved) (JIRA)" <ji...@apache.org> on 2011/11/21 18:48:51 UTC

[jira] [Resolved] (CASSANDRA-3513) CQL Schema metadata does not contain Type information for the key unless the key is selected

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

Jonathan Ellis resolved CASSANDRA-3513.
---------------------------------------

    Resolution: Won't Fix

If you want the key in the resultset you need to ask for it.  It's more of a bug than a feature that you always get the key back in the Thrift struct.
                
> CQL Schema metadata does not contain Type information for the key unless the key is selected
> --------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3513
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3513
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.2
>            Reporter: Kelley Reynolds
>            Priority: Minor
>              Labels: cql
>
> The CQL ResultSchema does not contain type information for the key unless the key is actually part of the CQL query. It's available in the column family schema but that's what we're trying to avoid by having a ResultSchema in the first place. 
> CREATE COLUMNFAMILY test (id varchar PRIMARY KEY, serial int)
> INSERT INTO test (id, serial) VALUES ('test', 12345)
> SELECT serial FROM test where id='test'
> # The Result Schema
> --- !ruby/object:CassandraCQL::ResultSchema 
> names: {}
> values: 
>   serial: Int32Type
> # The row with no way to properly cast the key (though I used varchar here to make a functional example)
> --- !ruby/object:CassandraCQL::Thrift::CqlRow 
> columns: 
> - !ruby/object:CassandraCQL::Thrift::Column 
>   name: serial
>   timestamp: 1321893998457001
>   value: !binary |
>     AAAwOQ==
> key: test

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira