}
@Override
public ConnectorPageSource createPageSource(ConnectorSplit split, List<ConnectorColumnHandle> columns)
{
InternalTable table = getInternalTable(split, columns);
List<Integer> channels = new ArrayList<>();
for (ConnectorColumnHandle column : columns) {
String columnName = checkType(column, InformationSchemaColumnHandle.class, "column").getColumnName();
int columnIndex = table.getColumnIndex(columnName);
channels.add(columnIndex);
}
ImmutableList.Builder<Page> pages = ImmutableList.builder();
for (Page page : table.getPages()) {
Block[] blocks = new Block[channels.size()];
for (int index = 0; index < blocks.length; index++) {
blocks[index] = page.getBlock(channels.get(index));
}
pages.add(new Page(page.getPositionCount(), blocks));