Repository navigation
[CORE] Preserve original Java exceptions across JNI (combined reference) - #13133
zhztheplayer merged 3 commits into
Conversation
|
Run Gluten Clickhouse CI on x86 |
|
Regarding the bot comment: this is the automatically generated ClickHouse x86 CI trigger, not a code-review request, so no code change is needed. The trigger workflow already completed successfully for |
|
Run Gluten Clickhouse CI on x86 |
1 similar comment
|
Run Gluten Clickhouse CI on x86 |
Merge the exact lower-layer test corrections from apache#13133 (28f72ef), preserving the separate cast implementation and lint corrections without rewriting either draft history. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Run Gluten Clickhouse CI on x86 |
Merge exact lower-layer commit85fdfff8 from apache#13133 without rewriting history. The lazy-output test now supplies a valid UTC session timezone while retaining all throwable identity and lazy-loading assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
85fdfff to
fe9157e
Compare
|
Run Gluten Clickhouse CI on x86 |
Carry structured native cast attribution and UTF-8 diagnostics through the existing Java exception transport, then translate recognized cast reasons with Spark error factories. Preserve original causes, schema translation, unknown errors, and cast evaluation modes. Add focused JVM, native-attribution, iterator, and Velox cast regressions. Depends on apache#13133 for the shared JNI throwable carrier. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Run Gluten Clickhouse CI on x86 |
Merge the verified apache#13133 dependency c272939, preserving backend-specific source registration and lint coverage without changing production code or rewriting either draft history. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Run Gluten Clickhouse CI on x86 |
1 similar comment
|
Run Gluten Clickhouse CI on x86 |
Merge exact lower-layer corrections through 0b6431d from apache#13133. Retain captured Java throwables after native diagnostic allocation failures and preserve memory callbacks through Velox and direct JNI boundaries. Cast classification and cast regression contents remain unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
/delta-test |
|
🔄 Delta Spark UT started by @felipepessoto (~2.5 h). View run |
|
Run Gluten Clickhouse CI on x86 |
|
🔄 Delta Spark UT started by @felipepessoto (~2.5 h). View run |
Merge exact lower-layer baseline commit 684f7df from apache#13133. Remove only the 34 tests confirmed passing in Delta run 41188486128 and retain all 451 observed failures, including unresolved native casts and ARRAY/MAP no-throw cases. Replaying the original eight JUnit shards with fail-on-fixed enabled passes every gate. This is baseline verification against lower-only results, not execution evidence for the upper native cast implementation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
684f7df to
f88c269
Compare
Split layer 2 of apache#13133, depending on apache#13560. Preserve the Java carrier through Velox input streams and lazy output loading, with focused native, real-JVM, and Delta constraint regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
8ea3b66 to
ddd98ec
Compare
|
Run Gluten Clickhouse CI on x86 |
Carry structured native cast attribution and UTF-8 diagnostics through the existing Java exception transport, then translate recognized cast reasons with Spark error factories. Preserve original causes, schema translation, unknown errors, and cast evaluation modes. Add focused JVM, native-attribution, iterator, and Velox cast regressions. Depends on apache#13133 for the shared JNI throwable carrier. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Split layer 2 of apache#13133, depending on apache#13560. Preserve the Java carrier through Velox input streams and lazy output loading, with focused native, real-JVM, and Delta constraint regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the bare Java throwable case and verify the exact direct cause. Also exercise an already-translated GlutenException and require the same wrapper object through nested iterators, matching the upstream no-rewrap policy. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Wrap both Velox and Arrow allocation callbacks with the existing Java throwable carrier. Cover reserve/unreserve identity, allocator behavior, and delegated metrics without introducing a backend dependency into core JNI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ddd98ec to
68cb0f8
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
Review effort: Lite
| used -= size | ||
| if (failUnreserve) { | ||
| failures += 1 | ||
| throw original | ||
| } |
| val actual = intercept[Exception] { | ||
| out.hasNext0() | ||
| } |
| import java.io.PrintWriter | ||
| import java.util.{Collections, Iterator => JIterator} | ||
|
|
||
| import scala.collection.JavaConverters._ |
|
Run Gluten Clickhouse CI on x86 |
Split layer 2 of apache#13133, depending on apache#13560. Preserve the Java carrier through Velox input streams and lazy output loading, with focused native, real-JVM, and Delta constraint regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Split layer 2 of apache#13133, depending on apache#13560. Preserve the Java carrier through Velox input streams and lazy output loading, with focused native, real-JVM, and Delta constraint regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Hi @zhztheplayer. This combined reference wasn't updated with the latest changes from #13561. Can we quickly revert (before changes are made on top of it) and merge #13561 instead? |
|
The revert PR: #13812 |
|
@felipepessoto No problem. Would suggest converting to draft next time when a PR is in progress |
Yeah, my bad. Thanks |
Not necessarily just because I am a lazy reviewer and not always going through the PR again before merging, Althought I am supposed to gather context torwards merging as well XD |
Yeah, my bad just found I merged the wrong PR, so let's use draft next time so it helps reviewer make fewer mistakes. |
Carry structured native cast attribution and UTF-8 diagnostics through the existing Java exception transport, then translate recognized cast reasons with Spark error factories. Preserve original causes, schema translation, unknown errors, and cast evaluation modes. Add focused JVM, native-attribution, iterator, and Velox cast regressions. Depends on apache#13133 for the shared JNI throwable carrier. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


