◐ Shell
clean mode source ↗

fix: handle empty numpy arrays in scalar proto conversion during materialization by psaikaushik · Pull Request #6267 · feast-dev/feast

@psaikaushik

When a scalar feature column contains an empty numpy array (np.array([])),
pd.isnull() returns an array instead of a scalar bool. Applying Python's
`not` operator to that array raises:

    ValueError: The truth value of an empty array is ambiguous.

This adds a safe null-check helper (is_scalar_null) that handles
array-like values before falling through to pd.isnull(). Empty arrays
are treated as null values, consistent with None and np.nan.

The helper is used in _convert_scalar_values_to_proto to replace the
bare `pd.isnull()` calls that crash on array inputs.

Closes feast-dev#6255