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

Sylvain Lebresne commented on CASSANDRA-8005:
---------------------------------------------

bq. Why would the drivers need to parse the string?

What I mean is that the drivers (at least the JAVA one, but I'd argue that any 
good driver should do the same) exposes the schema in a programatic way (in 
[KeyspaceMetadata|http://www.datastax.com/drivers/java/2.0/com/datastax/driver/core/KeyspaceMetadata.html],
 
[TableMetadata|http://www.datastax.com/drivers/java/2.0/com/datastax/driver/core/TableMetadata.html],
 ...) which is useful and not something we'd want to remove. It follows that 
the driver will read the schema tables anyway (or, in your proposal of 
replacing the read of the schema tables by a string, it would have to parse 
that string). And since the drivers have the schema this way, re-generating the 
string representation of it is pretty trivial (and the java driver does it).

So I argue that sending a string of the whole schema is somewhat useless for 
drivers (but making schema table much more easily consumable is definitively 
useful).

> Server-side DESCRIBE
> --------------------
>
>                 Key: CASSANDRA-8005
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8005
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API
>            Reporter: Tyler Hobbs
>            Priority: Minor
>              Labels: cql3
>             Fix For: 3.0
>
>
> 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
(v6.3.4#6332)

Reply via email to