@@ -0,0 +1,1224 @@
+package com.appspot.relaxe.expr;%0A%0Apublic class ScalarSubquery%0A%09implements ValueExpression %7B%0A%0A%09/**%0A%09 * %0A%09 */%0A%09private static final long serialVersionUID = 2242762357678292139L;%0A%09%09%0A%09private QueryExpression query;%0A%09%0A%09public ScalarSubquery(QueryExpression query) %7B%09%09%0A%09%09super();%0A%09%09%0A%09%09if (query == null) %7B%0A%09%09%09throw new NullPointerException(%22query%22);%0A%09%09%7D%0A%09%09%0A%09%09Select sc = query.getTableExpr().getSelect();%0A%09%09%0A%09%09if (sc.getColumnCount() != 1) %7B%0A%09%09%09throw new IllegalArgumentException(%22Invalid column count: %22 + sc.getColumnCount());%0A%09%09%7D%0A%09%09%0A%09%09this.query = query;%0A%09%7D%0A%0A%09@Override%0A%09public void traverse(VisitContext vc, ElementVisitor v) %7B%0A%09%09v.start(vc, this);%09%09%0A%09%09Symbol.PAREN_LEFT.traverse(vc, v);%0A%09%09this.query.traverse(vc, v);%0A%09%09Symbol.PAREN_RIGHT.traverse(vc, v);%09%09%0A%09%09v.end(this);%0A%09%7D%0A%0A%0A%0A%09@Override%0A%09public String getTerminalSymbol() %7B%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09public ValueExpression asValueExpression() %7B%0A%09%09return this;%0A%09%7D%0A%0A%09@Override%0A%09public Element asNullSpecification() %7B%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09public Element asDefaultSpecification() %7B%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09public int getType() %7B%0A%09%09return 0;%0A%09%7D%0A%0A%09@Override%0A%09public Identifier getColumnName() %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D%0A%0A%09%0A%09%0A%7D%0A

Add scalar subquery expression