René's URL Explorer Experiment


Title: refactor: pass csv and parquet read options via protobuf by andygrove · Pull Request #29 · apache/datafusion-java · GitHub

Open Graph Title: refactor: pass csv and parquet read options via protobuf by andygrove · Pull Request #29 · apache/datafusion-java

X Title: refactor: pass csv and parquet read options via protobuf by andygrove · Pull Request #29 · apache/datafusion-java

Description: Which issue does this PR close? No tracking issue — follow-up to #28. Rationale for this change PR #28 established protobuf-over-JNI as the transport for SessionContext configuration. This PR applies the same pattern to the CSV and Parquet read paths. Before this change, registering or reading a CSV file passed 14–16 raw JNI arguments — booleans, byte values, nullable-encoded as xxx_set / xxx_value pairs, -1L sentinels for "unset" longs, and FileCompressionType shipped as its name() string. Parquet had the same shape with 7–9 args. After: each call takes a single serialized CsvReadOptionsProto / ParquetReadOptionsProto byte array plus an optional Arrow-IPC schema byte array. Nullability, enums, and field evolution are now native to the wire format. The contributor guide documents the proto-over-JNI convention so future structured JNI calls follow the same pattern. What changes are included in this PR? New proto/csv_read_options.proto and proto/parquet_read_options.proto, mirroring the structure of session_options.proto. FileCompressionType is a proto3 enum with prefixed values and a _UNSPECIFIED = 0 sentinel. CsvReadOptions.toBytes() and ParquetReadOptions.toBytes() serialize the Java options through the generated builders. with_csv_options and with_parquet_options on the Rust side decode the proto via prost and fold the fields into DataFusion's option structs. The Unspecified compression arm returns an error rather than silently defaulting. Four JNI methods collapse to 4 or 5 arguments each: (handle, [name,] path, byte[] optionsBytes, byte[] schemaIpcBytesOrNull). New native/src/schema.rs::decode_optional_schema replaces two copies of identical Arrow-IPC schema-decode logic. Renamed Rust module session_options → proto_gen since the single generated file now contains the types for all three protos (they share package datafusion_java;). New contributor-guide section Passing structured options across the JNI boundary documents the convention, including proto3 enum-prefix and _UNSPECIFIED = 0 requirements. The public Java API is unchanged: every public setter on CsvReadOptions / ParquetReadOptions and every register* / read* method on SessionContext keeps the same signature. Are these changes tested? Yes: CsvReadOptionsTest (4 tests) and ParquetReadOptionsTest (3 tests) round-trip through toBytes() / Proto.parseFrom(...), verifying every field, default presence/absence, and all five FileCompressionType values. The existing SessionContextCsvTest and SessionContextParquetOptionsTest continue to exercise the public API end-to-end through JNI without modification — strong evidence that the new wire format reaches the Rust side correctly. Full ./mvnw test passes (49 run, 0 failed, 12 skipped — skips are pre-existing tpch-data integration tests). cd native && cargo build && cargo clippy --all-targets -- -D warnings && cargo fmt --check clean. Are there any user-facing changes? No. Public Java API is unchanged.

Open Graph Description: Which issue does this PR close? No tracking issue — follow-up to #28. Rationale for this change PR #28 established protobuf-over-JNI as the transport for SessionContext configuration. This PR appli...

