Search in sources :

Example 1 with RenameTable

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

the class TestSqlParser method testRenameTable.

@Test
public void testRenameTable() {
    assertStatement("ALTER TABLE a RENAME TO b", new RenameTable(QualifiedName.of("a"), QualifiedName.of("b"), false));
    assertStatement("ALTER TABLE IF EXISTS a RENAME TO b", new RenameTable(QualifiedName.of("a"), QualifiedName.of("b"), true));
}
Also used : RenameTable(com.facebook.presto.sql.tree.RenameTable) Test(org.testng.annotations.Test)

Aggregations

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