assertEquals("SELECT f.foo AS fo FROM (SELECT tbl.foo, tbl.bar, tbl.baz FROM sch.tbl) f", q.toSql());
}
public void testSelectEverythingFromSubQuery() throws Exception {
Query q = MetaModelHelper.parseQuery(dc, "SELECT * FROM (SELECT foo, bar FROM sch.tbl) f");
assertEquals("SELECT f.foo, f.bar FROM (SELECT tbl.foo, tbl.bar FROM sch.tbl) f", q.toSql());
}
public void testGetIndicesVanillaScenario() throws Exception {
QueryParser qp = new QueryParser(dc, "SELECT ... FROM ... BAR BAZ");
assertEquals("[0, 7]", Arrays.toString(qp.indexesOf("SELECT ", null)));