use of org.teiid.query.sql.lang.Query in project teiid by teiid.
the class TestOrderByRewrite method testNumberedOrderBy3.
@Test
public void testNumberedOrderBy3() throws Exception {
// $NON-NLS-1$
Query resolvedQuery = (Query) getCommand("SELECT * FROM pm1.g1 ORDER BY 1");
helpCheckElements(resolvedQuery.getOrderBy(), // $NON-NLS-1$
new String[] { "pm1.g1.e1" }, // $NON-NLS-1$
new String[] { "pm1.g1.e1" });
}
use of org.teiid.query.sql.lang.Query in project teiid by teiid.
the class TestOrderByRewrite method testDefect10729a.
/**
* partially-qualified ORDER BY's with ambiguous short group names
*/
@Test
public void testDefect10729a() throws Exception {
// $NON-NLS-1$
Query resolvedQuery = (Query) getCommand("SELECT pm1.g1.e1 FROM pm1.g1 ORDER BY e1");
helpCheckElements(resolvedQuery.getOrderBy(), // $NON-NLS-1$
new String[] { "pm1.g1.e1" }, // $NON-NLS-1$
new String[] { "pm1.g1.e1" });
}
use of org.teiid.query.sql.lang.Query in project teiid by teiid.
the class TestOrderByRewrite method testNumberedOrderBy2.
@Test
public void testNumberedOrderBy2() throws Exception {
// $NON-NLS-1$
Query resolvedQuery = (Query) getCommand("SELECT * FROM pm1.g1 ORDER BY 1");
helpCheckElements(resolvedQuery.getOrderBy(), // $NON-NLS-1$
new String[] { "pm1.g1.e1" }, // $NON-NLS-1$
new String[] { "pm1.g1.e1" });
}
use of org.teiid.query.sql.lang.Query in project teiid by teiid.
the class TestOrderByRewrite method testOrderBy6.
@Test
public void testOrderBy6() throws Exception {
// $NON-NLS-1$
Query resolvedQuery = (Query) getCommand("SELECT e1 FROM pm1.g1 AS x ORDER BY e1");
helpCheckElements(resolvedQuery.getOrderBy(), // $NON-NLS-1$
new String[] { "x.e1" }, // $NON-NLS-1$
new String[] { "pm1.g1.e1" });
}
use of org.teiid.query.sql.lang.Query in project teiid by teiid.
the class TestOrderByRewrite method testOrderBy12.
@Test
public void testOrderBy12() throws Exception {
// $NON-NLS-1$
Query resolvedQuery = (Query) getCommand("SELECT a.e1, pm1.g1.e1 FROM pm1.g1 AS a, pm1.g1 ORDER BY a.e1");
helpCheckElements(resolvedQuery.getOrderBy(), // $NON-NLS-1$
new String[] { "a.e1" }, // $NON-NLS-1$
new String[] { "pm1.g1.e1" });
}
Aggregations