attr = (StateAttribute) grandChild.getState();
} else {
attr = (StateAttribute) root.getChild(ChildSide.LEFT).getState();
}
DboColumnMeta info = attr.getColumnInfo();
ViewInfoImpl viewInfo = attr.getViewInfo();
ScanInfo scanInfo = createScanInfo(viewInfo, info);
alreadyJoinedViews.add(viewInfo);
if(info.isIndexed()) {
//its an indexed column
return processIndexColumn(root, scanInfo, viewInfo, info);
} else if (info.getOwner().getIdColumnMeta().getColumnName().equals(info.getColumnName())) {
//its a non-indexed primary key
AbstractCursor<KeyValue<Row>> scan;
if(root.getType() == NoSqlLexer.EQ) {
byte[] data = retrieveValue(info, root.getChild(ChildSide.RIGHT));
byte[] virtualkey = info.getOwner().getIdColumnMeta().formVirtRowKey(data);
List<byte[]> keyList= new ArrayList<byte[]>();
keyList.add(virtualkey);
scan = session.find(info.getOwner(), keyList, false, true, batchSize);
} else
throw new UnsupportedOperationException("Other operations not supported yet for Primary Key. Use @NoSQLIndexed for Primary Key.type="+root.getType());
DirectCursor<IndexColumnInfo> processKeys = processKeysforPK(viewInfo, info, scan);
return processKeys;
} else
throw new IllegalArgumentException("You cannot have '"+info.getColumnName() + "' in your sql query since "+info.getColumnName()+" is neither a Primary Key nor a column with @Index annotation on the field in the entity");
}