arrow-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Micah Kornfield <emkornfi...@gmail.com>
Subject Re: [Java JDBC adapter] non-nullable fields?
Date Wed, 05 May 2021 05:41:51 GMT
I would need to look further, but I thought we handled null vs not null.
At least I thought we had specialized conversion code to avoid branches.
If this isn't the case it seems reasonable to contribute a path.

On Tue, May 4, 2021 at 3:39 AM Joris Peeters <joris.mg.peeters@gmail.com>
wrote:

> I'm looking to use the Java JDBC adapter for loading tables from SQL
> Server into Arrow record batches.
>
> At first glance the Arrow JDBC adapter seems to work well but, unless I'm
> mistaken, it simply makes every vector nullable, irrespective of whether
> the corresponding SQL column is nullable or not.
>
> I think the line
>
> final FieldType fieldType = new FieldType(true, arrowType, /* dictionary
> encoding */ null, metadata);
>
> in
> https://github.com/apache/arrow/blob/master/java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrowUtils.java#L158
> might be the cause here.
>
> Is my interpretation correct, or am I missing a setting of sorts? If
> indeed correct, is there a fundamental reason the NULL-ness is not
> transferred, or is this something I could contribute in a PR? (which I'd be
> happy to) I guess it's just a matter of inspecting the result metadata.
>
> Cheers,
> -J
>

Mime
View raw message