while (rightExpr != null)
{
if (rightExpr instanceof JoinExpression)
{
JoinExpression joinExpr = (JoinExpression)rightExpr;
JoinType joinType = joinExpr.getType();
String joinAlias = joinExpr.getAlias();
PrimaryExpression joinPrimExpr = joinExpr.getPrimaryExpression();
Iterator<String> iter = joinPrimExpr.getTuples().iterator();
String rootId = iter.next();