Skip to content

Commit 493d572

Browse files
committed
fix: correct inverted default_value logic in _construct_random_input
When singleton=True, the fallback should be scalar None, not [None]. When singleton=False, the fallback should be [None], not None. The condition was inverted, causing incorrect UDF schema inference for feature types not present in sample_values. Fixes #6008 Signed-off-by: Br1an67 <932039080@qq.com>
1 parent 4dad460 commit 493d572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/python/feast/on_demand_feature_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ def _construct_random_input(
10111011
sample_values = {k: v[0] for k, v in sample_values.items()}
10121012

10131013
# Default value for missing types
1014-
default_value = None if not singleton else [None]
1014+
default_value = [None] if not singleton else None
10151015

10161016
feature_dict = {}
10171017

0 commit comments

Comments
 (0)