use of com.facebook.presto.spi.SplitContext in project presto by prestodb.
the class TestDynamicPruning method testDynamicPartitionPruning.
@Test
public void testDynamicPartitionPruning() {
HiveClientConfig config = new HiveClientConfig();
MetastoreClientConfig metastoreClientConfig = new MetastoreClientConfig();
HiveTransactionHandle transaction = new HiveTransactionHandle();
try (TempFile tempFile = new TempFile()) {
ConnectorPageSource emptyPageSource = createTestingPageSource(transaction, config, new SplitContext(false, getToSkipTupleDomain()), metastoreClientConfig, tempFile.file());
assertEquals(emptyPageSource.getClass(), HiveEmptySplitPageSource.class);
ConnectorPageSource nonEmptyPageSource = createTestingPageSource(transaction, config, new SplitContext(false, getToKeepTupleDomain()), metastoreClientConfig, tempFile.file());
assertEquals(nonEmptyPageSource.getClass(), HivePageSource.class);
} catch (IOException e) {
e.printStackTrace();
fail();
}
}
Aggregations