cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-14182) Sub-range selection for non-frozen collections should return null instead of empty
Date Mon, 22 Jan 2018 12:30:04 GMT
Benjamin Lerer created CASSANDRA-14182:
------------------------------------------

             Summary: Sub-range selection for non-frozen collections should return null instead
of empty
                 Key: CASSANDRA-14182
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14182
             Project: Cassandra
          Issue Type: Bug
            Reporter: Benjamin Lerer
            Assignee: Benjamin Lerer


For non frozen collections, Cassandra cannot differentiate an empty collection from a {{null}}
one. Due to that Cassandra returns always {{null}} for non-frozen empty collection.

When selecting a sub range from a non-frozen collection, if the range does not contains any
data an empty collection will be returned. It is counter intuitive and a {{null}} value should
be returned instead.
 
{code:sql}
CREATE TABLE IF NOT EXISTS t (k int PRIMARY KEY, v set<int>);

INSERT INTO t (k, v) VALUES (1, {});
SELECT v FROM t; -- null
SELECT v[1] FROM t; -- null
SELECT v[1..] FROM t; -- null

INSERT INTO t (k, v) VALUES (1, {0});
SELECT v FROM t; -- {0}
SELECT v[1] FROM t; -- null
SELECT v[1..] FROM t; -- {}
{code}



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

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


Mime
View raw message