Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Propagate Java stack traces from JVM upcalls into DataFusionError

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java
Domain
backend

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

Dominant language
Java
Stars
32
Forks
12
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/datafusion-java

All issues in apache/datafusion-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.