René's URL Explorer Experiment


Title: fix(spark): Replace mapInArrow with foreachPartition for materialization by abhijeet-dhumal · Pull Request #6370 · feast-dev/feast · GitHub

Open Graph Title: fix(spark): Replace mapInArrow with foreachPartition for materialization by abhijeet-dhumal · Pull Request #6370 · feast-dev/feast

X Title: fix(spark): Replace mapInArrow with foreachPartition for materialization by abhijeet-dhumal · Pull Request #6370 · feast-dev/feast

Description: What this PR does / why we need it Fixes materialization failures when using BatchFeatureView + SparkComputeEngine with vector stores and Spark 3.5+. 1. Replace mapInArrow with foreachPartition (main fix) Spark 3.5 inserts WindowGroupLimitExec upstream of MapInArrowExec when UDFs use Window operations, routing the Python worker through the wrong serialiser: AttributeError: 'list' object has no attribute 'dtype' foreachPartition uses pickle — no Arrow UDF bridge — so the mismatch cannot occur. 2. Re-apply session configs on reuse SparkSession.getOrCreate() silently drops new spark.sql.* / spark.hadoop.* overrides when a session already exists, causing S3 access failures. Now explicitly re-applied after getOrCreate(). 3. Fix map_in_pandas dummy yield Changed pd.DataFrame([pd.Series(range(1, 2))]) → pd.DataFrame({"status": [0]}) to match the declared return schema. 4. Remove redundant _apply_bfv_transformations Superseded by SparkFeatureBuilder DAG pipeline (#6357) which handles BFV transformations for both materialization and historical retrieval. 5. Add spark_embed utility Helper for @batch_feature_view UDFs that generate embeddings via SentenceTransformer. Uses localCheckpoint(eager=True) to sever Python lineage before downstream writes. Which issue(s) this PR fixes Fixes BatchFeatureView materialization with vector stores (Milvus/Redis), Spark 3.5+ Window operations, and K8s-mode session config drift. Testing Strategy Unit tests: session config forwarding, map_in_pandas schema, empty partition handling, S3 event log dir Manual: Materialized BatchFeatureView with PySpark + RAPIDS GPU on K8s (4 executors), 26M+ keys to Redis Checks Tests passing Commits signed off PR title follows conventional commits

Open Graph Description: What this PR does / why we need it Fixes materialization failures when using BatchFeatureView + SparkComputeEngine with vector stores and Spark 3.5+. 1. Replace mapInArrow with foreachPartition (ma...

X Description: What this PR does / why we need it Fixes materialization failures when using BatchFeatureView + SparkComputeEngine with vector stores and Spark 3.5+. 1. Replace mapInArrow with foreachPartition (ma...

Opengraph URL: https://github.com/feast-dev/feast/pull/6370

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:85828dbf-6c66-0b20-70de-7d6209773862
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD81A:16195D:2A1E4A3:3A2DA0E:6A4F552A
html-safe-nonce1a34de87c1fa134a707fa777d44d50a6d153b9b996916cdf52e6ee7d963469b5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODFBOjE2MTk1RDoyQTFFNEEzOjNBMkRBMEU6NkE0RjU1MkEiLCJ2aXNpdG9yX2lkIjoiNzUyODg5OTgyOTk2MDc1ODU3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6f210607fad8730cf9520ae29561422040765139c0921d21286adaa27ac0b0d2
hovercard-subject-tagpull_request:3634755682
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6370/files
twitter:imagehttps://avatars.githubusercontent.com/u/84722973?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/84722973?s=400&v=4
og:image:altWhat this PR does / why we need it Fixes materialization failures when using BatchFeatureView + SparkComputeEngine with vector stores and Spark 3.5+. 1. Replace mapInArrow with foreachPartition (ma...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/feast-dev/feast git https://github.com/feast-dev/feast.git
octolytics-dimension-user_id57027613
octolytics-dimension-user_loginfeast-dev
octolytics-dimension-repository_id161133770
octolytics-dimension-repository_nwofeast-dev/feast
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id161133770
octolytics-dimension-repository_network_root_nwofeast-dev/feast
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4b249b445842943ed31549e027f57a8ade9881ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/feast-dev/feast/pull/6370/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fpull%2F6370%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fpull%2F6370%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=feast-dev%2Ffeast
Reloadhttps://github.com/feast-dev/feast/pull/6370/files
Reloadhttps://github.com/feast-dev/feast/pull/6370/files
Reloadhttps://github.com/feast-dev/feast/pull/6370/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/6370/files
feast-dev https://github.com/feast-dev
feasthttps://github.com/feast-dev/feast
Notifications https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Fork 1.4k https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Star 7.1k https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Code https://github.com/feast-dev/feast
Issues 212 https://github.com/feast-dev/feast/issues
Pull requests 173 https://github.com/feast-dev/feast/pulls
Discussions https://github.com/feast-dev/feast/discussions
Actions https://github.com/feast-dev/feast/actions
Security and quality 1 https://github.com/feast-dev/feast/security
Insights https://github.com/feast-dev/feast/pulse
Code https://github.com/feast-dev/feast
Issues https://github.com/feast-dev/feast/issues
Pull requests https://github.com/feast-dev/feast/pulls
Discussions https://github.com/feast-dev/feast/discussions
Actions https://github.com/feast-dev/feast/actions
Security and quality https://github.com/feast-dev/feast/security
Insights https://github.com/feast-dev/feast/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ffeast-dev%2Ffeast%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ffeast-dev%2Ffeast%2Fissues%2Fnew%2Fchoose
abhijeet-dhumalhttps://github.com/abhijeet-dhumal
feast-dev:masterhttps://github.com/feast-dev/feast/tree/master
abhijeet-dhumal:fix/spark-vector-store-materializationhttps://github.com/abhijeet-dhumal/feast/tree/fix/spark-vector-store-materialization
Conversation 0 https://github.com/feast-dev/feast/pull/6370
Commits 7 https://github.com/feast-dev/feast/pull/6370/commits
Checks 26 https://github.com/feast-dev/feast/pull/6370/checks
Files changed https://github.com/feast-dev/feast/pull/6370/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/6370/files
fix(spark): Replace mapInArrow with foreachPartition for materialization https://github.com/feast-dev/feast/pull/6370/files#top
Show all changes 7 commits https://github.com/feast-dev/feast/pull/6370/files
2cee78e fix(spark): replace mapInArrow with foreachPartition and fix session … abhijeet-dhumal May 5, 2026 https://github.com/feast-dev/feast/pull/6370/commits/2cee78eecb72be73854fc1bf8750177cccb1a43c
e69c623 fix: resolve linting and ruff check issues abhijeet-dhumal May 6, 2026 https://github.com/feast-dev/feast/pull/6370/commits/e69c62316158586c2b9ce1b5a317c68d17eae168
893db92 feat: read from offline path in get_historical_features for BFVs abhijeet-dhumal May 7, 2026 https://github.com/feast-dev/feast/pull/6370/commits/893db923dc8587ac8e4ae04a42d8b72c8953dc13
165fbe2 feat: allow query + path in SparkSource for offline materialization abhijeet-dhumal May 7, 2026 https://github.com/feast-dev/feast/pull/6370/commits/165fbe21b93b7293cc1a7a0fa69021802aaff2a9
6ebcde1 fix: add missing BatchFeatureView import in spark offline store abhijeet-dhumal May 7, 2026 https://github.com/feast-dev/feast/pull/6370/commits/6ebcde17d6e21799236140047d12f4b56a962fde
c80d436 fix: graceful fallback when offline path is not readable abhijeet-dhumal May 7, 2026 https://github.com/feast-dev/feast/pull/6370/commits/c80d43661bfd8afe90459914a5a2566728760e6e
3d1c364 fix: chunk foreachPartition writes to bound Python memory — prevents … abhijeet-dhumal May 7, 2026 https://github.com/feast-dev/feast/pull/6370/commits/3d1c3640859061eaa62d297320973c0c38ddf0b2
Clear filters https://github.com/feast-dev/feast/pull/6370/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/6370/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/6370/files
compute.py https://github.com/feast-dev/feast/pull/6370/files#diff-12101710ddbb9668f3fa7de0629d266cae4585c632223a296ecf2b0bbfbdd10d
nodes.py https://github.com/feast-dev/feast/pull/6370/files#diff-ef3c9f42859de83e0118dbc9b53b79509853421c612aa0cf630f2f894ecd3538
utils.py https://github.com/feast-dev/feast/pull/6370/files#diff-a58c5b8c525c82817dcac93b3461e4e3b94a6b2e3efdf64d5801fadb49e2f813
spark.py https://github.com/feast-dev/feast/pull/6370/files#diff-ef3fce408c702d00aa891015376e83ff1084907c69c95cafacf5fae657fca486
spark_source.py https://github.com/feast-dev/feast/pull/6370/files#diff-5adf14693cee066990c26d08bac61fed1fd030a9e02b3f4ad16803b6be0df622
test_compute.py https://github.com/feast-dev/feast/pull/6370/files#diff-b340861de417f71dfd53986678b9f38a13fb9f36de8caeebe02f9bff7db7690f
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L10
sdk/python/feast/infra/compute_engines/spark/compute.pyhttps://github.com/feast-dev/feast/pull/6370/files#diff-12101710ddbb9668f3fa7de0629d266cae4585c632223a296ecf2b0bbfbdd10d
View file https://github.com/abhijeet-dhumal/feast/blob/3d1c3640859061eaa62d297320973c0c38ddf0b2/sdk/python/feast/infra/compute_engines/spark/compute.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/6370/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/6370/files#diff-12101710ddbb9668f3fa7de0629d266cae4585c632223a296ecf2b0bbfbdd10d
https://github.com/feast-dev/feast/pull/6370/files#diff-12101710ddbb9668f3fa7de0629d266cae4585c632223a296ecf2b0bbfbdd10d
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L10
sdk/python/feast/infra/compute_engines/spark/nodes.pyhttps://github.com/feast-dev/feast/pull/6370/files#diff-ef3c9f42859de83e0118dbc9b53b79509853421c612aa0cf630f2f894ecd3538
View file https://github.com/abhijeet-dhumal/feast/blob/3d1c3640859061eaa62d297320973c0c38ddf0b2/sdk/python/feast/infra/compute_engines/spark/nodes.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/6370/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/6370/files#diff-ef3c9f42859de83e0118dbc9b53b79509853421c612aa0cf630f2f894ecd3538
https://github.com/feast-dev/feast/pull/6370/files#diff-ef3c9f42859de83e0118dbc9b53b79509853421c612aa0cf630f2f894ecd3538
https://github.com/feast-dev/feast/pull/6370/files#diff-ef3c9f42859de83e0118dbc9b53b79509853421c612aa0cf630f2f894ecd3538
https://github.com/feast-dev/feast/pull/6370/files#diff-ef3c9f42859de83e0118dbc9b53b79509853421c612aa0cf630f2f894ecd3538
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L10
sdk/python/feast/infra/compute_engines/spark/utils.pyhttps://github.com/feast-dev/feast/pull/6370/files#diff-a58c5b8c525c82817dcac93b3461e4e3b94a6b2e3efdf64d5801fadb49e2f813
View file https://github.com/abhijeet-dhumal/feast/blob/3d1c3640859061eaa62d297320973c0c38ddf0b2/sdk/python/feast/infra/compute_engines/spark/utils.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/6370/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/6370/files#diff-a58c5b8c525c82817dcac93b3461e4e3b94a6b2e3efdf64d5801fadb49e2f813
https://github.com/feast-dev/feast/pull/6370/files#diff-a58c5b8c525c82817dcac93b3461e4e3b94a6b2e3efdf64d5801fadb49e2f813
https://github.com/feast-dev/feast/pull/6370/files#diff-a58c5b8c525c82817dcac93b3461e4e3b94a6b2e3efdf64d5801fadb49e2f813
https://github.com/feast-dev/feast/pull/6370/files#diff-a58c5b8c525c82817dcac93b3461e4e3b94a6b2e3efdf64d5801fadb49e2f813
https://github.com/feast-dev/feast/pull/6370/files#diff-a58c5b8c525c82817dcac93b3461e4e3b94a6b2e3efdf64d5801fadb49e2f813
https://github.com/feast-dev/feast/pull/6370/files#diff-a58c5b8c525c82817dcac93b3461e4e3b94a6b2e3efdf64d5801fadb49e2f813
https://github.com/feast-dev/feast/pull/6370/files#diff-a58c5b8c525c82817dcac93b3461e4e3b94a6b2e3efdf64d5801fadb49e2f813
Please reload this pagehttps://github.com/feast-dev/feast/pull/6370/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/6370/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.