GeezerVison is showing github.com — fix: Handle numpy ndarray in Array(String) materialization by SIDDHESH1564 · Pull Request #6327 · feast-dev/feast
Conversation
SIDDHESH1564
commented
Apr 24, 2026
•
edited by devin-ai-integration
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
What this PR does / why we need it:
Materializing feature views that contain Array(String) columns using the Athena offline store fails with TypeError or ValueError.
Root cause:
Arrow/Athena deserializes array columns as numpy.ndarray (object dtype) instead of Python lists, which breaks assumptions in feast/type_map.py.
Issues observed:
_validate_collection_item_types: None elements inside ndarray fail strict type validation.
_convert_list_values_to_proto: Passing numpy.ndarray directly to protobuf constructors (e.g. StringList) raises TypeError. None elements are also invalid for protobuf repeated fields.
_convert_scalar_values_to_proto: pd.isnull(ndarray) returns an array of booleans; applying not raises ValueError ("truth value of an empty array is ambiguous").
Fix implemented:
- Convert
numpy.ndarray → Python list using .tolist() before proto conversion
- Replace
None elements with type-appropriate defaults:
"" (string), 0 (int), 0.0 (float), False (bool)
- Allow
None during intermediate validation in _validate_collection_item_types
Which issue(s) this PR fixes:
Fixes #6325
Checks
- I've made sure the tests are passing.
- My commits are signed off (
git commit -s)
- My PR title follows conventional commits format
Testing Strategy
- Unit tests
- Integration tests
- Manual tests
- Testing is not required for this change
Details:
Added TestNdarrayListConversion in test_type_map.py with regression coverage for:
- ndarray string/int/double/bool list conversions
- Replacement of
None elements with defaults
- Empty ndarray producing null
ProtoValue
- Mixed batch scenarios (populated array +
None + empty array)
Misc
Adds regression coverage to ensure stable handling of ndarray-backed array feature columns from Athena/Arrow going forward.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ntkathole
commented
Apr 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
SIDDHESH1564 reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.