Skip to content

Commit

Permalink
Fix / Handle data conformance for column containing all null values (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Traverse authored Mar 22, 2023
1 parent 3e0d1d6 commit 17b1e3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tracdap-runtime/python/src/tracdap/rt/_impl/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ def _coerce_vector(cls, vector: pa.Array, field: pa.Field, pandas_type=None) ->
if pa.types.is_null(vector.type):

if field.nullable:
return pa.array([], type=field.type, size=len(vector))
return pa.nulls(size=len(vector), type=field.type)
else:
raise _ex.EDataConformance(f"All null values in non-null field [{field.name}]")

Expand Down

0 comments on commit 17b1e3d

Please sign in to comment.