cql: token_restriction: Fix the check detecting contradicting restrictions

The condition is incorrect after 9b52f5bf2b.

We no longer express the full range as (min, min], and missing upper
bound as bound as (x, min] so we don't need to exclude those cases in
the check.
This commit is contained in:
Tomasz Grabiec
2015-07-22 17:25:50 +02:00
parent eb2e48f019
commit 47e006bfae

View File

@@ -95,14 +95,10 @@ public:
*
* In practice, we want to return an empty result set if either startToken > endToken, or both are equal but
* one of the bound is excluded (since [a, a] can contains something, but not (a, a], [a, a) or (a, a)).
* Note though that in the case where startToken or endToken is the minimum token, then this special case
* rule should not apply.
*/
if (start_token.is_minimum()
&& end_token.is_maximum()
&& (start_token > end_token
|| (start_token == end_token
&& (!include_start || !include_end)))) {
if (start_token > end_token
|| (start_token == end_token
&& (!include_start || !include_end))) {
return {query::partition_range::make_open_ended_both_sides()};
}