Join join = (Join) joins.iterator().next();
assertEquals(Arrays.asList(new Attribute[]{bar_col1, bar_col2}),
join.attributes1());
assertEquals(Arrays.asList(new Attribute[]{foo_col1, foo_col2}),
join.attributes2());
assertEquals(foo_col1, join.equalAttribute(bar_col1));
}
public void testParseJoinTwoConditionsOnDifferentTables() {
Set<Join> joins = SQL.parseJoins(Arrays.asList(new String[]{
"foo.col1 <= bar.col1", "foo.col2 => baz.col1", "foo.col2 = bar.col1"}));