René's URL Explorer Experiment


Title: feat(dataframe): add executeStream(allocator) for incremental batch iteration by LantaoJin · Pull Request #51 · apache/datafusion-java · GitHub

Open Graph Title: feat(dataframe): add executeStream(allocator) for incremental batch iteration by LantaoJin · Pull Request #51 · apache/datafusion-java

X Title: feat(dataframe): add executeStream(allocator) for incremental batch iteration by LantaoJin · Pull Request #51 · apache/datafusion-java

Description: Which issue does this PR close? Closes #50 . Rationale for this change DataFrame.collect(allocator) is the only way to retrieve query results today. Internally, the native handler calls df.collect().await which materializes every batch into a Vec on the Rust heap before the first batch crosses the FFI boundary. For TB-scale or unbounded result sets, this OOMs the Rust side regardless of how memory accounting is configured downstream. DataFusion's own SessionContext::execute_stream already returns a SendableRecordBatchStream that yields one batch at a time. The Java binding just needs to wire that to the existing FFI_ArrowArrayStream path so each loadNextBatch() from Java drives one stream.next() on the Rust side. What changes are included in this PR? DataFrame.executeStream(BufferAllocator) → ArrowReader — peer to collect. Same lifecycle (consumes the DataFrame, caller closes the returned reader, allocator must outlive it). Same return type so existing reader-driven code paths work unchanged. native/src/lib.rs — new Java_org_apache_datafusion_DataFrame_executeStreamDataFrame JNI handler plus a small StreamingReader adapter that bridges DataFusion's async SendableRecordBatchStream to Arrow's synchronous RecordBatchReader interface. Each next() drives one runtime().block_on(stream.next()). native/Cargo.toml — adds futures = "0.3" for StreamExt::next. Updated collect's Javadoc to point at executeStream for analytics-scale queries. collect is unchanged. The two methods coexist; collect remains the right call for small results that benefit from a single owning buffer, executeStream is the right call for unbounded or very large result sets. Are these changes tested? Yes — 6 new tests in DataFrameExecuteStreamTest Are there any user-facing changes? Yes — purely additive. New public API: DataFrame.executeStream(BufferAllocator) → ArrowReader collect's behavior is unchanged; only its Javadoc gains a forward-pointer to executeStream. No deprecations, no API removals. A new transitive build dependency (futures = "0.3") is added to the native crate for StreamExt. It is already pulled in transitively by tokio and datafusion, so this just makes the dependency explicit on the import path.

Open Graph Description: Which issue does this PR close? Closes #50 . Rationale for this change DataFrame.collect(allocator) is the only way to retrieve query results today. Internally, the native handler calls df.colle...

X Description: Which issue does this PR close? Closes #50 . Rationale for this change DataFrame.collect(allocator) is the only way to retrieve query results today. Internally, the native handler calls df.colle...

