René's URL Explorer Experiment


Title: feat: configure SessionContext and RuntimeEnv via builder by andygrove · Pull Request #28 · apache/datafusion-java · GitHub

Open Graph Title: feat: configure SessionContext and RuntimeEnv via builder by andygrove · Pull Request #28 · apache/datafusion-java

X Title: feat: configure SessionContext and RuntimeEnv via builder by andygrove · Pull Request #28 · apache/datafusion-java

Description: Which issue does this PR close? Closes #5. Rationale for this change Previously new SessionContext() was the only way to construct a context, leaving callers with DataFusion's defaults for batch size, partitioning, statistics, information_schema, memory limits, and disk-spill location. This PR adds a typed builder so callers can configure those knobs at construction time: SessionContext ctx = SessionContext.builder() .batchSize(8192) .targetPartitions(4) .collectStatistics(true) .informationSchema(true) .memoryLimit(1L << 30, 0.8) .tempDirectory(spillDir) .build(); The existing zero-arg constructor is untouched, so current callers continue to work unchanged. What changes are included in this PR? New SessionContextBuilder Java class with typed setters and input validation (positive sizes, fraction in (0, 1]). New static SessionContext.builder() factory. New project-local proto/session_options.proto describing the wire format. Maven protobuf-maven-plugin split into two named executions so the local proto compiles alongside the upstream-downloaded ones. Rust prost-build wired up via a new native/build.rs to generate matching Rust types. New JNI function createSessionContextWithOptions that decodes the proto, applies the knobs to SessionConfig + RuntimeEnvBuilder, and constructs the context via SessionContext::new_with_config_rt. Object stores, default catalog/schema, and per-query overrides are intentionally out of scope for this PR. Are these changes tested? Yes. SessionContextBuilderTest adds: A proto round-trip test that verifies every setter sets the right presence bit and value. A test that unset fields remain absent in the proto. information_schema on → meta SQL succeeds; off → meta SQL throws. This is the strongest end-to-end check that an option actually crosses JNI and changes runtime behavior. An all-knobs happy-path test using @TempDir for the spill directory and running SELECT 1 end-to-end. Existing SessionContextTest continues to pass, confirming the zero-arg path is unchanged. Are there any user-facing changes? A new public API: SessionContext.builder() and the SessionContextBuilder class.

Open Graph Description: Which issue does this PR close? Closes #5. Rationale for this change Previously new SessionContext() was the only way to construct a context, leaving callers with DataFusion's defaults for ba...

