Fix range queries with secondary indexes

patch by slebresne; reviewed by xedin for CASSANDRA-4257
This commit is contained in:
Sylvain Lebresne 2012-05-24 16:44:32 +02:00
parent f77cd11373
commit cbf0436181
2 changed files with 6 additions and 2 deletions

View File

@ -62,6 +62,7 @@
* Fix exception on colum metadata with non-string comparator (CASSANDRA-4269)
* Check for unknown/invalid compression options (CASSANDRA-4266)
* (cql3) Adds simple access to column timestamp and ttl (CASSANDRA-4217)
* (cql3) Fix range queries with secondary indexes (CASSANDRA-4257)
Merged from 1.0:
* Fix super columns bug where cache is not updated (CASSANDRA-4190)
* fix maxTimestamp to include row tombstones (CASSANDRA-4116)

View File

@ -546,8 +546,11 @@ public class SelectStatement implements CQLStatement
{
for (Bound b : Bound.values())
{
ByteBuffer value = restriction.bound(b).getByteBuffer(name.type, variables);
expressions.add(new IndexExpression(name.name.key, restriction.getIndexOperator(b), value));
if (restriction.bound(b) != null)
{
ByteBuffer value = restriction.bound(b).getByteBuffer(name.type, variables);
expressions.add(new IndexExpression(name.name.key, restriction.getIndexOperator(b), value));
}
}
}
}