rdtr opened a new pull request, #13602: URL: https://github.com/apache/gluten/pull/13602
## What changes are proposed in this pull request? `HashJoinBuilder.nativeBuild` waits for the parallel build tasks with `folly::collectAll(futures).wait()`, which discards their exceptions. A failed task leaves null entries in `otherTables` and `hashTableBuilders`, and the code after the wait dereferences them, so the JVM dies with SIGSEGV instead of the query failing. This replaces the wait with `folly::collectAll(futures).get()` and calls `throwUnlessValue()` on every result. All tasks have finished by then, so none of them still uses the locals they capture by reference when the exception unwinds the frame. The serial path already propagates exceptions and is unchanged. The builders and tables of the tasks that did succeed are owned by those local vectors and are released on unwinding, and nothing is added to `HashTableCache` for a failed build. #13216 replaces this parallel build block with a fake-task build that reports failures through `task->error()`. This fixes the code as it stands on main, and #13216 would remove it if it lands. Fixes #13601 ## How was this patch tested? `GlutenParallelBroadcastJoinSuite` has a new test, `broadcast build: a failure in a build worker is reported as an exception`. It calls `nativeBuild` with 4 build threads and a join key that is not in the schema, then asserts that the exception names that key. On main the test crashes the JVM with SIGSEGV in `nativeBuild`. With the change, the suite passes on Spark 3.5 and 4.0 (9 tests each). ## Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
