René's URL Explorer Experiment


Title: feat(table): expose `registerStreamingTable` for push-mode batch ingest · Issue #95 · apache/datafusion-java · GitHub

Open Graph Title: feat(table): expose `registerStreamingTable` for push-mode batch ingest · Issue #95 · apache/datafusion-java

X Title: feat(table): expose `registerStreamingTable` for push-mode batch ingest · Issue #95 · apache/datafusion-java

Description: Is your feature request related to a problem or challenge? PR #65 shipped a Java-implemented TableProvider and SessionContext.registerTable(String, TableProvider). That covered the pull shape: DataFusion calls scan(BufferAllocator) and r...

Open Graph Description: Is your feature request related to a problem or challenge? PR #65 shipped a Java-implemented TableProvider and SessionContext.registerTable(String, TableProvider). That covered the pull shape: Data...

X Description: Is your feature request related to a problem or challenge? PR #65 shipped a Java-implemented TableProvider and SessionContext.registerTable(String, TableProvider). That covered the pull shape: Data...

Opengraph URL: https://github.com/apache/datafusion-java/issues/95

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(table): expose `registerStreamingTable` for push-mode batch ingest","articleBody":"### Is your feature request related to a problem or challenge?\n\nPR **#65** shipped a Java-implemented `TableProvider` and `SessionContext.registerTable(String, TableProvider)`. That covered the **pull** shape: DataFusion calls `scan(BufferAllocator)` and reads the returned `ArrowReader`.\n\nBut it does **not** cover the **push** shape that event-driven batch sources need:\n\n- A coordinator that reduces over shard responses arriving incrementally -- the producer can't materialise an `ArrowReader` because the next batch hasn't arrived yet.\n- A Flight stream feeding into a query -- same problem; the producer is event-driven.\n- Any in-process producer that emits batches as side-effects of other work and doesn't know in advance how many will arrive.\n\nTo bridge these into PR #65 today, callers have to write a `BlockingArrowReader` adapter that buffers pushed batches and serves them through the pull interface. That's a serialisation point: the producer blocks waiting for `loadNextBatch()` to be called, or DataFusion blocks waiting for the next batch -- the two ends can never run truly concurrently. The adapter also has to invent its own backpressure semantics, error propagation, end-of-stream signalling, and thread-safety story.\n\nDataFusion itself solves this on the Rust side with `StreamingTable` + `PartitionStream` plus an mpsc channel: producer pushes `Result\u003cRecordBatch>` into the sender, the consumer (DataFusion's `StreamingTableExec`) polls the receiver as part of normal query execution. The two ends decouple via the channel buffer, with the runtime providing backpressure and cancellation propagation.\n\n### Describe the solution you'd like\n\nOne new method on `SessionContext` returning a `TableSink`:\n\n```java\nTableSink sink = ctx.registerStreamingTable(\"shard_results\", schema, capacity);\n// Producer thread (any thread, including outside any Tokio runtime):\ntry {\n  while (hasMoreInput()) {\n    sink.write(batch);   // backpressures when channel is full\n  }\n  sink.close();          // EOF: queries see end-of-stream cleanly\n} catch (Throwable t) {\n  sink.fail(t);          // signal error: queries see RuntimeException\n}\n```\n\n```java\npublic final class TableSink implements AutoCloseable {\n  void write(VectorSchemaRoot batch);   // exports via Data.exportVectorSchemaRoot\n  void close();                          // EOF\n  void fail(Throwable cause);            // error propagated to readers\n}\n```\n\nAfter registration the table can be referenced like any other registered table:\n\n```java\nDataFrame df = ctx.sql(\"SELECT count(*) FROM shard_results\");\nArrowReader r = df.executeStream(allocator);\n// Producer thread continues writing as r.loadNextBatch() drains.\n```\n\n**Single-scan semantics.** The registered table can only be queried *once*. After that scan completes (or is cancelled), the sink is no longer usable and the table cannot be re-scanned. This is the natural semantic for an event-driven producer -- the data is consumed as it arrives -- and matches what every downstream Substrait/Calcite plan that uses streaming tables already assumes. Documented loudly on `registerStreamingTable`'s Javadoc; trying to re-execute against the same registration throws.\nThis is intentional. Re-scannable streaming would require buffering every batch internally, which defeats the streaming use case. Callers who need to re-scan the same data should use the existing `registerTable` / `SimpleTableProvider` pull shape (PR #65) instead.\n\n\n\n### Describe alternatives you've considered\n\n- **`BlockingArrowReader` adapter on top of PR #65's `registerTable`.** What every caller currently has to hand-roll. It works but pushes the channel + backpressure + EOF + error story onto every embedder. Bridging via the upstream-canonical `StreamingTable` shape is strictly less code and gets cancellation propagation for free.\n- **Backpressure-free `try_write`.** A non-blocking variant that returns `false` when the channel is full. Easy to add later as a follow-up if anyone wants it; not in scope here. Default `write` blocks, which is the contract every Java I/O caller expects.\n- **Reuse PR #65's `TableProvider` interface and wrap mpsc internally.** Considered. The problem: PR #65's `scan(BufferAllocator) -> ArrowReader` returns synchronously, so a mpsc-backed implementation has to block on `loadNextBatch()` waiting for the producer -- exactly the serialisation point we're trying to avoid. Going direct to `StreamingTable` + `PartitionStream` is the right layer.\n\n### Additional context\n\n- The OpenSearch backend's `rust/src/api.rs:572` `register_partition_stream` is the prior-art template; it does almost exactly this. The Java side there uses a hand-rolled FFM bridge (`sender_send`) that can be replaced with this surface as soon as it lands.","author":{"url":"https://github.com/LantaoJin","@type":"Person","name":"LantaoJin"},"datePublished":"2026-05-26T07:39:31Z","url":"https://github.com/apache/datafusion-java/issues/95"}

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:9e98ce1c-59f9-147c-40f1-9398aee0b8b0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC400:29272F:232139:307B9A:6B0467EE
html-safe-nonce52af8cee41ae8fb2ba8f4238f4601465428e3962aafd9c21081ed04ea0ea30a6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDAwOjI5MjcyRjoyMzIxMzk6MzA3QjlBOjZCMDQ2N0VFIiwidmlzaXRvcl9pZCI6IjQ3NTU5Njk5MTQ2MTQwODE1MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacdb87ce79c0690efdad046460d36773b1a7a7c9fc5cbad64243916e8d3e4f4614
hovercard-subject-tagissue:4522366382
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/apache/datafusion-java/95/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b56197f8ee2c491e41fdcf4073f3affd5aa0d6c9010b7c2897cdb48e21a8272c/apache/datafusion-java/issues/95
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b56197f8ee2c491e41fdcf4073f3affd5aa0d6c9010b7c2897cdb48e21a8272c/apache/datafusion-java/issues/95
og:image:altIs your feature request related to a problem or challenge? PR #65 shipped a Java-implemented TableProvider and SessionContext.registerTable(String, TableProvider). That covered the pull shape: Data...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameLantaoJin
hostnamegithub.com
expected-hostnamegithub.com
None83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f
turbo-cache-controlno-preview
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
disable-turbofalse
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
react-app-nameissues

