René's URL Explorer Experiment


Title: feat: propagate Java stack traces from JVM upcalls into DataFusionError by LantaoJin · Pull Request #94 · apache/datafusion-java · GitHub

Open Graph Title: feat: propagate Java stack traces from JVM upcalls into DataFusionError by LantaoJin · Pull Request #94 · apache/datafusion-java

X Title: feat: propagate Java stack traces from JVM upcalls into DataFusionError by LantaoJin · Pull Request #94 · apache/datafusion-java

Description: Which issue does this PR close? Closes #55 . Rationale for this change When a Java-implemented upcall throws — scalar UDFs via JniBridge.invokeScalarUdf, table providers via JniBridge.invokeTableScan — the native side captures only class.getName() and getMessage() via jthrowable_to_string and surfaces it as DataFusionError::Execution(...). Since #81 routes that through to a typed ExecutionException, but the original Java stack trace is gone by then. A user whose UDF throws NullPointerException deep inside evaluate(...) sees: ExecutionException: Java UDF 'my_func' threw java.lang.NullPointerException with no way to find the failing line in their own code. The information exists; it's just discarded. What changes are included in this PR? This PR captures the Java-formatted trace (via Throwable.printStackTrace(PrintWriter) to a StringWriter) and appends it to the existing message. Verbosity is configurable per SessionContext so production paths that treat exception bodies as untrusted user input can opt out: SessionContext.builder() .exceptionVerbosity(ExceptionVerbosity.MESSAGE) // FULL (default), MESSAGE, NONE .build(); The default is FULL -- the issue's stated default -- so callers who don't touch the setter immediately gain stack traces with no API change. Out of scope (called out in #55, deferred): Cause-chain attachment (the original Throwable as cause on the typed ExecutionException from #81). Needs a registry-handle for the throwable that survives the JNI return; complementary follow-up. Are these changes tested? Yes. 10 new tests in ExceptionVerbosityTest. Are there any user-facing changes? Yes, additive only -- default behaviour does change: the message string surfaced inside ExecutionException.getMessage() now includes the Java stack trace below the existing "Java UDF 'name' threw class: message" header. Callers that already only startsWith("Java UDF '...' threw")-style match keep working; anything stricter (an exact-equals on the message) would need the new MESSAGE verbosity to lock the pre-#55 format. New public type ExceptionVerbosity. New SessionContextBuilder.exceptionVerbosity(...) setter; default unchanged for callers that don't invoke it (their behaviour changes — they now get traces by default).

Open Graph Description: Which issue does this PR close? Closes #55 . Rationale for this change When a Java-implemented upcall throws — scalar UDFs via JniBridge.invokeScalarUdf, table providers via JniBridge.invokeTable...

