[
https://issues.apache.org/jira/browse/CASSANDRA-8005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154550#comment-14154550
]
Sylvain Lebresne commented on CASSANDRA-8005:
---------------------------------------------
bq. I still say CASSANDRA-7190 presents a good reason for having this server
side.
To be clear, I'm not absolutely opposed to having server-side methods to
generate the {{CREATE TABLE}} strings if it's useful for things like
CASSANDRA-7190. But CASSANDRA-7190 is the place to debate that.
What I'm not convinced of is the usefulness of exposing such methods to clients
through the addition of {{DESCRIBE}} to CQL, because drivers already provide it
and I generally prefer not having 2 ways to do the same thing.
And btw, drivers already provide this as a by-product. Drivers are primarily
interested in providing
[APIs|http://www.datastax.com/drivers/java/2.1/com/datastax/driver/core/TableMetadata.html]
to exposes schema tables in a idiomatic and user friendly way. This is
essential today since the schema table are completly cryptic for CQL users.
But I would argue that it's a nice thing for drivers to expose anyway even in a
post-CASSANDRA-6717 world (and it is there, asking drivers to remove it now is
imo not very realistic). The reason drivers provides a sort of {{DESCRIBE}} is
just that generating it from those APIs is a small amount of trivial code and
there is thus no reason for drivers not to provide it out of the box.
But I must add that I'm not strongly opposed to adding {{DESCRIBE}} to CQL as
it's not a whole lot of complexity. I'm just not sure it's really needed and
I'm thus wary of adding clutter.
> 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)