}
private DirectCursor<IndexColumnInfo> processRangeExpression(ExpressionNode root, Set<ViewInfo> alreadyJoinedViews) {
StateAttribute attr;
if(root.getType() == NoSqlLexer.BETWEEN) {
ExpressionNode grandChild = root.getChild(ChildSide.LEFT).getChild(ChildSide.LEFT);
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);
AbstractCursor<IndexColumn> scan;
if(root.getType() == NoSqlLexer.EQ) {
byte[] data = retrieveValue(info, root.getChild(ChildSide.RIGHT));
Key key = new Key(data, true);
scan = session.scanIndex(scanInfo, key, key, batchSize);
} else if(root.getType() == NoSqlLexer.GT
|| root.getType() == NoSqlLexer.GE
|| root.getType() == NoSqlLexer.LT
|| root.getType() == NoSqlLexer.LE
|| root.isInBetweenExpression()) {
Key from = null;
Key to = null;
if(root.isInBetweenExpression()) {
ExpressionNode node = root.getGreaterThan();
ExpressionNode node2 = root.getLessThan();
from = createLeftKey(node, info);
to = createRightKey(node2, info);
} else if(root.getType() == NoSqlLexer.GT
|| root.getType() == NoSqlLexer.GE) {
from = createLeftKey(root, info);