Search in sources :

Example 1 with DropMaterializedView

use of com.facebook.presto.sql.tree.DropMaterializedView in project presto by prestodb.

the class TestSqlParser method testDropMaterializedView.

@Test
public void testDropMaterializedView() {
    assertStatement("DROP MATERIALIZED VIEW a", new DropMaterializedView(Optional.empty(), QualifiedName.of("a"), false));
    assertStatement("DROP MATERIALIZED VIEW a.b", new DropMaterializedView(Optional.empty(), QualifiedName.of("a", "b"), false));
    assertStatement("DROP MATERIALIZED VIEW a.b.c", new DropMaterializedView(Optional.empty(), QualifiedName.of("a", "b", "c"), false));
    assertStatement("DROP MATERIALIZED VIEW IF EXISTS a", new DropMaterializedView(Optional.empty(), QualifiedName.of("a"), true));
    assertStatement("DROP MATERIALIZED VIEW IF EXISTS a.b", new DropMaterializedView(Optional.empty(), QualifiedName.of("a", "b"), true));
    assertStatement("DROP MATERIALIZED VIEW IF EXISTS a.b.c", new DropMaterializedView(Optional.empty(), QualifiedName.of("a", "b", "c"), true));
}
Also used : DropMaterializedView(com.facebook.presto.sql.tree.DropMaterializedView) Test(org.testng.annotations.Test)

Aggregations

DropMaterializedView (com.facebook.presto.sql.tree.DropMaterializedView)1 Test (org.testng.annotations.Test)1