use of com.airbnb.airpal.presto.Table in project airpal by airbnb.
the class QueryExecutionAuthorizerTest method testTableReferencesRenameTable2.
@Test
public void testTableReferencesRenameTable2() throws Exception {
Set<Table> tablesUsed = tablesUsedByQuery(TEST_ALTER_TABLE2, defaultConnector, defaultSchema);
Set<Table> tablesExpected = ImmutableSet.of(new Table(defaultConnector, "default", "users"), new Table(defaultConnector, "the_gibson", "users_pii"));
assertEquals(tablesExpected, tablesUsed);
}
use of com.airbnb.airpal.presto.Table in project airpal by airbnb.
the class QueryExecutionAuthorizerTest method testTableReferencesDropView.
@Test
public void testTableReferencesDropView() throws Exception {
Set<Table> tablesUsed = tablesUsedByQuery(TEST_DROP_VIEW, defaultConnector, defaultSchema);
Set<Table> tablesExpected = ImmutableSet.of(new Table(defaultConnector, defaultSchema, "my_view"));
assertEquals(tablesExpected, tablesUsed);
}
use of com.airbnb.airpal.presto.Table in project airpal by airbnb.
the class QueryExecutionAuthorizerTest method testTableReferencesDropTable.
@Test
public void testTableReferencesDropTable() throws Exception {
Set<Table> tablesUsed = tablesUsedByQuery(TEST_DROP_TABLE, defaultConnector, defaultSchema);
Set<Table> tablesExpected = ImmutableSet.of(new Table(defaultConnector, defaultSchema, "my_table"));
assertEquals(tablesExpected, tablesUsed);
}
use of com.airbnb.airpal.presto.Table in project airpal by airbnb.
the class QueryExecutionAuthorizerTest method testTableReferencesRenameTable.
@Test
public void testTableReferencesRenameTable() throws Exception {
Set<Table> tablesUsed = tablesUsedByQuery(TEST_ALTER_TABLE, defaultConnector, defaultSchema);
Set<Table> tablesExpected = ImmutableSet.of(new Table(defaultConnector, "default", "users"), new Table(defaultConnector, "the_gibson", "users_pii"));
assertEquals(tablesExpected, tablesUsed);
}
use of com.airbnb.airpal.presto.Table in project airpal by airbnb.
the class QueryExecutionAuthorizerTest method testTableReferencesJoinAlias.
@Test
public void testTableReferencesJoinAlias() throws Exception {
Set<Table> tablesUsed = tablesUsedByQuery(TEST_SELECT_ALIAS, defaultConnector, defaultSchema);
Set<Table> tablesExpected = ImmutableSet.of(new Table(defaultConnector, defaultSchema, "users"), new Table(defaultConnector, defaultSchema, "users_pii"));
assertEquals(tablesExpected, tablesUsed);
}
Aggregations