presto-ml/src/main/java/io/prestosql/plugin/ml/MLFeaturesFunctions.java/MLFeaturesFunctions/featuresHelper
class MLFeaturesFunctions:    private static Block featuresHelper(PageBuilder pageBuilder, double... features)
    {
        if (pageBuilder.isFull()) {
            pageBuilder.reset();
        }

        BlockBuilder mapBlockBuilder = pageBuilder.getBlockBuilder(0);
        BlockBuilder blockBuilder = mapBlockBuilder.beginBlockEntry();

        for (int i = 0; i < features.length; i++) {
            BigintType.BIGINT.writeLong(blockBuilder, i);
            DoubleType.DOUBLE.writeDouble(blockBuilder, features[i]);
        }

        mapBlockBuilder.closeEntry();
        pageBuilder.declarePosition();
        return mapBlockBuilder.getObject(mapBlockBuilder.getPositionCount() - 1, Block.class);
    }