assertEquals("FROM beer-sample KEYS [\"key1\",\"key2\"]", query.toString());
}
@Test
public void testUnnest() {
Query query = new DefaultFromPath(null)
.from("tutorial").as("contact")
.unnest("contact.children")
.where(x("contact.fname").eq(s("Dave")));
assertEquals("FROM tutorial AS contact UNNEST contact.children WHERE contact.fname = \"Dave\"",
query.toString());
query = new DefaultFromPath(null)
.from("default")
.leftOuterUnnest("foo.bar")
.leftUnnest("bar.baz")
.innerUnnest("x.y");
assertEquals("FROM default LEFT OUTER UNNEST foo.bar LEFT UNNEST bar.baz INNER UNNEST x.y", query.toString());
}