Opengraph URL: https://github.com/apache/datafusion-java/pull/51

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:fe124e40-a32f-b26b-04bf-68ba0837355c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDAD8:1FC7DC:2EFF4C:408D67:6B046A9F
html-safe-nonce0a5131c8356bb2d49acfc02fe2e0661ad40880c676b8ee9f2eec694687110232
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUQ4OjFGQzdEQzoyRUZGNEM6NDA4RDY3OjZCMDQ2QTlGIiwidmlzaXRvcl9pZCI6IjY5MjcyMTIzMjUyNjMxNDE1MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace0cd5ad28f2f983b9760f8a9345c5c8e95526008de72bff1d0a472b53b08738e
hovercard-subject-tagpull_request:3682069392
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/apache/datafusion-java/pull/51/files
twitter:imagehttps://avatars.githubusercontent.com/u/1853780?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1853780?s=400&v=4
og:image:altWhich issue does this PR close? Closes #50 . Rationale for this change DataFrame.collect(allocator) is the only way to retrieve query results today. Internally, the native handler calls df.colle...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/apache/datafusion-java git https://github.com/apache/datafusion-java.git
octolytics-dimension-user_id47359
octolytics-dimension-user_loginapache
octolytics-dimension-repository_id1237105117
octolytics-dimension-repository_nwoapache/datafusion-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1237105117
octolytics-dimension-repository_network_root_nwoapache/datafusion-java
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
releaseca4d07a7cef4e4b75f821dc25e7300d80c1450a9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apache/datafusion-java/pull/51/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fdatafusion-java%2Fpull%2F51%2Ffiles
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%2Fapache%2Fdatafusion-java%2Fpull%2F51%2Ffiles
Sign uphttps://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=apache%2Fdatafusion-java
Reloadhttps://github.com/apache/datafusion-java/pull/51/files
Reloadhttps://github.com/apache/datafusion-java/pull/51/files
Reloadhttps://github.com/apache/datafusion-java/pull/51/files
apachehttps://github.com/apache
datafusion-javahttps://github.com/apache/datafusion-java
Codehttps://github.com/apache/datafusion-java
Issues10 (10)https://github.com/apache/datafusion-java/issues
Pull requests10 (10)https://github.com/apache/datafusion-java/pulls
Discussionshttps://github.com/apache/datafusion-java/discussions
Actionshttps://github.com/apache/datafusion-java/actions
Security and qualityhttps://github.com/apache/datafusion-java/security
Insightshttps://github.com/apache/datafusion-java/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fapache%2Fdatafusion-java%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fapache%2Fdatafusion-java%2Fissues%2Fnew%2Fchoose
andygrovehttps://github.com/andygrove
apache:mainhttps://github.com/apache/datafusion-java/tree/main
LantaoJin:feat/dataframe-execute-streamhttps://github.com/LantaoJin/datafusion-java/tree/feat/dataframe-execute-stream
Conversation 4 https://github.com/apache/datafusion-java/pull/51
Commits 4 https://github.com/apache/datafusion-java/pull/51/commits
Checks 1 https://github.com/apache/datafusion-java/pull/51/checks
Files changed https://github.com/apache/datafusion-java/pull/51/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/51/files
feat(dataframe): add executeStream(allocator) for incremental batch iteration https://github.com/apache/datafusion-java/pull/51/files#top
Show all changes 4 commits https://github.com/apache/datafusion-java/pull/51/files
9743fde feat(dataframe): add executeStream(allocator) for incremental batch i… LantaoJin May 14, 2026 https://github.com/apache/datafusion-java/pull/51/commits/9743fde3839804fc36121b4ecad44fbc770696b6
db5a23d address comments LantaoJin May 15, 2026 https://github.com/apache/datafusion-java/pull/51/commits/db5a23d99177c62cea1ef93318e5164f7fbfd4a1
e9af25a catch panics in StreamingReader::next to keep FFI safe LantaoJin May 18, 2026 https://github.com/apache/datafusion-java/pull/51/commits/e9af25a488543b2dae5f2a6bffbbfc35944f0ebf
b727aab Merge remote-tracking branch 'upstream/main' into feat/dataframe-exec… LantaoJin May 18, 2026 https://github.com/apache/datafusion-java/pull/51/commits/b727aab0e8ed2ae9da1f356d276dedd2ac9c0a5e
Clear filters https://github.com/apache/datafusion-java/pull/51/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/51/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/51/files
DataFrame.java https://github.com/apache/datafusion-java/pull/51/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
DataFrameExecuteStreamTest.java https://github.com/apache/datafusion-java/pull/51/files#diff-4286eb2e255793fcf3a6277311cc41fefc267178de398704388a116221dd92e7
Cargo.lock https://github.com/apache/datafusion-java/pull/51/files#diff-078f375cfc74d2a2bae74160d7469389a54227046a6daec4edb0481597ec2aa8
Cargo.toml https://github.com/apache/datafusion-java/pull/51/files#diff-a1571d177cbc44d96f49c8f29b6340febcee141a0e26833931bcd78c5441fb55
lib.rs https://github.com/apache/datafusion-java/pull/51/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
core/src/main/java/org/apache/datafusion/DataFrame.javahttps://github.com/apache/datafusion-java/pull/51/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
View file https://github.com/LantaoJin/datafusion-java/blob/b727aab0e8ed2ae9da1f356d276dedd2ac9c0a5e/core/src/main/java/org/apache/datafusion/DataFrame.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/51/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/51/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
https://github.com/apache/datafusion-java/pull/51/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
https://github.com/apache/datafusion-java/pull/51/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
https://github.com/apache/datafusion-java/pull/51/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
https://github.com/apache/datafusion-java/pull/51/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
https://github.com/apache/datafusion-java/pull/51/files#diff-a044f0300400b70bd8ec9c4e4a27c17b89674595e0ae3f5a6ebf88e393ba479b
core/src/test/java/org/apache/datafusion/DataFrameExecuteStreamTest.javahttps://github.com/apache/datafusion-java/pull/51/files#diff-4286eb2e255793fcf3a6277311cc41fefc267178de398704388a116221dd92e7
View file https://github.com/LantaoJin/datafusion-java/blob/b727aab0e8ed2ae9da1f356d276dedd2ac9c0a5e/core/src/test/java/org/apache/datafusion/DataFrameExecuteStreamTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/51/{{ revealButtonHref }}
native/Cargo.lockhttps://github.com/apache/datafusion-java/pull/51/files#diff-078f375cfc74d2a2bae74160d7469389a54227046a6daec4edb0481597ec2aa8
View file https://github.com/LantaoJin/datafusion-java/blob/b727aab0e8ed2ae9da1f356d276dedd2ac9c0a5e/native/Cargo.lock
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/apache/datafusion-java/pull/51/files
native/Cargo.tomlhttps://github.com/apache/datafusion-java/pull/51/files#diff-a1571d177cbc44d96f49c8f29b6340febcee141a0e26833931bcd78c5441fb55
View file https://github.com/LantaoJin/datafusion-java/blob/b727aab0e8ed2ae9da1f356d276dedd2ac9c0a5e/native/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/51/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/51/files#diff-a1571d177cbc44d96f49c8f29b6340febcee141a0e26833931bcd78c5441fb55
https://github.com/apache/datafusion-java/pull/51/files#diff-a1571d177cbc44d96f49c8f29b6340febcee141a0e26833931bcd78c5441fb55
native/src/lib.rshttps://github.com/apache/datafusion-java/pull/51/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
View file https://github.com/LantaoJin/datafusion-java/blob/b727aab0e8ed2ae9da1f356d276dedd2ac9c0a5e/native/src/lib.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/51/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/51/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
https://github.com/apache/datafusion-java/pull/51/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
https://github.com/apache/datafusion-java/pull/51/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
https://github.com/apache/datafusion-java/pull/51/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
Please reload this pagehttps://github.com/apache/datafusion-java/pull/51/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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.