[
https://issues.apache.org/jira/browse/CASSANDRA-14182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16334257#comment-16334257
]
Benjamin Lerer commented on CASSANDRA-14182:
--------------------------------------------
I pushed a patch for that problem
[here|https://github.com/apache/cassandra/compare/trunk...blerer:14182-trunk].
[~adelapena] could you review?
> 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
> Priority: Minor
>
> 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: [email protected]
For additional commands, e-mail: [email protected]