Return-Path: X-Original-To: apmail-cassandra-dev-archive@www.apache.org Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 101B16CE1 for ; Sat, 23 Jul 2011 15:39:33 +0000 (UTC) Received: (qmail 8708 invoked by uid 500); 23 Jul 2011 15:39:32 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 8639 invoked by uid 500); 23 Jul 2011 15:39:31 -0000 Mailing-List: contact dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list dev@cassandra.apache.org Received: (qmail 8630 invoked by uid 99); 23 Jul 2011 15:39:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Jul 2011 15:39:31 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [67.192.241.141] (HELO smtp141.dfw.emailsrvr.com) (67.192.241.141) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Jul 2011 15:39:25 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp4.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 44A9D3A0574 for ; Sat, 23 Jul 2011 11:39:04 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp4.relay.dfw1a.emailsrvr.com (Authenticated sender: eevans-AT-racklabs.com) with ESMTPSA id 2B4623A0624 for ; Sat, 23 Jul 2011 11:39:04 -0400 (EDT) Subject: Re: Backward incompatible CQL changes 0.8.0 -> 0.8.1 From: Eric Evans To: dev@cassandra.apache.org In-Reply-To: References: <1311376206.5719.147.camel@erebus.lan> Content-Type: text/plain; charset="UTF-8" Date: Sat, 23 Jul 2011 10:39:19 -0500 Message-ID: <1311435559.5719.159.camel@erebus.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 Content-Transfer-Encoding: 7bit On Fri, 2011-07-22 at 21:29 -0500, paul cannon wrote: > I definitely vote for reserving words that are expected to be needed > in the future. It seems we have a pretty good chance of predicting > most of the syntactical needs for the next couple years (especially > with suggestions from common SQL variants), and the (hopefully) rare > exceptions could get their major version bumps. I agree that of the 3, the "reserve future keywords; bump major when expanding the list becomes necessary" option looks the best on paper, but I'm skeptical that it will work in practice. Reserving SQL keywords is a given (we should probably do that anyway), but that wouldn't have been enough to catch the case that tripped us up, ("type" is not a reserved word). And, considering how much back-and-forth there is over syntax, before, during, and after an implementation, I could definitely see us bumping that major more than once every 2 years. It *could* work, it would just require a great deal of discipline. > 2 and 3 feel like they would cripple CQL too much. Option 2 isn't so much crippling IMO, as it is weak. That being said, I already council people to quote all of their terms for everything but interactively entered queries or trivial tests, so it doesn't seem like *too* much of a stretch. For the record, I dislike all 3 of these options and am hoping someone offers an alternative that blows me away. :) > On Fri, Jul 22, 2011 at 6:10 PM, Eric Evans > wrote: > > > > > I just ran into an issue where CQL queries that were written at the > time > > of 0.8.0 no longer work against 0.8.1. This was caused by r1130200 > > (CASSANDRA-1709) which introduced ALTER support. The queries in > > question made use of unquoted terms for one of the newly added > keywords > > ("type" in this case though any one of "alter", "table" or "add" > would > > have caused the same problem). > > > > This case never occurred to me, but it is fairly serious since it > breaks > > the expectation that code will remain backward compatible. The > options > > I see are: > > > > 1. Bump the major of the language version when new keywords are > added. > > 2. Set the expectation that unquoted terms could collide with future > > keywords. > > 3. Disallow the unquoted term variant (would require bumping the > major > > once). > > > > #1 sucks because building out new features that would otherwise be > > backward compatible will result in a major bump. Looking at the > roadmap > > and trying to reserve everything now that we'll need for the > foreseeable > > future might make this less of an issue though. > > > > I have a feeling that #2 is easier said than done. So long as we're > > allowing the unquoted form, people will use it and be surprised when > > bit. Aside from that it seems OK. > > > > #3 is probably the most technically correct solution, but would make > > hand-crafted queries entered into interactive interpreters less > > friendly. -- Eric Evans eevans@rackspace.com