X Description: Which issue does this PR close? Closes #55 . Rationale for this change When a Java-implemented upcall throws — scalar UDFs via JniBridge.invokeScalarUdf, table providers via JniBridge.invokeTable...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

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:d7379f95-0fd2-c201-82c4-a76a97cda377
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC036:C8FAB:23611B:30FF6F:6B046823
html-safe-noncece39c07a34bc50e37d7bb5e55103c103dfadd890c76978bf2f994b32d8df0114
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDM2OkM4RkFCOjIzNjExQjozMEZGNkY6NkIwNDY4MjMiLCJ2aXNpdG9yX2lkIjoiMTM5NDU4MjE3OTIyODcwNjg1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac9ac18708136e212e584afc2254df9d397309daabfe31a5cd57c51462b4a644e5
hovercard-subject-tagpull_request:3746419724
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/94/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 #55 . Rationale for this change When a Java-implemented upcall throws — scalar UDFs via JniBridge.invokeScalarUdf, table providers via JniBridge.invokeTable...
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/94/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fdatafusion-java%2Fpull%2F94%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%2F94%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/94/files
Reloadhttps://github.com/apache/datafusion-java/pull/94/files
Reloadhttps://github.com/apache/datafusion-java/pull/94/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
LantaoJinhttps://github.com/LantaoJin
apache:mainhttps://github.com/apache/datafusion-java/tree/main
LantaoJin:feat/upcall-stack-traceshttps://github.com/LantaoJin/datafusion-java/tree/feat/upcall-stack-traces
Conversation 0 https://github.com/apache/datafusion-java/pull/94
Commits 1 https://github.com/apache/datafusion-java/pull/94/commits
Checks 2 https://github.com/apache/datafusion-java/pull/94/checks
Files changed https://github.com/apache/datafusion-java/pull/94/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/94/files
feat: propagate Java stack traces from JVM upcalls into DataFusionError https://github.com/apache/datafusion-java/pull/94/files#top
Show all changes 1 commit https://github.com/apache/datafusion-java/pull/94/files
3b18743 feat: propagate Java stack traces from JVM upcalls into DataFusionError LantaoJin May 26, 2026 https://github.com/apache/datafusion-java/pull/94/commits/3b18743b704ebd15d63fa3a79a8e11b8a1143ff8
Clear filters https://github.com/apache/datafusion-java/pull/94/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/94/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/94/files
ExceptionVerbosity.java https://github.com/apache/datafusion-java/pull/94/files#diff-0fe82c75ede884b535b98347ee9e03cbf1a63eb69756ecd617ee9182cd596ed3
SessionContext.java https://github.com/apache/datafusion-java/pull/94/files#diff-9aa9338a7364e93d5e2e4547564e7eb08e65a70f6d51b6fa896325cd4d87451e
SessionContextBuilder.java https://github.com/apache/datafusion-java/pull/94/files#diff-d94f9dc56a90ad2e3f99a7814d387f3c924307f9632b0ea8fe5f4ac2b08a2532
ExceptionVerbosityTest.java https://github.com/apache/datafusion-java/pull/94/files#diff-21e37f698e3e7d03f21277958fb58398c226620fa8216874f4e60019e8263845
scalar-udf.md https://github.com/apache/datafusion-java/pull/94/files#diff-0c0208f26eacc9b3a2c6e9c178bc140ab31ff32d4d097b4971bfda47674626e9
table-provider.md https://github.com/apache/datafusion-java/pull/94/files#diff-9686d6b2fe834eeb5dd21441980f50e082fa03b3b5d502d43a3e202e7796d74f
ExceptionVerbosityExample.java https://github.com/apache/datafusion-java/pull/94/files#diff-18128f163b105937bdcfba7e7cfa0130b2b6fa801e56799e4dcdf50a128f4ddb
jni_util.rs https://github.com/apache/datafusion-java/pull/94/files#diff-e2f1c915787e47817b4eb42b3633d80368df248d69ee2911c5ebad1d0c49dd2b
lib.rs https://github.com/apache/datafusion-java/pull/94/files#diff-697685fba8d3d4a3a8a287bad6e1369e50e1c98bd878823415758c2a642cbb6e
table_provider.rs https://github.com/apache/datafusion-java/pull/94/files#diff-38d9ab737d35717f547d476901756a0cdcbb27d73b954291203bd195abfca194
udf.rs https://github.com/apache/datafusion-java/pull/94/files#diff-1c9a0800b6151fc16f2965eb70c73bcf80208567d7d14d2f6f28de9f59cdda8a
core/src/main/java/org/apache/datafusion/ExceptionVerbosity.javahttps://github.com/apache/datafusion-java/pull/94/files#diff-0fe82c75ede884b535b98347ee9e03cbf1a63eb69756ecd617ee9182cd596ed3
View file https://github.com/apache/datafusion-java/blob/3b18743b704ebd15d63fa3a79a8e11b8a1143ff8/core/src/main/java/org/apache/datafusion/ExceptionVerbosity.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/94/{{ revealButtonHref }}
core/src/main/java/org/apache/datafusion/SessionContext.javahttps://github.com/apache/datafusion-java/pull/94/files#diff-9aa9338a7364e93d5e2e4547564e7eb08e65a70f6d51b6fa896325cd4d87451e
View file https://github.com/apache/datafusion-java/blob/3b18743b704ebd15d63fa3a79a8e11b8a1143ff8/core/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/94/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/94/files#diff-9aa9338a7364e93d5e2e4547564e7eb08e65a70f6d51b6fa896325cd4d87451e
https://github.com/apache/datafusion-java/pull/94/files#diff-9aa9338a7364e93d5e2e4547564e7eb08e65a70f6d51b6fa896325cd4d87451e
https://github.com/apache/datafusion-java/pull/94/files#diff-9aa9338a7364e93d5e2e4547564e7eb08e65a70f6d51b6fa896325cd4d87451e
https://github.com/apache/datafusion-java/pull/94/files#diff-9aa9338a7364e93d5e2e4547564e7eb08e65a70f6d51b6fa896325cd4d87451e
https://github.com/apache/datafusion-java/pull/94/files#diff-9aa9338a7364e93d5e2e4547564e7eb08e65a70f6d51b6fa896325cd4d87451e
https://github.com/apache/datafusion-java/pull/94/files#diff-9aa9338a7364e93d5e2e4547564e7eb08e65a70f6d51b6fa896325cd4d87451e
https://github.com/apache/datafusion-java/pull/94/files#diff-9aa9338a7364e93d5e2e4547564e7eb08e65a70f6d51b6fa896325cd4d87451e
core/src/main/java/org/apache/datafusion/SessionContextBuilder.javahttps://github.com/apache/datafusion-java/pull/94/files#diff-d94f9dc56a90ad2e3f99a7814d387f3c924307f9632b0ea8fe5f4ac2b08a2532
View file https://github.com/apache/datafusion-java/blob/3b18743b704ebd15d63fa3a79a8e11b8a1143ff8/core/src/main/java/org/apache/datafusion/SessionContextBuilder.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/datafusion-java/pull/94/{{ revealButtonHref }}
https://github.com/apache/datafusion-java/pull/94/files#diff-d94f9dc56a90ad2e3f99a7814d387f3c924307f9632b0ea8fe5f4ac2b08a2532
https://github.com/apache/datafusion-java/pull/94/files#diff-d94f9dc56a90ad2e3f99a7814d387f3c924307f9632b0ea8fe5f4ac2b08a2532
https://github.com/apache/datafusion-java/pull/94/files#diff-d94f9dc56a90ad2e3f99a7814d387f3c924307f9632b0ea8fe5f4ac2b08a2532
https://github.com/apache/datafusion-java/pull/94/files#diff-d94f9dc56a90ad2e3f99a7814d387f3c924307f9632b0ea8fe5f4ac2b08a2532
https://github.com/apache/datafusion-java/pull/94/files#diff-d94f9dc56a90ad2e3f99a7814d387f3c924307f9632b0ea8fe5f4ac2b08a2532
https://github.com/apache/datafusion-java/pull/94/files#diff-d94f9dc56a90ad2e3f99a7814d387f3c924307f9632b0ea8fe5f4ac2b08a2532
https://github.com/apache/datafusion-java/pull/94/files#diff-d94f9dc56a90ad2e3f99a7814d387f3c924307f9632b0ea8fe5f4ac2b08a2532
https://github.com/apache/datafusion-java/pull/94/files#diff-d94f9dc56a90ad2e3f99a7814d387f3c924307f9632b0ea8fe5f4ac2b08a2532
Please reload this pagehttps://github.com/apache/datafusion-java/pull/94/files
Please reload this pagehttps://github.com/apache/datafusion-java/pull/94/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.