feast-dev / feast-dev/feast

Fix inverted default_value logic in OnDemandFeatureView._construct_random_input

Open
#6,008 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.