@Test
public void testValues()
{
assertStatement("VALUES ('a', 1, 2.2), ('b', 2, 3.3)",
new Query(
Optional.<With>absent(),
new Values(ImmutableList.of(
new Row(ImmutableList.<Expression>of(
new StringLiteral("a"),
new LongLiteral("1"),
new DoubleLiteral("2.2")
)),
new Row(ImmutableList.<Expression>of(
new StringLiteral("b"),
new LongLiteral("2"),
new DoubleLiteral("3.3")
))
)),
ImmutableList.<SortItem>of(),
Optional.<String>absent(),
Optional.<Approximate>absent()));
assertStatement("SELECT * FROM (VALUES ('a', 1, 2.2), ('b', 2, 3.3))",
new Query(
Optional.<With>absent(),
new QuerySpecification(
selectList(new AllColumns()),
ImmutableList.<Relation>of(new TableSubquery(
new Query(
Optional.<With>absent(),
new Values(ImmutableList.of(
new Row(ImmutableList.<Expression>of(
new StringLiteral("a"),
new LongLiteral("1"),