/** select e1 from pm1.g1 where e2 = any (select e2 from pm4.g1) */
@Test public void testCompareSubQuery1(){
String sql = "select e1 from pm1.g1 where e2 = any (select e2 from pm4.g1)"; //$NON-NLS-1$
Query outerQuery = (Query) this.helpResolveSubquery(sql, new String[0]);
helpCheckFrom(outerQuery, new String[] { "pm1.g1" }); //$NON-NLS-1$
helpCheckSelect(outerQuery, new String[] { "pm1.g1.e1" }); //$NON-NLS-1$
helpCheckElements(outerQuery.getSelect(),
new String[] { "pm1.g1.e1" }, //$NON-NLS-1$
new String[] { "pm1.g1.e1" } ); //$NON-NLS-1$
// helpCheckFrom(innerQuery, new String[] { "pm4.g1" });
// helpCheckSelect(innerQuery, new String[] { "pm4.g1.e2" });
// helpCheckElements(innerQuery.getSelect(),
// new String[] { "pm4.g1.e2" },
// new String[] { "pm4.g1.e2" } );
String sqlActual = "SELECT e1 FROM pm1.g1 WHERE e2 = ANY (SELECT e2 FROM pm4.g1)"; //$NON-NLS-1$
assertEquals("Resolved string form was incorrect ", sqlActual, outerQuery.toString()); //$NON-NLS-1$
}