You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (JIRA)" <ji...@apache.org> on 2018/01/22 12:30:04 UTC
[jira] [Created] (CASSANDRA-14182) Sub-range selection for
non-frozen collections should return null instead of empty
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