You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Andy Tolbert (JIRA)" <ji...@apache.org> on 2018/11/07 20:21:00 UTC

[jira] [Commented] (CASSANDRA-8005) Server-side DESCRIBE

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

Andy Tolbert commented on CASSANDRA-8005:
-----------------------------------------

A new ticket has been opened, [CASSANDRA-14825], that revisits this concept.  This time CQL schema is exposed via virtual tables (i.e. {{select * from system_views.describe_keyspace where keyspace_name = 'mykeyspace'}}).  This functionality is not meant to replace the structured schema information shared via the {{system_schema}} keyspace, but to provide a means of getting the CQL DDL, which is useful for tooling and backing up schema in such a way that can be recreated.   Today, both the java driver and python driver provide this capability, but it has proven to be difficult to support multiple C* versions simultaneously as new properties are changed and existing ones are replaced release to release.  I think it'd be much more useful to decouple a driver implementation from providing this capability and should also be less error-prone.

Does anyone see any reason to be hesitant about providing such capability via virtual tables?   The server already had the capability of emitting CQL schema (although it had some issues which are addressed in this ticket) and we have a functional patch available.

> Server-side DESCRIBE
> --------------------
>
>                 Key: CASSANDRA-8005
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8005
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: CQL
>            Reporter: Tyler Hobbs
>            Priority: Minor
>              Labels: client-impacting, cql3
>
> The various {{DESCRIBE}} commands are currently implemented by cqlsh, and nearly identical implementations exist in many drivers.  There are several motivations for making {{DESCRIBE}} part of the CQL language:
> * Eliminate the (fairly complex) duplicate implementations across drivers and cqlsh
> * Get closer to allowing drivers to not have to fetch the schema tables. (Minor changes to prepared statements are also needed.)
> * Have instantaneous support for new schema features in cqlsh.  (You currently have to update the bundled python driver.)
> * Support writing out schemas where it makes sense.  One good example of this is backups.  You need to restore the schema before restoring data in the case of total loss, so it makes sense to write out the schema alongside snapshots.



--
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