use of com.airbnb.airpal.presto.Table in project airpal by airbnb.
the class QueryExecutionAuthorizerTest method testTableReferencesSelectStarSubquery.
@Test
public void testTableReferencesSelectStarSubquery() throws Exception {
Set<Table> tablesUsed = tablesUsedByQuery(TEST_SELECT_SUBQUERY, defaultConnector, defaultSchema);
Set<Table> tablesExpected = ImmutableSet.of(new Table(defaultConnector, defaultSchema, "users"), new Table(defaultConnector, "the_gibson", "users"));
assertEquals(tablesExpected, tablesUsed);
}
use of com.airbnb.airpal.presto.Table in project airpal by airbnb.
the class QueryExecutionAuthorizerTest method testTableReferencesReplaceView.
@Test
public void testTableReferencesReplaceView() throws Exception {
Set<Table> tablesUsed = tablesUsedByQuery(TEST_REPLACE_VIEW, defaultConnector, defaultSchema);
Set<Table> tablesExpected = ImmutableSet.of(new Table(defaultConnector, defaultSchema, "users"), new Table(defaultConnector, "the_gibson", "users"));
assertEquals(tablesExpected, tablesUsed);
}
use of com.airbnb.airpal.presto.Table in project airpal by airbnb.
the class QueryExecutionAuthorizerTest method testTableReferencesSelectUnion.
@Test
public void testTableReferencesSelectUnion() throws Exception {
Set<Table> tablesUsed = tablesUsedByQuery(TEST_ACCESS_PII_UNION_VIEW, defaultConnector, defaultSchema);
Set<Table> tablesExpected = ImmutableSet.of(new Table(defaultConnector, defaultSchema, "users"), new Table(defaultConnector, "the_gibson", "users"));
assertEquals(tablesExpected, tablesUsed);
}
Aggregations