What changes are proposed in this pull request?
Preserve original Java throwables through native execution instead of replacing them with exceptions reconstructed from text.
The reference and #13563 have the same commit
68cb0f83d673dab0129c781d5c788a0eb8086ceband same complete treec5682df7701327f0dd90a61c3262f4611b107f2c. The iterator dependency is2bf1181f1177b683733ff7d22fd60dfbad7900fd; the chain is based on upstreammainat2011f60b96bb54164d76092bb5d2df9c6c01e3ac. This reference follows the reviewed layers rather than independently rebasing beyond them.TRYfrom suppressing callback failures; native-only errors and memory metrics retain their existing behavior.GlutenExceptionreuse policy in the nested-iterator regression: retain the bare throwable case, also exercise an already-translated wrapper, require the exact direct original cause in both, and require the same wrapper object for the translated input. No production behavior or metadata assertions were weakened.The remaining upstream diff is 11 files, +1025/-22, containing the iterator and memory layers plus their tests/documentation. Merged core/CI code and the Delta known-failure baseline are not changed by this diff. No native cast classification from #13135, assertion weakening, missing-error ARRAY/MAP changes, partition-materialization dependency, or hybrid Java/C++ stack merging is included; this does not resolve #9642.
How was this patch tested?
This reference reuses #13563's evidence for the identical commit/tree; no separate reference runtime run was performed. Commit/tree equality and the unchanged memory-layer patch were verified before publication.
On the final memory-layer head, 18 current-source Delta cases passed with zero failures, errors, or skips: three
GlutenDeltaStatsLifecycleSuitecases plus six strictGlutenDeltaNativeConstraintSuitecases on each of Spark 3.5/Scala 2.12 and Spark 4.1/Scala 2.13. These cover the newly inherited Delta statistics lifecycle changes, including cancellation/worker cleanup, aborted and multi-file statistics, alongside exact native-constraint exception identity and unchanged table commits.The 16 JNI integration cases from the previous memory head, plus 22 native exception cases and 14 core JUnit bridge cases from earlier verified component runs, are reused evidence—not new executions. The unchanged JNI suite includes both memory callbacks and exact direct-cause/same-translated-wrapper assertions. Native/bridge inputs, dependency pin, and library hashes were unchanged; the native build check reported no work before Maven. Current Java builds, bundles, and required formatting/Scalastyle/license checks passed, and both bundles match the verified native hashes. All upstream Delta lifecycle, harness, CI, and known-failure baseline changes were retained.
The integration runs used Linux x86_64/JDK 17, normal two-library loading with
-Xcheck:jni, the Maven wrapper, and IBM/veloxdft-2026_11_10(67fa1bbee62e9f8752b3c34cc92f179022cd2ac6). Existing JNI/thread warnings remain; older injected-failure and Surefire diagnostics belong to the reused bridge evidence. No new full Delta matrix, GPU, ARM/Kafka, or ClickHouse/Bolt runtime run, or green remote CI, is claimed.Was this patch authored or co-authored using generative AI tooling?
Generated-by: GitHub Copilot 1.0.102-0.unstable.r40949665530.gab1eef5 (GPT-6 Astra, model ID: gpt-6-astra)