[ https://issues.apache.org/jira/browse/CASSANDRA-14825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16924234#comment-16924234 ]
Sylvain Lebresne commented on CASSANDRA-14825: ---------------------------------------------- {quote}it could support versioning of CQL grammar {quote} Good point. And again, that fall into the category of {{DESCRIBE}} makes it easy to have schema specific stuffs, more so than a virtual table approach. {quote}{{cqlsh}} having it already does not seem particularly important, and should not bind our future decisions. It is a single tool, even if it is bundled. {quote} The {{cqlsh}} {{DESCRIBE}} has been _the_ main way to get schema users have used for the past 7-ish years, it's the one documented everywhere, and afaict, there is no proposal to remove it, so users will continue to use it. I fail to see how building on something familiar and not creating multiple way to do essentially the same thing is not at least a bit relevant, and advantageous. Don't get me wrong, if something is bad, then sure, we shouldn't build on a bad idea just because it's there, but are we making the argument that {{DESCRIBE}} is _bad_? {quote}Virtual tables are also very capable of surfacing the necessary information to produce dependent types, for instance as a collection column of the names of those type. {quote} I'm genuinely a bit unsure what you are trying to argue here in the context of this ticket. This ticket is explicitly about exposing the schema in CQL form, so as strings at the end of the day, so I'm not sure how virtual tables brings structure to that. Btw, the tables exposed by the current patch have no collections whatsoever and no more structure that what {{DESCRIBE}} would give. It's very possible you have something in mind that is not the current patch, but I think you'll need to describe it at least a bit so we can discuss it. {quote}I can say that I hate features like {{DESCRIBE}} because I have to go and google the manual. With a virtual table interface, I just {{SELECT}} {quote} :) How do you know which table to {{SELECT}}? Believe it or not, the table in the current patch to get a given table schema is called {{system_views.describe_table}} ... {quote}There is a legitimate case to be made to support both approaches, in my opinion. {quote} To clarify, my *main* position here is that doing both approaches would be a mistake. Not that the virtual table approach is terrible (it's not), nor that {{DESCRIBE}} is order of magnitude better. In fact, my argument is that both approach are not different _enough_ to justify adding user confusion by having 2 ways to do essentially the same thing (exposing the schema in CQL form without having drivers rebuilding it manually from our existing schema tables). That's why the pre-existence (and reasonable adequacy so far) of {{DESCRIBE}} is very relevant to me: since we've not removing {{DESCRIBE}} in cqlsh, pushing it server side is really the only option that does not create 2 ways to "describe the schema" (and the fact it's better at handling things like versions or "internal" schema details finishes to convince me it's _at least_ not substantially worth than the virtual table approach, if not a bit better). I genuinely believe that this, having different ways to do essentially the same thing, is one of the thing we've been historically bad at and is a contributor to the (deserved) reputation of C* of being hard to use/learn (obviously, not the only factor, but one nonetheless). I wish for us to learn from our mistake, not repeat them. I feel we can easily avoid it here. > Expose table schema for drivers > ------------------------------- > > Key: CASSANDRA-14825 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14825 > Project: Cassandra > Issue Type: Improvement > Components: Legacy/CQL > Reporter: Chris Lohfink > Assignee: Chris Lohfink > Priority: Normal > Labels: pull-request-available > Time Spent: 1h 50m > 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 (v8.3.2#803003) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org