if (select.getColumnRelations().size() > 0)
{
ColumnFamilyStore cfstore = Keyspace.open(keyspace).getColumnFamilyStore(select.getColumnFamily());
CellNameType comparator = cfstore.metadata.comparator;
AbstractType<?> at = comparator.asAbstractType();
SecondaryIndexManager idxManager = cfstore.indexManager;
for (Relation relation : select.getColumnRelations())
{
ByteBuffer name = relation.getEntity().getByteBuffer(at, variables);
if ((relation.operator() == RelationType.EQ) && idxManager.indexes(comparator.cellFromByteBuffer(name)))
return;
}
throw new InvalidRequestException("No indexed columns present in by-columns clause with \"equals\" operator");
}
}