Title: fix: Handle numpy ndarray in Array(String) materialization by SIDDHESH1564 · Pull Request #6327 · feast-dev/feast · GitHub
Open Graph Title: fix: Handle numpy ndarray in Array(String) materialization by SIDDHESH1564 · Pull Request #6327 · feast-dev/feast
X Title: fix: Handle numpy ndarray in Array(String) materialization by SIDDHESH1564 · Pull Request #6327 · feast-dev/feast
Description: 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.
Open Graph Description: 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 deseri...
X Description: 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 deseri...
Opengraph URL: https://github.com/feast-dev/feast/pull/6327
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:03f28ccc-7e9a-3168-e158-268f7181b8d7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C5CE:165D8F:2979AF:395F5B:6A4FC087 |
| html-safe-nonce | fc05d0c85b7fccff55a7360eb84b64b51e65239f01abbfad54b4f9153e4c2791 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUNFOjE2NUQ4RjoyOTc5QUY6Mzk1RjVCOjZBNEZDMDg3IiwidmlzaXRvcl9pZCI6IjE2NTIyODExNDAzOTQ4MzYxMDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b13b392a8704416bb92a5bb62b886f5f494f022674c3d0d64d7cdefe61752ab3 |
| hovercard-subject-tag | pull_request:3580748785 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6327/files |
| twitter:image | https://avatars.githubusercontent.com/u/91747482?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/91747482?s=400&v=4 |
| og:image:alt | 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 deseri... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d8f8209b188a80e19a6957836ab9229715797be5db1a04163963c674ccc33f6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ea848e83cf3bf3613dd7b13d52965a684fd23ec5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width