mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 16:40:35 +00:00
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:
@@ -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()};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user