René's URL Explorer Experiment


Title: Large Arrow results are fully materialized before use in three places (Flight, Trino, Spark) · Issue #6863 · feast-dev/feast · GitHub

Open Graph Title: Large Arrow results are fully materialized before use in three places (Flight, Trino, Spark) · Issue #6863 · feast-dev/feast

X Title: Large Arrow results are fully materialized before use in three places (Flight, Trino, Spark) · Issue #6863 · feast-dev/feast

Description: Is your feature request related to a problem? Please describe. Yes, in three independent places — Feast fully materializes an Arrow result as one giant, unchunked in-memory object before anything downstream can act on it, and none of the...

Open Graph Description: Is your feature request related to a problem? Please describe. Yes, in three independent places — Feast fully materializes an Arrow result as one giant, unchunked in-memory object before anything d...

X Description: Is your feature request related to a problem? Please describe. Yes, in three independent places — Feast fully materializes an Arrow result as one giant, unchunked in-memory object before anything d...

Opengraph URL: https://github.com/feast-dev/feast/issues/6863

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Large Arrow results are fully materialized before use in three places (Flight, Trino, Spark)","articleBody":"**Is your feature request related to a problem? Please describe.**\n\nYes, in three independent places — Feast fully materializes an Arrow result as one giant,\nunchunked in-memory object before anything downstream can act on it, and none of them scale:\n\n1. [`OfflineServer.do_get()`](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/offline_server.py)\n   wraps every result straight into `fl.RecordBatchStream(table)`, where `table` comes from each\n   offline store's `_to_arrow_internal` — one giant, unchunked `RecordBatch`. Arrow's Flight/IPC\n   writer refuses to serialize any single `RecordBatch` above 2GiB, so a job that completed\n   successfully server-side crashes the moment the client tries to read the response:\n   ```\n   pyarrow.lib.ArrowInvalid: Cannot send record batches exceeding 2GiB yet\n   ```\n\n2. [`TrinoRetrievalJob._to_arrow_internal()`](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py)\n   does `cursor.fetchall()` → pandas `DataFrame` → `pyarrow.Table.from_pandas()` — two full\n   in-memory copies of the result before a single row reaches the caller, and exactly what\n   produces the oversized batch in (1.).\n\n3. [`SparkReadNode.execute()`](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/infra/compute_engines/spark/nodes.py)\n   converts the retrieved Arrow `Table` to Spark via `arrow_table.to_pandas()` then\n   `createDataFrame(...)` — `to_pandas()` on a Flight/IPC-sourced, multi-chunk `Table` always\n   makes a full pandas copy (pyarrow can't zero-copy multi-chunk/nullable columns, and\n   `self_destruct` can't free the source either), doubling peak driver memory for every\n   materialization job and driving real driver OOMs on large batch sources.\n\n**Describe the solution you'd like**\n\n- `offline_server.py` — before wrapping in `RecordBatchStream`, re-slice the outgoing table by\n  row count (`to_batches(max_chunksize=N)`) and re-check each resulting batch's actual encoded\n  byte size, bisecting further by row count for any batch still over a safety threshold.\n- Trino offline store — an opt-in streaming retrieval path:\n  ```python\n  # trino_queries.py\n  query.start()                       # run the query, return column metadata\n  query.iterate_pages(batch_size)      # page via cursor.fetchmany()\n\n  # trino.py\n  TrinoRetrievalJob.to_arrow_reader()  # -> pyarrow.RecordBatchReader, built from those pages\n  ```\n  `do_get()` prefers this reader over `to_arrow()` whenever a job carries no on-demand feature\n  views.\n- `compute_engines/spark/nodes.py` — on Spark 4.0+, pass the `pyarrow.Table` directly to\n  `createDataFrame()` (native ingestion via `_create_from_arrow_table`) instead of\n  `.to_pandas()`, falling back to the pandas round-trip on older PySpark.\n\n**Describe alternatives you've considered**\n\n- (1.): just raising the offline server's chunking limits — doesn't address the memory doubling\n  in (2.), only the point where it becomes fatal.\n- (2.): making `to_arrow()` itself lazy for every offline store — too large a behavior change for\n  callers (on-demand transforms, dataset validation) that need the full `Table`; scoping to an\n  opt-in method on Trino avoids that.\n- (3.): no real alternative once Spark 4.0+ supports native ingestion — the pandas round-trip is\n  pure overhead.\n\n\nAdditional context\n\n\n**Test plan**\n\n- [ ] A synthetic result whose single `RecordBatch` exceeds 2GiB serializes over Arrow Flight\n      without raising `ArrowInvalid`.\n- [ ] `TrinoRetrievalJob.to_arrow_reader()` never calls `cursor.fetchall()`, and its output\n      matches `to_arrow()` for a query with `row(...)`/`map(...)`/`array(...)` columns and NULLs.\n- [ ] `SparkReadNode.execute()` uses native `pyarrow.Table` ingestion on Spark 4.0+, and output\n      rows/schema match the `.to_pandas()` path for a `Table` with nulls and multiple chunks.","author":{"url":"https://github.com/dbbvitor","@type":"Person","name":"dbbvitor"},"datePublished":"2026-09-24T15:22:12Z","url":"https://github.com/feast-dev/feast/issues/6863"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d5cf5789-ed03-0e97-c728-accf28f7c027
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9D76:2979B2:FAC529:1550EFB:6AFE980F
html-safe-nonce32ed93617ec3721e33fe235953a1c6505fa7e1fa5d5378023cad8099290b552a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDc2OjI5NzlCMjpGQUM1Mjk6MTU1MEVGQjo2QUZFOTgwRiIsInZpc2l0b3JfaWQiOiI5MzcwODA4NjY5OTQwMzQ3MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc3e805f90c559e4f468191a25817af92f01ec97c4c08f32c8ff5521ff1462e2e
hovercard-subject-tagissue:5570581574
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/6863/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e164944e7a17d0a8860371694da7031ff8d17b673b04c1b6f27eab6cf17063c4/feast-dev/feast/issues/6863
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e164944e7a17d0a8860371694da7031ff8d17b673b04c1b6f27eab6cf17063c4/feast-dev/feast/issues/6863
og:image:altIs your feature request related to a problem? Please describe. Yes, in three independent places — Feast fully materializes an Arrow result as one giant, unchunked in-memory object before anything d...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedbbvitor
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/feast-dev/feast/issues/6863#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F6863
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F6863
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=feast-dev%2Ffeast
Reloadhttps://github.com/feast-dev/feast/issues/6863
Reloadhttps://github.com/feast-dev/feast/issues/6863
Reloadhttps://github.com/feast-dev/feast/issues/6863
feast-devhttps://github.com/feast-dev
feasthttps://github.com/feast-dev/feast
Codehttps://github.com/feast-dev/feast
Issues223 (223)https://github.com/feast-dev/feast/issues
Pull requests143 (143)https://github.com/feast-dev/feast/pulls
Discussionshttps://github.com/feast-dev/feast/discussions
Actionshttps://github.com/feast-dev/feast/actions
Security and quality1 (1)https://github.com/feast-dev/feast/security
Insightshttps://github.com/feast-dev/feast/insights
https://github.com/feast-dev/feast
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6863
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6863
#6897https://github.com/feast-dev/feast/pull/6897
Large Arrow results are fully materialized before use in three places (Flight, Trino, Spark)https://github.com/feast-dev/feast/issues/6863#top
#6897https://github.com/feast-dev/feast/pull/6897
kind/featureNew feature or requesthttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Ffeature%22
https://github.com/dbbvitor
dbbvitorhttps://github.com/dbbvitor
on Sep 24, 2026https://github.com/feast-dev/feast/issues/6863#issue-5570581574
OfflineServer.do_get()https://github.com/feast-dev/feast/blob/master/sdk/python/feast/offline_server.py
TrinoRetrievalJob._to_arrow_internal()https://github.com/feast-dev/feast/blob/master/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py
SparkReadNode.execute()https://github.com/feast-dev/feast/blob/master/sdk/python/feast/infra/compute_engines/spark/nodes.py
dbbvitorhttps://github.com/dbbvitor
kind/featureNew feature or requesthttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Ffeature%22
on Sep 24, 2026https://github.com/feast-dev/feast/issues/6863#event-31768567895
Sign up for freehttps://github.com/signup?return_to=https://github.com/feast-dev/feast/issues/6863
Sign in to commenthttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6863
kind/featureNew feature or requesthttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Ffeature%22
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.