presto-main/src/main/java/io/prestosql/operator/scalar/CharacterStringCasts.java/CharacterStringCasts/varcharToCharCast
class CharacterStringCasts:    @ScalarOperator(OperatorType.CAST)
    @SqlType("char(y)")
    @LiteralParameters({"x", "y"})
    public static Slice varcharToCharCast(@LiteralParameter("y") Long y, @SqlType("varchar(x)") Slice slice)
    {
        return truncateToLengthAndTrimSpaces(slice, y.intValue());
    }