X Description: Which issue does this PR close? Closes #5. Rationale for this change Previously new SessionContext() was the only way to construct a context, leaving callers with DataFusion&#39;s defaults fo...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.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:ba2f82ec-3e60-d41f-d1a6-e086d39f9b6c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9910:344084:28EB35:39A8C1:6B046A3C
html-safe-noncedbad1b128e8fe02126c1c4c7cc7999a13e23e07dd1fce35ccf88c279c6ce2ec2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTEwOjM0NDA4NDoyOEVCMzU6MzlBOEMxOjZCMDQ2QTNDIiwidmlzaXRvcl9pZCI6IjQxNTk2NTk2MTAxNzQ5NDE3NTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac1052b1317078560f0dc681273a27242a7bf25504efe4ab408b811f80f3123769
hovercard-subject-tagpull_request:3677006799
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/28/files
twitter:imagehttps://avatars.githubusercontent.com/u/934084?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/934084?s=400&v=4
og:image:altWhich issue does this PR close? Closes #5. Rationale for this change Previously new SessionContext() was the only way to construct a context, leaving callers with DataFusion's defaults for ba...
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/28/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fdatafusion-java%2Fpull%2F28%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%2F28%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/28/files
Reloadhttps://github.com/apache/datafusion-java/pull/28/files
Reloadhttps://github.com/apache/datafusion-java/pull/28/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
andygrove:feat/session-context-confighttps://github.com/andygrove/datafusion-java/tree/feat/session-context-config
Conversation 0 https://github.com/apache/datafusion-java/pull/28
Commits 10 https://github.com/apache/datafusion-java/pull/28/commits
Checks 1 https://github.com/apache/datafusion-java/pull/28/checks
Files changed https://github.com/apache/datafusion-java/pull/28/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/28/files
feat: configure SessionContext and RuntimeEnv via builder https://github.com/apache/datafusion-java/pull/28/files#top
Show all changes 10 commits https://github.com/apache/datafusion-java/pull/28/files
f13d715 feat: add SessionOptions protobuf for SessionContext configuration andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/28/commits/f13d7152d29a0722ee3c3452e2e852369bbc5187
8cd265f build: compile project-local protos via protobuf-maven-plugin andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/28/commits/8cd265f152a8fd8a992c597f653b1836aa07abea
b8d7bca build: generate Rust types for SessionOptions via prost-build andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/28/commits/b8d7bca5f8859162e89b4d021a353cb7797371c3
9fbc812 feat: add SessionContextBuilder with typed setters andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/28/commits/9fbc812af04edd31d4c58b79e1af7ec85f22725a
c768d16 feat(session-context): apply SessionConfig and RuntimeEnv options via… andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/28/commits/c768d16fb5f709cc80b6d8741959d919e4ee9896
dc0c2cb fix(session-context): add build() Javadoc and tighten info_schema ass… andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/28/commits/dc0c2cb30802074f45d4dc7751bba034182d2da5
c351d32 test: cover SessionContextBuilder with every knob set andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/28/commits/c351d32b663f27ae3dc0d7ba2b6383e55309a7ee
60a0d74 style: apply cargo fmt andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/28/commits/60a0d74f98561533cc03756c4feeecdd6a4a53a4
759902c fix(session-context): validate builder args and narrow module visibility andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/28/commits/759902cd67078d48fdddcbbf957792b5cc0b1f01
3db43e3 build: bundle protoc via protoc-bin-vendored to fix CI build andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/28/commits/3db43e3acb88468e472b152e5195ef7e33645be7
Clear filters https://github.com/apache/datafusion-java/pull/28/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/28/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/28/files
Cargo.lock https://github.com/apache/datafusion-java/pull/28/files#diff-078f375cfc74d2a2bae74160d7469389a54227046a6daec4edb0481597ec2aa8
Cargo.toml https://github.com/apache/datafusion-java/pull/28/files#diff-a1571d177cbc44d96f49c8f29b6340febcee141a0e26833931bcd78c5441fb55
build.rs https://github.com/apache/datafusion-java/pull/28/files#diff-358ae2245aa2cd99768b0c568a07648d4c26c8cdd84b15cd6f0af2680ec85240
lib.rs https://github.com/apache/datafusion-java/pull/28/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
proto.rs https://github.com/apache/datafusion-java/pull/28/files#diff-e847a473c74bbc8868045519d6d687c837f2647658b05992afdb532009179907
pom.xml https://github.com/apache/datafusion-java/pull/28/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8
session_options.proto https://github.com/apache/datafusion-java/pull/28/files#diff-0b48e973a751cd44663289ad7c1db4671e9262f89545cf6d4a518d774c1bd904
SessionContext.java https://github.com/apache/datafusion-java/pull/28/files#diff-97cb6bdf00492346e379b9db2a61edc3c8cdd03f802761c989617a63cd2cf986
SessionContextBuilder.java https://github.com/apache/datafusion-java/pull/28/files#diff-27621a1a7cf6d60a40dcd459ee5dc000057d0449373cc75ad59030543face032
SessionContextBuilderTest.java https://github.com/apache/datafusion-java/pull/28/files#diff-3396f01e2940e1ba9dfca08098aba2f5a328d5afb3b4055628c2844b4f9a6e19
native/Cargo.lockhttps://github.com/apache/datafusion-java/pull/28/files#diff-078f375cfc74d2a2bae74160d7469389a54227046a6daec4edb0481597ec2aa8
View file https://github.com/andygrove/datafusion-java/blob/3db43e3acb88468e472b152e5195ef7e33645be7/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/28/files
native/Cargo.tomlhttps://github.com/apache/datafusion-java/pull/28/files#diff-a1571d177cbc44d96f49c8f29b6340febcee141a0e26833931bcd78c5441fb55
View file https://github.com/andygrove/datafusion-java/blob/3db43e3acb88468e472b152e5195ef7e33645be7/native/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/28/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/28/files#diff-a1571d177cbc44d96f49c8f29b6340febcee141a0e26833931bcd78c5441fb55
native/build.rshttps://github.com/apache/datafusion-java/pull/28/files#diff-358ae2245aa2cd99768b0c568a07648d4c26c8cdd84b15cd6f0af2680ec85240
View file https://github.com/andygrove/datafusion-java/blob/3db43e3acb88468e472b152e5195ef7e33645be7/native/build.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/28/{{ revealButtonHref }}
native/src/lib.rshttps://github.com/apache/datafusion-java/pull/28/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
View file https://github.com/andygrove/datafusion-java/blob/3db43e3acb88468e472b152e5195ef7e33645be7/native/src/lib.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/28/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/28/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
https://github.com/apache/datafusion-java/pull/28/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
https://github.com/apache/datafusion-java/pull/28/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
https://github.com/apache/datafusion-java/pull/28/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
native/src/proto.rshttps://github.com/apache/datafusion-java/pull/28/files#diff-e847a473c74bbc8868045519d6d687c837f2647658b05992afdb532009179907
View file https://github.com/andygrove/datafusion-java/blob/3db43e3acb88468e472b152e5195ef7e33645be7/native/src/proto.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/28/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/28/files#diff-e847a473c74bbc8868045519d6d687c837f2647658b05992afdb532009179907
https://github.com/apache/datafusion-java/pull/28/files#diff-e847a473c74bbc8868045519d6d687c837f2647658b05992afdb532009179907
https://github.com/apache/datafusion-java/pull/28/files#diff-e847a473c74bbc8868045519d6d687c837f2647658b05992afdb532009179907
pom.xmlhttps://github.com/apache/datafusion-java/pull/28/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8
View file https://github.com/andygrove/datafusion-java/blob/3db43e3acb88468e472b152e5195ef7e33645be7/pom.xml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/28/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/28/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8
https://github.com/apache/datafusion-java/pull/28/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8
proto/session_options.protohttps://github.com/apache/datafusion-java/pull/28/files#diff-0b48e973a751cd44663289ad7c1db4671e9262f89545cf6d4a518d774c1bd904
View file https://github.com/andygrove/datafusion-java/blob/3db43e3acb88468e472b152e5195ef7e33645be7/proto/session_options.proto
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/28/{{ revealButtonHref }}
src/main/java/org/apache/datafusion/SessionContext.javahttps://github.com/apache/datafusion-java/pull/28/files#diff-97cb6bdf00492346e379b9db2a61edc3c8cdd03f802761c989617a63cd2cf986
View file https://github.com/andygrove/datafusion-java/blob/3db43e3acb88468e472b152e5195ef7e33645be7/src/main/java/org/apache/datafusion/SessionContext.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/28/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/28/files#diff-97cb6bdf00492346e379b9db2a61edc3c8cdd03f802761c989617a63cd2cf986
https://github.com/apache/datafusion-java/pull/28/files#diff-97cb6bdf00492346e379b9db2a61edc3c8cdd03f802761c989617a63cd2cf986
https://github.com/apache/datafusion-java/pull/28/files#diff-97cb6bdf00492346e379b9db2a61edc3c8cdd03f802761c989617a63cd2cf986
https://github.com/apache/datafusion-java/pull/28/files#diff-97cb6bdf00492346e379b9db2a61edc3c8cdd03f802761c989617a63cd2cf986
Please reload this pagehttps://github.com/apache/datafusion-java/pull/28/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/28/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.