use of org.teiid.language.NamedTable in project teiid by teiid.
the class TestCollectorVisitor method test1.
@Test
public void test1() {
// $NON-NLS-1$
NamedTable g1 = new NamedTable("g1", null, null);
// $NON-NLS-1$
ColumnReference e1 = new ColumnReference(g1, "e1", null, String.class);
// $NON-NLS-1$ //$NON-NLS-2$
helpTestElementsUsedByGroups(e1, new String[] { "g1.e1" }, new String[] { "g1" });
}
use of org.teiid.language.NamedTable in project teiid by teiid.
the class TestCollectorVisitor method example1.
public LanguageObject example1() {
// $NON-NLS-1$
NamedTable g = new NamedTable("g1", null, null);
List symbols = new ArrayList();
// $NON-NLS-1$
symbols.add(new ColumnReference(g, "e1", null, String.class));
// $NON-NLS-1$ //$NON-NLS-2$
Function function = new Function("length", Arrays.asList(new ColumnReference(g, "e2", null, String.class)), Integer.class);
symbols.add(function);
List groups = new ArrayList();
groups.add(g);
Select q = new Select(symbols, false, groups, null, null, null, null);
return q;
}
use of org.teiid.language.NamedTable in project teiid by teiid.
the class TestCollectorVisitor method test2.
@Test
public void test2() {
// $NON-NLS-1$
NamedTable g1 = new NamedTable("g1", null, null);
// $NON-NLS-1$
ColumnReference e1 = new ColumnReference(g1, "e1", null, String.class);
// $NON-NLS-1$
ColumnReference e2 = new ColumnReference(g1, "e2", null, String.class);
Comparison cc = new Comparison(e1, e2, Operator.EQ);
// $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
helpTestElementsUsedByGroups(cc, new String[] { "g1.e1", "g1.e2" }, new String[] { "g1" });
}
Aggregations