From 76bf7b228caff2c64d07ce99473e709e72ebd588 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Wed, 22 Jul 2015 17:55:50 +0200 Subject: [PATCH] cql: token_restriction: Fix range produced for contradicting restrictions We want to return no results in this case, so we should return no range instead of range open on both sides, which yields all data. --- cql3/restrictions/token_restriction.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cql3/restrictions/token_restriction.hh b/cql3/restrictions/token_restriction.hh index 0b8c8da021..4a634cefb1 100644 --- a/cql3/restrictions/token_restriction.hh +++ b/cql3/restrictions/token_restriction.hh @@ -99,7 +99,7 @@ public: if (start_token > end_token || (start_token == end_token && (!include_start || !include_end))) { - return {query::partition_range::make_open_ended_both_sides()}; + return {}; } typedef typename bounds_range_type::bound bound;