You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
infer_rel_schema raises AttributeError on an unbound column: the nullability helpers assume every Type.kind has a nullability field #276
_field_nullability (src/substrait/type_inference.py:624) and _with_field_nullability (type_inference.py:630) both do getattr(t, kind).nullability after only checking that t has a kind. Type.Unbound is the one Type.kind oneof variant with no nullability field, so both raise on it.
Per spec v0.99.0 site/docs/types/type_classes.md, the unbound type "may appear wherever a concrete type would normally appear, for example as a field type within ReadRel.base_schema", and it "carries no nullability and accepts no parameters; those properties are determined when it is bound to a concrete type". So an unbound field should pass through nullability derivation untouched rather than crash.
Reached today through _set_output_struct, i.e. any SetRel over a partially bound input.
File "src/substrait/type_inference.py", line 627, in _field_nullability
return getattr(t, kind).nullability if kind else stt.Type.NULLABILITY_UNSPECIFIED
AttributeError: nullability
Guarding both helpers on kind != "unbound" covers it. Note #272 introduces a second caller of _with_field_nullability (join null-padding), which reaches the same gap for LEFT / RIGHT / OUTER / *_SINGLE joins; that half is raised on the PR. The set-operation nullability rules themselves came from #219.
🤖 Filed with AI assistance as a follow-up to review of #272.
Activity