Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 16420 invoked from network); 8 Mar 2010 18:08:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Mar 2010 18:08:41 -0000 Received: (qmail 50167 invoked by uid 500); 8 Mar 2010 18:08:16 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 50147 invoked by uid 500); 8 Mar 2010 18:08:16 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 50139 invoked by uid 99); 8 Mar 2010 18:08:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Mar 2010 18:08:16 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of erikholstad@gmail.com designates 209.85.222.204 as permitted sender) Received: from [209.85.222.204] (HELO mail-pz0-f204.google.com) (209.85.222.204) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Mar 2010 18:08:15 +0000 Received: by pzk42 with SMTP id 42so138165pzk.32 for ; Mon, 08 Mar 2010 10:07:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=lHdxGnCUch2ei2vRwtvClPBWSqLDt1vXVQAq2kNTMt0=; b=NL77Jyp5thXRHnVWDSwWdpJSQKZXWErOGQgYM9xgqfVXt7rMLeEcX3cAKHGfbg7vSq ZDVpms+4tI9MENaMkJONYUT85gaviM1kNirp1Qg4zaXWua2nBYEJjGjzSggp33V8HAiw 2bFjxgg/M0gCjtjWypIYawF9XbYqKmSZthAEE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=sDv61vhp8in6H6lx341QcgJ6xvw8MyV4veGhh6L1QKy8xsPn5dDkApbpyQvFbalQZs PejBgoDIFubEP7M9K9eVMrHPOLmQsmbGo8tTKHla4JJhx8JLvp3hqAeuLLNgGsoRRM0o nSD4FqiUKoyL3A0swEwE3Sl2uqOhcVGppiE2Y= MIME-Version: 1.0 Received: by 10.114.49.17 with SMTP id w17mr223326waw.103.1268071675016; Mon, 08 Mar 2010 10:07:55 -0800 (PST) In-Reply-To: References: <74f4d40b1003080907u1887448dh9d428b22f95b4b6@mail.gmail.com> <74f4d40b1003080922p612feda1t1ebcaa8fdbc108be@mail.gmail.com> Date: Mon, 8 Mar 2010 10:07:54 -0800 Message-ID: <74f4d40b1003081007l2dbe5bd1o8327523f2d984ca@mail.gmail.com> Subject: Re: Reason for not allowing null values for in Column From: Erik Holstad To: cassandra-user@incubator.apache.org Content-Type: multipart/alternative; boundary=00504502e36abd34f104814df105 --00504502e36abd34f104814df105 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Mar 8, 2010 at 9:30 AM, Jonathan Ellis wrote: > On Mon, Mar 8, 2010 at 11:22 AM, Erik Holstad > wrote: > > I was probably a little bit unclear here. I'm wondering about the two > byte[] > > in Column. > > One for name and one for value. I was under the impression that the > > skiplistmap > > wraps the Columns, not that the name and the value are themselves > inserted > > into a map? > > The column name is the key in one such map, yes. > So why is it again that the value field in the Column cannot be null if it is not the value field in the map, but just a part of the value field? > > >> > is it really that expensive to check if the list is empty before > >> > returning > >> > that row > >> > >> Yes, because you have to check the entire row, which may be much > >> larger than the given predicate. > > > > That makes sense, but why would you be interested in the rows present > > outside > > your specified predicate? > > Because get_range_slice says, "apply this predicate to the range of > rows given," meaning, if the predicate result is empty, we have to > include an empty result for that row key. It is perfectly valid to > perform such a query returning empty column lists for some or all > keys, even if no deletions have been performed. So to special case > leaving out result entries for deletions, we have to check the entire > rest of the row to make sure there is no undeleted data anywhere else > either (in which case leaving the key out would be an error). > All of this makes total sense, I'm wondering about use cases where you want to get an empty row when you don't know if it has been deleted or not. -- Regards Erik --00504502e36abd34f104814df105 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Mon, Mar 8, 2010 at 9:30 AM, Jonathan= Ellis <jbellis@g= mail.com> wrote:
On Mon, Mar 8, 2010 at 11:22 AM, Erik Holstad <erikholstad@gmail.com> wrote:
> I was probably a little bit unclear here. I'm wondering about the = two byte[]
> in Column.
> One for name and one for value. I was under the impression that the > skiplistmap
> wraps the Columns, not that the name and the value are themselves inse= rted
> into a map?

The column name is the key in one such map, yes.
So why is it again that the value field in the Column cannot be null if it= is not the
value field in the map, but just a part of the value field? =

>> > is it really that expensive to check if the list is empty bef= ore
>> > returning
>> > that row
>>
>> Yes, because you have to check the entire row, which may be much >> larger than the given predicate.
>
> That makes sense, but why would you be interested in the rows present<= br> > outside
> your specified predicate?

Because get_range_slice says, "apply this predicate to the range= of
rows given," meaning, if the predicate result is empty, we have to
include an empty result for that row key. =A0It is perfectly valid to
perform such a query returning empty column lists for some or all
keys, even if no deletions have been performed. =A0So to special case
leaving out result entries for deletions, we have to check the entire
rest of the row to make sure there is no undeleted data anywhere else
either (in which case leaving the key out would be an error).
All of this makes total sense, I'm wondering about u= se cases where you want to
get an empty row when you don't know if = it has been deleted or not.


--
Regards Erik --00504502e36abd34f104814df105--