Propagate Java stack traces from JVM upcalls into DataFusionError
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start by tracing Java-implemented upcalls through org.apache.datafusion.internal.JniBridge, beginning with scalar UDFs and DataFusionError::Execution handling. Identify every JVM-to-native path that catches a Throwable and how SessionContext configuration can reach them. Done means all current and future upcalls use one configurable message, full stack trace, or no-trace representation, with full as the default.
Written by the indexing model from the issue text.
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 only the exception class name and getMessage() via DataFusionError::Execution. The Java stack trace is discarded, which makes debugging much harder than necessary.
Proposal
Capture 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.
Scope
Should 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.
References
- 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
- Dominant language
- Java
- Stars
- 32
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/datafusion-java
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
apache/datafusion-java#116 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/datafusion-java#112 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 42/100
apache/datafusion-java#96 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 38/100
apache/datafusion-java#95 ·
-
Create first release Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apache/datafusion-java#86 · 3 comments ·
All issues in apache/datafusion-java
Similar issues
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
emitter:client:csharp feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100