{
// Testing for the bug of #6748
String keyspace = "cql_keyspace";
String table = "table2";
ColumnFamilyStore cfs = Keyspace.open(keyspace).getColumnFamilyStore(table);
CompositeType ct = (CompositeType)cfs.metadata.comparator;
// Insert rows but with a tombstone as last cell
for (int i = 0; i < 5; i++)
processInternal(String.format("INSERT INTO %s.%s (k, c, v) VALUES ('k%d', 'c%d', null)", keyspace, table, 0, i));
SliceQueryFilter filter = new SliceQueryFilter(ColumnSlice.ALL_COLUMNS_ARRAY, false, 100);
QueryPager pager = QueryPagers.localPager(new SliceFromReadCommand(keyspace, bytes("k0"), table, 0, filter));
for (int i = 0; i < 5; i++)
{
List<Row> page = pager.fetchPage(1);
assertEquals(toString(page), 1, page.size());
// The only live cell we should have each time is the row marker
assertRow(page.get(0), "k0", ct.decompose("c" + i, ""));
}
}