Merge branch 'cassandra-3.0' into cassandra-3.9

This commit is contained in:
Tyler Hobbs 2016-07-15 17:56:32 -05:00
commit 136f6b1c74
1 changed files with 9 additions and 4 deletions

View File

@ -282,12 +282,17 @@ public abstract class ReadResponse
// Pre-3.0, we didn't have a way to express exclusivity for non-composite comparators, so all slices were
// inclusive on both ends. If we have exclusive slice ends, we need to filter the results here.
UnfilteredRowIterator iterator;
if (!command.metadata().isCompound())
return ThriftResultsMerger.maybeWrap(
partition.unfilteredIterator(command.columnFilter(), filter.getSlices(command.metadata()), filter.isReversed()), command.nowInSec());
iterator = partition.unfilteredIterator(command.columnFilter(), filter.getSlices(command.metadata()), filter.isReversed());
else
iterator = partition.unfilteredIterator(command.columnFilter(), Slices.ALL, filter.isReversed());
return ThriftResultsMerger.maybeWrap(
partition.unfilteredIterator(command.columnFilter(), Slices.ALL, filter.isReversed()), command.nowInSec());
// Wrap results with a ThriftResultMerger only if they're intended for the thrift command.
if (command.isForThrift())
return ThriftResultsMerger.maybeWrap(iterator, command.nowInSec());
else
return iterator;
}
};
}