This issue is for TileDB-SOMA Python only. The R situation will be triaged separately, and tasked out (from #2858) if necessary.
Tracking
In tiledbsoma.DataFrame.create, and likewise tiledbsoma.Experiment.add_new_dataframe, the user brings their own Arrow schema. Our task is to respect that as much as possible, and translate that into a TileDB core schema. One of the things to be mapped across is attribute-level nullability.
Unfortunately, there are two different ways for attributes to be marked nullable:
(1) Flags on the attribute
(2) Metadata for the attribute
Context
Split out from #2858.
This issue is for TileDB-SOMA Python only. The R situation will be triaged separately, and tasked out (from #2858) if necessary.
Tracking
In
tiledbsoma.DataFrame.create
, and likewisetiledbsoma.Experiment.add_new_dataframe
, the user brings their own Arrow schema. Our task is to respect that as much as possible, and translate that into a TileDB core schema. One of the things to be mapped across is attribute-level nullability.Unfortunately, there are two different ways for attributes to be marked nullable:
(1) Flags on the attribute (2) Metadata for the attribute
Python example:
Output:
Note that
pa.field
defaults to nullable: here, fieldsa
andc
are both nullable; onlyb
is not. This is indicated byb: int32 not null
.Bug
In our current implementation we make attributes non-nullable only if the metadata option is set.
Fix