@Test
public void testQuery() {

  Parser<Relation> parser = RelationParser.query(ExpressionParser.NUMBER, ExpressionParser.NUMBER, TABLE);
  TerminalParserTest.assertParser(parser, "select 1 from t",
      new Select(false, 
          Arrays.asList(new Projection(ExpressionParserTest.number(1), null)),
          Arrays.asList(table("t")),
          null, null, null));
  TerminalParserTest.assertParser(parser, "select 1 from a union select distinct 2 from b",
      new UnionRelation(
          new Select(false, 
              Arrays.asList(new Projection(ExpressionParserTest.number(1), null)),
              Arrays.asList(table("a")),
              null, null, null),
          false,
           new Select(true, 
              Arrays.asList(new Projection(ExpressionParserTest.number(2), null)),
              Arrays.asList(table("b")),
              null, null, null)));
}