use of io.prestosql.sql.tree.Delete in project hetu-core by openlookeng.
the class TestSqlParser method testDelete.
@Test
public void testDelete() {
assertStatement("DELETE FROM t", new Delete(table(QualifiedName.of("t")), Optional.empty()));
assertStatement("DELETE FROM \"awesome table\"", new Delete(table(QualifiedName.of("awesome table")), Optional.empty()));
assertStatement("DELETE FROM t WHERE a = b", new Delete(table(QualifiedName.of("t")), Optional.of(new ComparisonExpression(ComparisonExpression.Operator.EQUAL, new Identifier("a"), new Identifier("b")))));
}
Aggregations