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

Sylvain Lebresne commented on CASSANDRA-14825:
----------------------------------------------

bq. just to be clear if you query describe_keyspace table you can iterate 
through the result set to get the entire schema (...)

And in case there was doubt, I didn't say it wasn't the case. I'm not saying 
you can't get schema information through virtual tables.

What I'm asking is, why use virtual tables when we could just promote to CQL 
the `DESCRIBE` statements every user is already familiar and which is, I think, 
a more fexible/direct approach?

By which I mean that you can both get the granular if you want, but also get a 
full schema dump directly. With virtual tables, you get the granular, but a 
full schema dump requires a small amount of post-processing (_not_ saying it's 
hard, but it is harder than no post-processing at all). Additionally, it's very 
easy to add new options to statements, while once you settle on some virtual 
table schema, it can harder to evolve.

What are the pros in favor of virtual tables that outweigh those 2 pros of 
promoting `DESCRIBE` (existing familiarity and at least some form of better 
flexibility; to which I could add not having 2 ways to do the same thing, since 
afaik, we're not going to remove `DESCRIBE` from cqlsh)? I get that virtual 
tables are everyone's new shiny hammer, but it's not an objective argument.

> Expose table schema for drivers
> -------------------------------
>
>                 Key: CASSANDRA-14825
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14825
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Chris Lohfink
>            Assignee: Chris Lohfink
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Currently the drivers recreate the CQL for the tables by putting together the 
> system table values. This is very difficult to keep up to date and buggy 
> enough that its only even supported in Java and Python drivers. Cassandra 
> already has some limited output available for snapshots that we could provide 
> in a virtual table or new query that the drivers can fetch. This can greatly 
> reduce the complexity of drivers while also reducing bugs like 
> CASSANDRA-14822 as the underlying schema and properties change.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to