incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandeep Tata <sandeep.t...@gmail.com>
Subject Re: What to do with data that isn't there
Date Mon, 20 Apr 2009 22:03:27 GMT
+1

Empty lists make more sense than throwing a CassandraException.


On Mon, Apr 20, 2009 at 2:32 PM, Alexander Staubo
<madevilgenius@gmail.com> wrote:
> On Mon, Apr 20, 2009 at 11:29 PM, Jonathan Ellis <jbellis@gmail.com> wrote:
>> Currently if you ask for a slice and there is no data for the slice
>> you defined you will get a CassandraException thrown.
>>
>> I think this is the wrong thing to do for three reasons.
>>
>> First, If you ask for a slice of cardinality 1 you get a list of size
>> 1.  Slice of cardinality 2, list of size 2.  And so on.  So it would
>> be consistent if a slice of cardinality zero gave a list of
>> cardinality zero.
>
> +1. I like consistent APIs, and I prefer exceptions to represent
> actual errors, not the absence of a result.
>
> Alexander.
>

Mime
View raw message