private static ColumnMapper<?> create(Type type, ConfigRegistry config) {
        final ColumnMapper<?> mapper = config.get(ColumnMappers.class).findFor(
                GenericTypes.findGenericParameter(type, Optional.class)
                    .orElseThrow(() -> new NoSuchMapperException("No mapper for raw Optional type")))
                .orElseThrow(() -> new NoSuchMapperException("No column mapper for type " + type + ", nested in Optional"));
        return (r, i, ctx) -> Optional.ofNullable(mapper.map(r, i, ctx));
    }
Column mapper factory which knows how to map Optionals:
<ul>
    <li>{@link Optional}</li>
    <li>{@link OptionalInt}</li>
    <li>{@link OptionalLong}</li>
    <li>{@link OptionalDouble}</li>
</ul>
core/src/main/java/org/jdbi/v3/core/mapper/OptionalColumnMapperFactory.java