X Description: Which issue does this PR close? No tracking issue — follow-up to #28. Rationale for this change PR #28 established protobuf-over-JNI as the transport for SessionContext configuration. This PR appli...

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

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:fc93e4d5-e2f4-b0fa-00e3-e7f10cb99cc1
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE1B4:1453CC:2DEFFC:3F6D67:6B046A4B
html-safe-nonce4b03883a44f659c7e98592d32bd754f6077d3950642e7713a9e6a30ad72e05ee
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUI0OjE0NTNDQzoyREVGRkM6M0Y2RDY3OjZCMDQ2QTRCIiwidmlzaXRvcl9pZCI6IjYwNDc3MzMxNjkxNDEzNDQ4NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0bd708710fad78e6640cc4df1acffebc1bbe3a373065a7419e1fda9093adca15
hovercard-subject-tagpull_request:3677920111
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/29/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? No tracking issue — follow-up to #28. Rationale for this change PR #28 established protobuf-over-JNI as the transport for SessionContext configuration. This PR appli...
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/29/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fdatafusion-java%2Fpull%2F29%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%2F29%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/29/files
Reloadhttps://github.com/apache/datafusion-java/pull/29/files
Reloadhttps://github.com/apache/datafusion-java/pull/29/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/proto-read-optionshttps://github.com/andygrove/datafusion-java/tree/feat/proto-read-options
Conversation 0 https://github.com/apache/datafusion-java/pull/29
Commits 10 https://github.com/apache/datafusion-java/pull/29/commits
Checks 2 https://github.com/apache/datafusion-java/pull/29/checks
Files changed https://github.com/apache/datafusion-java/pull/29/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/29/files
refactor: pass csv and parquet read options via protobuf https://github.com/apache/datafusion-java/pull/29/files#top
Show all changes 10 commits https://github.com/apache/datafusion-java/pull/29/files
26d22d6 feat: add csv_read_options.proto andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/29/commits/26d22d67aac92e7da718f86be84de550230ff216
7fedfc6 feat: add parquet_read_options.proto andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/29/commits/7fedfc6835869175f999db03e30501c876247945
5db077c build: include csv and parquet read-options protos andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/29/commits/5db077ccbe35911231a915bca8d8bb16d3ad320a
b068284 refactor(proto): prefix FileCompressionType enum values andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/29/commits/b068284dfefaabf83aca46e4e0987011af2b207a
4e182d7 refactor(build): single source of truth for proto file list andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/29/commits/4e182d7e2f5b938b28a3fae15ecd84f7ce0c775d
111e70e refactor: pass csv and parquet read options via protobuf andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/29/commits/111e70edd405f650b01b2b7e80a7274f10df2c38
f13b51b test: round-trip read options through protobuf andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/29/commits/f13b51be39c88aab76bd79d4be7e77455e8fbf26
ab37f87 docs(contributor-guide): document proto-over-JNI convention andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/29/commits/ab37f87a2ed7fe89580a8324ecdf2c4e34fe1e1c
9136495 refactor(native): rename session_options module to proto_gen andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/29/commits/9136495de2c67dc5309bc9c2f326b092032b63c9
5164e00 docs(contributor-guide): document proto3 enum naming convention andygrove May 13, 2026 https://github.com/apache/datafusion-java/pull/29/commits/5164e000ec70332ce619d2fba42f68ada9ec5bde
Clear filters https://github.com/apache/datafusion-java/pull/29/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/29/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/29/files
development.md https://github.com/apache/datafusion-java/pull/29/files#diff-18171cf8722f1f29802ded13cd50e696f224c30e96d9a3a37cf0414c5d4750ec
build.rs https://github.com/apache/datafusion-java/pull/29/files#diff-358ae2245aa2cd99768b0c568a07648d4c26c8cdd84b15cd6f0af2680ec85240
csv.rs https://github.com/apache/datafusion-java/pull/29/files#diff-3f93ec0d7a9d1312c4c66352cd078bf109654268074a062bde373a26db3fcbd3
lib.rs https://github.com/apache/datafusion-java/pull/29/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
schema.rs https://github.com/apache/datafusion-java/pull/29/files#diff-f75a32e4ab3e32c6c6d30a9fcd5f669b833805394e7504c84156774e25a31a95
csv_read_options.proto https://github.com/apache/datafusion-java/pull/29/files#diff-a57fc576e0543b01d5197e76e6f17133168f883e272f3a7909ca690b04db94be
parquet_read_options.proto https://github.com/apache/datafusion-java/pull/29/files#diff-c85aaad1d7db549023d81952b6e1bb22336597e3c5cbe295b56df5801308ac78
CsvReadOptions.java https://github.com/apache/datafusion-java/pull/29/files#diff-5662f9e9009bcbc19c221f73d5e97f9b899543c8e6433b3ee4437764261c1384
ParquetReadOptions.java https://github.com/apache/datafusion-java/pull/29/files#diff-2c73516e4fcc7f65a0041571ff9c62a1f5ebe9a5eec9809b708c8a6daedbba9b
SessionContext.java https://github.com/apache/datafusion-java/pull/29/files#diff-97cb6bdf00492346e379b9db2a61edc3c8cdd03f802761c989617a63cd2cf986
SessionContextBuilder.java https://github.com/apache/datafusion-java/pull/29/files#diff-27621a1a7cf6d60a40dcd459ee5dc000057d0449373cc75ad59030543face032
CsvReadOptionsTest.java https://github.com/apache/datafusion-java/pull/29/files#diff-7110667e89a1e58ef2cc015ebd84dc08bddfd1b24e39b9cf4deb9ec23d0399dc
ParquetReadOptionsTest.java https://github.com/apache/datafusion-java/pull/29/files#diff-8bb29fdcfc5e07bd6cd0de6925b669635198cd537aefc7870b5d1534a716df87
docs/source/contributor-guide/development.mdhttps://github.com/apache/datafusion-java/pull/29/files#diff-18171cf8722f1f29802ded13cd50e696f224c30e96d9a3a37cf0414c5d4750ec
View file https://github.com/andygrove/datafusion-java/blob/5164e000ec70332ce619d2fba42f68ada9ec5bde/docs/source/contributor-guide/development.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/29/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/29/files#diff-18171cf8722f1f29802ded13cd50e696f224c30e96d9a3a37cf0414c5d4750ec
native/build.rshttps://github.com/apache/datafusion-java/pull/29/files#diff-358ae2245aa2cd99768b0c568a07648d4c26c8cdd84b15cd6f0af2680ec85240
View file https://github.com/andygrove/datafusion-java/blob/5164e000ec70332ce619d2fba42f68ada9ec5bde/native/build.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/29/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/29/files#diff-358ae2245aa2cd99768b0c568a07648d4c26c8cdd84b15cd6f0af2680ec85240
native/src/csv.rshttps://github.com/apache/datafusion-java/pull/29/files#diff-3f93ec0d7a9d1312c4c66352cd078bf109654268074a062bde373a26db3fcbd3
View file https://github.com/andygrove/datafusion-java/blob/5164e000ec70332ce619d2fba42f68ada9ec5bde/native/src/csv.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/29/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/29/files#diff-3f93ec0d7a9d1312c4c66352cd078bf109654268074a062bde373a26db3fcbd3
https://github.com/apache/datafusion-java/pull/29/files#diff-3f93ec0d7a9d1312c4c66352cd078bf109654268074a062bde373a26db3fcbd3
https://github.com/apache/datafusion-java/pull/29/files#diff-3f93ec0d7a9d1312c4c66352cd078bf109654268074a062bde373a26db3fcbd3
https://github.com/apache/datafusion-java/pull/29/files#diff-3f93ec0d7a9d1312c4c66352cd078bf109654268074a062bde373a26db3fcbd3
Please reload this pagehttps://github.com/apache/datafusion-java/pull/29/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/29/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.