Search in sources :

Example 1 with RefreshMaterializedView

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

the class TestSqlParser method testRefreshMaterializedView.

@Test
public void testRefreshMaterializedView() {
    assertStatement("REFRESH MATERIALIZED VIEW a WHERE p = 'x'", new RefreshMaterializedView(table(QualifiedName.of("a")), new ComparisonExpression(ComparisonExpression.Operator.EQUAL, new Identifier("p"), new StringLiteral("x"))));
    assertStatement("REFRESH MATERIALIZED VIEW a.b WHERE p = 'x'", new RefreshMaterializedView(table(QualifiedName.of("a", "b")), new ComparisonExpression(ComparisonExpression.Operator.EQUAL, new Identifier("p"), new StringLiteral("x"))));
}
Also used : QuantifiedComparisonExpression(com.facebook.presto.sql.tree.QuantifiedComparisonExpression) ComparisonExpression(com.facebook.presto.sql.tree.ComparisonExpression) Identifier(com.facebook.presto.sql.tree.Identifier) QueryUtil.quotedIdentifier(com.facebook.presto.sql.QueryUtil.quotedIdentifier) StringLiteral(com.facebook.presto.sql.tree.StringLiteral) RefreshMaterializedView(com.facebook.presto.sql.tree.RefreshMaterializedView) Test(org.testng.annotations.Test)

Aggregations

QueryUtil.quotedIdentifier (com.facebook.presto.sql.QueryUtil.quotedIdentifier)1 ComparisonExpression (com.facebook.presto.sql.tree.ComparisonExpression)1 Identifier (com.facebook.presto.sql.tree.Identifier)1 QuantifiedComparisonExpression (com.facebook.presto.sql.tree.QuantifiedComparisonExpression)1 RefreshMaterializedView (com.facebook.presto.sql.tree.RefreshMaterializedView)1 StringLiteral (com.facebook.presto.sql.tree.StringLiteral)1 Test (org.testng.annotations.Test)1