final CompositeType indexComparator = (CompositeType)index.getIndexCfs().getComparator();
final ByteBuffer startPrefix;
if (startKey.remaining() > 0)
{
CompositeType.Builder builder = indexComparator.builder().add(startKey);
// For names filter, we have no choice but to query from the beginning of the key. This can be highly inefficient however.
if (filter.originalFilter() instanceof SliceQueryFilter)
{
ByteBuffer[] components = baseComparator.split(((SliceQueryFilter)filter.originalFilter()).start());
for (int i = 0; i < Math.min(prefixSize, components.length); ++i)