Links:

Skip to contenthttps://github.com/apache/datafusion-java/issues/95#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fdatafusion-java%2Fissues%2F95
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%2Fissues%2F95
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=apache%2Fdatafusion-java
Reloadhttps://github.com/apache/datafusion-java/issues/95
Reloadhttps://github.com/apache/datafusion-java/issues/95
Reloadhttps://github.com/apache/datafusion-java/issues/95
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
https://github.com/apache/datafusion-java
New issuehttps://github.com/login?return_to=https://github.com/apache/datafusion-java/issues/95
New issuehttps://github.com/login?return_to=https://github.com/apache/datafusion-java/issues/95
Featurehttps://github.com/apache/datafusion-java/issues?q=type:"Feature"
#98https://github.com/apache/datafusion-java/pull/98
feat(table): expose registerStreamingTable for push-mode batch ingesthttps://github.com/apache/datafusion-java/issues/95#top
#98https://github.com/apache/datafusion-java/pull/98
enhancementNew feature or requesthttps://github.com/apache/datafusion-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/LantaoJin
LantaoJinhttps://github.com/LantaoJin
on May 26, 2026https://github.com/apache/datafusion-java/issues/95#issue-4522366382
#65https://github.com/apache/datafusion-java/pull/65
#65https://github.com/apache/datafusion-java/pull/65
#65https://github.com/apache/datafusion-java/pull/65
feat(datasource): add Java-implemented data sources #65https://github.com/apache/datafusion-java/pull/65
feat(datasource): add Java-implemented data sources #65https://github.com/apache/datafusion-java/pull/65
feat(datasource): add Java-implemented data sources #65https://github.com/apache/datafusion-java/pull/65
LantaoJinhttps://github.com/LantaoJin
enhancementNew feature or requesthttps://github.com/apache/datafusion-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
on May 26, 2026https://github.com/apache/datafusion-java/issues/95#event-25956698855
LantaoJinhttps://github.com/LantaoJin
Featurehttps://github.com/apache/datafusion-java/issues?q=type:"Feature"
on May 26, 2026https://github.com/apache/datafusion-java/issues/95#event-25956699277
Sign up for freehttps://github.com/signup?return_to=https://github.com/apache/datafusion-java/issues/95
Sign in to commenthttps://github.com/login?return_to=https://github.com/apache/datafusion-java/issues/95
enhancementNew feature or requesthttps://github.com/apache/datafusion-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
Featurehttps://github.com/apache/datafusion-java/issues?q=type:"Feature"
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-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.