presto-hive/src/main/java/io/prestosql/plugin/hive/coercions/TypeCoercer.java/TypeCoercer/apply
class TypeCoercer:    @Override
    public Block apply(Block block)
    {
        BlockBuilder blockBuilder = toType.createBlockBuilder(null, block.getPositionCount());
        for (int i = 0; i < block.getPositionCount(); i++) {
            if (block.isNull(i)) {
                blockBuilder.appendNull();
                continue;
            }
            applyCoercedValue(blockBuilder, block, i);
        }
        return blockBuilder.build();
    }