You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Tyler Hobbs (JIRA)" <ji...@apache.org> on 2015/07/16 18:37:04 UTC

[jira] [Commented] (CASSANDRA-9813) Surrogate columns are being exposed via CQL for compact static tables

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

Tyler Hobbs commented on CASSANDRA-9813:
----------------------------------------

Actually, I think this may be a cqlsh problem.  If the result has no rows, cqlsh doesn't know the column names, so it recreates them based on the python driver's view of the table metadata.

It turns out that's broken in more ways than just this -- if you select functions or use aliases, the column header for empty results will be incorrect.  I think the proper fix is to somehow expose the result set metadata in the driver so that cqlsh can use it instead of relying on table metadata.

> Surrogate columns are being exposed via CQL for compact static tables
> ---------------------------------------------------------------------
>
>                 Key: CASSANDRA-9813
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9813
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Aleksey Yeschenko
>            Assignee: Sylvain Lebresne
>             Fix For: 3.0 beta 1
>
>         Attachments: Test-for-9813.txt
>
>
> Upon migration, we internally create a pair of surrogate clustering/regular columns for compact static tables. These shouldn't be exposed to the user.
> That is, for the table
> {code}
> CREATE TABLE bar (k int, c int, PRIMARY KEY (k)) WITH COMPACT STORAGE;
> {code}
> {{SELECT * FROM bar}} should not be returning this result set:
> {code}
> cqlsh:test> select * from bar;
>  c | column1 | k | value
> ---+---------+---+-------
> (0 rows)
> {code}
> Should only contain the defined {{c}} and {{k}} columns.



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