LuciferYang opened a new pull request, #12442: URL: https://github.com/apache/gluten/pull/12442
### What changes were proposed in this pull request? `InsertTransitions.applyForNode` has a branch that handles the case where a child's `Convention` is `isNone` (row type and batch type both `None`) by returning the child unchanged. The pre-existing comment already notes that such a plan is not executable. No production plan reaches this branch today, but the silent fall-through would defer the failure to task execution with an error unrelated to the real cause. This PR replaces the silent no-op with a `GlutenException` that names the offending parent and child. The same latent hole exists in `Transitions.enforceReq`, which currently reaches `assert(!from.isNone, ...)` inside `Transition.Factory#findTransition` and raises an `AssertionError` without plan identity; the fix adds a symmetric pre-check there so both entry points behave the same way. ### Why are the changes needed? Defense-in-depth: keeps a code path that is currently unreachable from silently degrading if it ever does become reachable (e.g. a future `GlutenPlan` that inadvertently declares both types as `None`). No behavior change for any currently-shipping plan. ### Does this PR introduce any user-facing change? No. ### How was this patch tested? `mvn -pl gluten-core,gluten-substrait -am -Pspark-3.5 spotless:check` passes. `TransitionSuite` gains three tests covering (1) an unexecutable child at position 0, (2) an unexecutable child at a non-first position under a binary parent, and (3) an unexecutable root plan routed through `enforceReq`. Each was verified against the pre-fix code and observed to fail with the expected signal. A new `NoConventionLeaf` fixture in `TransitionSuiteBase` supplies the `rowType=None, batchType=None` state. -- 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]
