AbstractType<?> keyType = DatabaseDescriptor.getCFMetaData(keyspace,
select.getColumnFamily()).getKeyValidator();
ByteBuffer startKey = (select.getKeyStart() != null) ? select.getKeyStart().getByteBuffer(keyType) : (new Term()).getByteBuffer();
ByteBuffer finishKey = (select.getKeyFinish() != null) ? select.getKeyFinish().getByteBuffer(keyType) : (new Term()).getByteBuffer();
IPartitioner<?> p = StorageService.getPartitioner();
AbstractBounds bounds = new Bounds(p.getToken(startKey), p.getToken(finishKey));
CFMetaData metadata = validateColumnFamily(keyspace, select.getColumnFamily(), false);
AbstractType<?> comparator = metadata.getComparatorFor(null);
// XXX: Our use of Thrift structs internally makes me Sad. :(
SlicePredicate thriftSlicePredicate = slicePredicateFromSelect(select, comparator);