use of io.prestosql.sql.tree.NodeLocation in project hetu-core by openlookeng.
the class TestSqlParser method testShowCache.
@Test
public void testShowCache() {
assertStatement("SHOW CACHE", new ShowCache(Optional.empty(), Optional.empty()));
assertStatement("SHOW CACHE a", new ShowCache(new NodeLocation(0, 0), QualifiedName.of("a")));
}
use of io.prestosql.sql.tree.NodeLocation in project hetu-core by openlookeng.
the class TestSqlParser method testCacheTable.
@Test
public void testCacheTable() {
assertStatement("CACHE TABLE foo WHERE a = b", new Cache(QualifiedName.of("foo"), Optional.of(new ComparisonExpression(ComparisonExpression.Operator.EQUAL, new Identifier("a"), new Identifier("b")))));
assertStatement("CACHE TABLE foo WHERE a = b", new Cache(new NodeLocation(0, 0), QualifiedName.of("foo"), Optional.of(new ComparisonExpression(ComparisonExpression.Operator.EQUAL, new Identifier("a"), new Identifier("b")))));
}
Aggregations