Title: feat: expose disableSpill and maxTempDirectorySize on SessionContextBuilder · Issue #83 · apache/datafusion-java · GitHub
Open Graph Title: feat: expose disableSpill and maxTempDirectorySize on SessionContextBuilder · Issue #83 · apache/datafusion-java
X Title: feat: expose disableSpill and maxTempDirectorySize on SessionContextBuilder · Issue #83 · apache/datafusion-java
Description: Is your feature request related to a problem or challenge? PR #28 added tempDirectory(String) to SessionContextBuilder so callers can route DataFusion's spill files to a chosen directory. That setter is the only Java surface for DataFusi...
Open Graph Description: Is your feature request related to a problem or challenge? PR #28 added tempDirectory(String) to SessionContextBuilder so callers can route DataFusion's spill files to a chosen directory. That sett...
X Description: Is your feature request related to a problem or challenge? PR #28 added tempDirectory(String) to SessionContextBuilder so callers can route DataFusion's spill files to a chosen directory. That ...
Opengraph URL: https://github.com/apache/datafusion-java/issues/83
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat: expose disableSpill and maxTempDirectorySize on SessionContextBuilder","articleBody":"### Is your feature request related to a problem or challenge?\n\nPR **#28** added `tempDirectory(String)` to `SessionContextBuilder` so callers can route DataFusion's spill files to a chosen directory. That setter is the only Java surface for DataFusion's `RuntimeEnvBuilder` disk-manager knobs today. Two real gaps remain — all three reachable on the Rust side, none reachable from Java:\n\n- **No way to disable spill entirely.** Upstream offers `DiskManagerMode::Disabled` for memory-only execution (queries that need spill fail with `ResourcesExhausted` rather than going to disk). Useful for pinning latency-sensitive queries to memory or for environments without writable disk.\n- **No way to cap the spill volume size.** Upstream's `RuntimeEnvBuilder::with_max_temp_directory_size(u64)` exists; without exposing it, a runaway sort or hash-aggregate can fill the spill disk — which on a multi-tenant node is a co-tenant outage, not just a query failure.\n\nNone of the two is reachable via `setOption(...)`. `setOption` routes through DataFusion's `ConfigOptions::set(key, value)`. The disk-manager configuration lives on `RuntimeEnv` construction, not in that namespace.\n\n### Describe the solution you'd like\n\nThree new setters on `SessionContextBuilder`, sitting next to the existing `tempDirectory(String)`:\n\n```java\n// Force memory-only execution; queries that would need spill fail fast:\nSessionContext.builder()\n .disableSpill()\n .build();\n\n// Single-dir + cap (the common case; the existing tempDirectory still works):\nSessionContext.builder()\n .tempDirectory(\"/tmp/df-spill\")\n .maxTempDirectorySize(10L \u003c\u003c 30)\n .build();\n```\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_","author":{"url":"https://github.com/LantaoJin","@type":"Person","name":"LantaoJin"},"datePublished":"2026-05-21T08:04:27Z","url":"https://github.com/apache/datafusion-java/issues/83"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8237e7e2-11d6-10bf-c525-23cd178f2e47 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E090:D7239:23A0C9:327BF8:6B046A08 |
| html-safe-nonce | f6383c889070f6d34f551610d7a8590933b081505e398e5d11bbcfa1896e70e2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDkwOkQ3MjM5OjIzQTBDOTozMjdCRjg6NkIwNDZBMDgiLCJ2aXNpdG9yX2lkIjoiNjU3MTg0NzQ2MDMxNTczNTEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7d887a8501fbf19dd8c9577452afb9848b2eb9f93798fdcd67f795c3467d7389 |
| hovercard-subject-tag | issue:4492845036 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/apache/datafusion-java/83/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fbb4ee3dc4404e0376433df27c7f5abccf316f7922e8263729d1e0cf7e818ed9/apache/datafusion-java/issues/83 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fbb4ee3dc4404e0376433df27c7f5abccf316f7922e8263729d1e0cf7e818ed9/apache/datafusion-java/issues/83 |
| og:image:alt | Is your feature request related to a problem or challenge? PR #28 added tempDirectory(String) to SessionContextBuilder so callers can route DataFusion's spill files to a chosen directory. That sett... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LantaoJin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/datafusion-java git https://github.com/apache/datafusion-java.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 1237105117 |
| octolytics-dimension-repository_nwo | apache/datafusion-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1237105117 |
| octolytics-dimension-repository_network_root_nwo | apache/datafusion-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ca4d07a7cef4e4b75f821dc25e7300d80c1450a9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width