presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/systemtables/ColumnRangesSystemTable.java/ColumnRangesSystemTable/pageSource
class ColumnRangesSystemTable:    @Override
    public ConnectorPageSource pageSource(ConnectorTransactionHandle transactionHandle, ConnectorSession session, TupleDomain<Integer> constraint)
    {
        String metadataSqlQuery = getColumnRangesMetadataSqlQuery(sourceTable, indexedRaptorColumns);
        List<Type> columnTypes = tableMetadata.getColumns().stream()
                .map(ColumnMetadata::getType)
                .collect(toImmutableList());

        PageListBuilder pageListBuilder = new PageListBuilder(columnTypes);

        try (Connection connection = dbi.open().getConnection();
                Statement statement = connection.createStatement();
                ResultSet resultSet = statement.executeQuery(metadataSqlQuery)) {
            if (resultSet.next()) {
                pageListBuilder.beginRow();
                for (int i = 0; i < columnTypes.size(); ++i) {
                    BlockBuilder blockBuilder = pageListBuilder.nextBlockBuilder();
                    Type columnType = columnTypes.get(i);
                    if (columnType.equals(BIGINT) || columnType.equals(DATE) || columnType.equals(TIMESTAMP)) {
                        long value = resultSet.getLong(i + 1);
                        if (!resultSet.wasNull()) {
                            columnType.writeLong(blockBuilder, value);
                        }
                        else {
                            blockBuilder.appendNull();
                        }
                    }
                    else if (columnType.equals(BOOLEAN)) {
                        boolean value = resultSet.getBoolean(i + 1);
                        if (!resultSet.wasNull()) {
                            BOOLEAN.writeBoolean(blockBuilder, value);
                        }
                        else {
                            blockBuilder.appendNull();
                        }
                    }
                    else {
                        throw new VerifyException("Unknown or unsupported column type: " + columnType);
                    }
                }
            }
        }
        catch (SQLException | DBIException e) {
            throw metadataError(e);
        }

        return new FixedPageSource(pageListBuilder.build());
    }