Title: Propagate Java stack traces from JVM upcalls into DataFusionError · Issue #55 · apache/datafusion-java · GitHub
Open Graph Title: Propagate Java stack traces from JVM upcalls into DataFusionError · Issue #55 · apache/datafusion-java
X Title: Propagate Java stack traces from JVM upcalls into DataFusionError · Issue #55 · apache/datafusion-java
Description: Follow-up from PR #46 review (thread). Problem When a Java-implemented upcall throws (currently: scalar UDFs via JniBridge, but the same will apply to any future upcall — table providers, aggregate UDFs, etc.), the native side surfaces o...
Open Graph Description: Follow-up from PR #46 review (thread). Problem When a Java-implemented upcall throws (currently: scalar UDFs via JniBridge, but the same will apply to any future upcall — table providers, aggregate...
X Description: Follow-up from PR #46 review (thread). Problem When a Java-implemented upcall throws (currently: scalar UDFs via JniBridge, but the same will apply to any future upcall — table providers, aggregate...
Opengraph URL: https://github.com/apache/datafusion-java/issues/55
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Propagate Java stack traces from JVM upcalls into DataFusionError","articleBody":"Follow-up from PR #46 review ([thread](https://github.com/apache/datafusion-java/pull/46#discussion_r3255172936)).\n\n## Problem\n\nWhen a Java-implemented upcall throws (currently: scalar UDFs via `JniBridge`, but the same will apply to any future upcall — table providers, aggregate UDFs, etc.), the native side surfaces only the exception class name and `getMessage()` via `DataFusionError::Execution`. The Java stack trace is discarded, which makes debugging much harder than necessary.\n\n## Proposal\n\nCapture the throwable's stack trace on the JVM side and include it in the error string returned to native code. Make verbosity configurable per `SessionContext` so production callers can opt out — e.g. an enum like `message | full | none`, default `full`.\n\n## Scope\n\nShould cover all JVM→native upcall paths, not just scalar UDFs. A shared helper in `org.apache.datafusion.internal.JniBridge` (or a new `JniErrors` utility) that converts a `Throwable` to the configured representation, used wherever upcalls catch exceptions.\n\n## References\n\n- pgwhalen's session-configurable approach in his community binding: https://github.com/pgwhalen/datafusion-java/blob/1c20733aa8b008315af6092a912b58ef3df6a482/datafusion-ffi-java/src/main/java/org/apache/arrow/datafusion/config/ConfigOptions.java#L50-L54","author":{"url":"https://github.com/andygrove","@type":"Person","name":"andygrove"},"datePublished":"2026-05-17T18:49:03Z","url":"https://github.com/apache/datafusion-java/issues/55"}
| 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:d8a4b1ec-f12f-5820-df1f-e29f6440cf2f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B594:C8FAB:227029:2FAF2D:6B0467EF |
| html-safe-nonce | 80e149f6e4c2c3dcf8d602017b06c45d549c7f7cf4b6643e1434b2332b32bda3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTk0OkM4RkFCOjIyNzAyOToyRkFGMkQ6NkIwNDY3RUYiLCJ2aXNpdG9yX2lkIjoiMTczMjgyOTMwOTI2MzE3NzcxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fde5aa37393f791a682050f96b8a669e1c151ec642bbf83256931b7cd30847e1 |
| hovercard-subject-tag | issue:4464583306 |
| 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/55/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9e3552d1e7e4cad9b90d6efefea9df12e4e2d6f9a7f932088d765d94754f083d/apache/datafusion-java/issues/55 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9e3552d1e7e4cad9b90d6efefea9df12e4e2d6f9a7f932088d765d94754f083d/apache/datafusion-java/issues/55 |
| og:image:alt | Follow-up from PR #46 review (thread). Problem When a Java-implemented upcall throws (currently: scalar UDFs via JniBridge, but the same will apply to any future upcall — table providers, aggregate... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andygrove |
| 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