use of com.facebook.presto.spi.ConnectorTableLayoutResult in project presto by prestodb.
the class AccumuloMetadata method getTableLayouts.
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) {
AccumuloTableHandle tableHandle = (AccumuloTableHandle) table;
ConnectorTableLayout layout = new ConnectorTableLayout(new AccumuloTableLayoutHandle(tableHandle, constraint.getSummary()));
return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
use of com.facebook.presto.spi.ConnectorTableLayoutResult in project presto by prestodb.
the class HiveMetadata method getTableLayouts.
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle tableHandle, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) {
HiveTableHandle handle = (HiveTableHandle) tableHandle;
HivePartitionResult hivePartitionResult = partitionManager.getPartitions(metastore, tableHandle, constraint);
return ImmutableList.of(new ConnectorTableLayoutResult(getTableLayout(session, new HiveTableLayoutHandle(handle.getClientId(), ImmutableList.copyOf(hivePartitionResult.getPartitionColumns()), hivePartitionResult.getPartitions(), hivePartitionResult.getEnforcedConstraint(), hivePartitionResult.getBucketHandle())), hivePartitionResult.getUnenforcedConstraint()));
}
use of com.facebook.presto.spi.ConnectorTableLayoutResult in project presto by prestodb.
the class BlackHoleMetadata method getTableLayouts.
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle handle, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) {
BlackHoleTableHandle blackHoleHandle = (BlackHoleTableHandle) handle;
BlackHoleTableLayoutHandle layoutHandle = new BlackHoleTableLayoutHandle(blackHoleHandle.getSplitCount(), blackHoleHandle.getPagesPerSplit(), blackHoleHandle.getRowsPerPage(), blackHoleHandle.getFieldsLength(), blackHoleHandle.getPageProcessingDelay());
return ImmutableList.of(new ConnectorTableLayoutResult(getTableLayout(session, layoutHandle), TupleDomain.all()));
}
use of com.facebook.presto.spi.ConnectorTableLayoutResult in project presto by prestodb.
the class JdbcMetadata method getTableLayouts.
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) {
JdbcTableHandle tableHandle = (JdbcTableHandle) table;
ConnectorTableLayout layout = new ConnectorTableLayout(new JdbcTableLayoutHandle(tableHandle, constraint.getSummary()));
return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
use of com.facebook.presto.spi.ConnectorTableLayoutResult in project presto by prestodb.
the class JmxMetadata method getTableLayouts.
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) {
JmxTableHandle handle = (JmxTableHandle) table;
ConnectorTableLayout layout = new ConnectorTableLayout(new JmxTableLayoutHandle(handle, constraint.getSummary()));
return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
Aggregations