Fix inverted default_value logic in OnDemandFeatureView._construct_random_input
Open
kind/bug
priority/p2
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 1.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 15
Description
In _construct_random_input(), the default_value fallback logic is inverted:
```
# current (wrong)
default_value = None if not singleton else [None]
```
When `singleton=True`, the fallback should be scalar None, but it gets [None] (list). When `singleton=False`, it should be [None], but it gets None. This can break UDF schema inference for feature types not present in sample_values.
Found during review of #5951.
Contributor guide
Assessment
This issue has not been assessed yet.