You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (JIRA)" <ji...@apache.org> on 2013/05/01 01:48:16 UTC

[jira] [Commented] (CASSANDRA-5528) CLUSTERING ORDER BY support for cqlsh's DESCRIBE

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

Aleksey Yeschenko commented on CASSANDRA-5528:
----------------------------------------------

+1 to the first part of the patch (fixing ReversedType handling), but I have an issue with the second part.

{noformat}if len(layout.primary_key_components) > len(layout.partition_key_components){noformat} is equivalent to simply {noformat}if layout.column_aliases{noformat}

similarly,

{noformat}
num_partition_components = len(layout.partition_key_components)
clustering_components = layout.primary_key_components[num_partition_components:]
clustering_names = self.cql_protect_names(clustering_components)
{noformat}

is equivalent to just

{noformat}
clustering_names = self.cql_protect_names(layout.column_aliases)
{noformat}

also, I don't fully understand why

{noformat}
if layout.compact_storage and not issubclass(layout.comparator, CompositeType)
{noformat}

is not just

{noformat}
if not issubclass(layout.comparator, CompositeType)
{noformat}

I also think that we shouldn't show CLUSTERING ORDER BY at all when we have no ReversedType in use in the comparator (everything's ASC), just as we don't show durable_writes when describing a keyspace unless it's the non-default 'false'.
                
> CLUSTERING ORDER BY support for cqlsh's DESCRIBE
> ------------------------------------------------
>
>                 Key: CASSANDRA-5528
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5528
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Tyler Hobbs
>            Assignee: Tyler Hobbs
>            Priority: Minor
>         Attachments: 5528-clustering-order-v1.txt, cql3_test_cases
>
>
> cqlsh currently does not output any sort of {{CLUSTERING ORDER BY}} options with {{DESCRIBE}} and, furthermore, {{DESC}} orderings will result in bad column type definitions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira