class JdbcTypeConverter {

    public static int getIntegerSqlType(TypeInformation<?> type) {
        if (MAP_FLINK_TYPE_TO_INDEX.containsKey(type)) {
            return MAP_FLINK_TYPE_TO_INDEX.get(type);
        } else if (type instanceof ObjectArrayTypeInfo || type instanceof PrimitiveArrayTypeInfo) {
            return Types.ARRAY;
        } else {
            throw new IllegalArgumentException("Unsupported type: " + type);
        }
    }

}