Skip to content

Fix inverted default_value logic in OnDemandFeatureView._construct_random_input #6008

@soooojinlee

Description

@soooojinlee

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions