kevinwilfong opened a new pull request, #12950: URL: https://github.com/apache/gluten/pull/12950
## What changes are proposed in this pull request? Gluten currently does not allow casting NULL constants to complex types, it fails during plan validation. This is an easy case to miss as Spark will typically constant fold it directly to a NULL constant. However, when the right side of a left outer join is empty at runtime AQE will replace the join with a project that casts NULLs to the types of the columns on the right side of the join. Since this happens after constant folding we see it in the plan and it causes Gluten to fallback to vanilla Spark. Velox already supports this trivially, so all that's needed is a case in isAllowedCast to allow it. ## How was this patch tested? Added unit tests in Substrait2VeloxPlanValidatorTest to ensure casting NULL to ROW, ARRAY, and MAP types is allowed. Added an end to end test in MiscOperatorSuite that demonstrates how the issue arises in a Spark plan. ## Was this patch authored or co-authored using generative AI tooling? co-authored using Claude Opus 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]
