use of com.facebook.presto.spi.ConnectorTableLayoutHandle in project presto by prestodb.
the class AbstractTestHiveClient method getAllSplits.
private List<ConnectorSplit> getAllSplits(ConnectorTableHandle tableHandle, TupleDomain<ColumnHandle> tupleDomain) throws InterruptedException {
try (Transaction transaction = newTransaction()) {
ConnectorSession session = newSession();
ConnectorMetadata metadata = transaction.getMetadata();
List<ConnectorTableLayoutResult> tableLayoutResults = metadata.getTableLayouts(session, tableHandle, new Constraint<>(tupleDomain, bindings -> true), Optional.empty());
ConnectorTableLayoutHandle layoutHandle = getOnlyElement(tableLayoutResults).getTableLayout().getHandle();
return getAllSplits(splitManager.getSplits(transaction.getTransactionHandle(), session, layoutHandle));
}
}
Aggregations