felixloesing opened a new pull request, #13785: URL: https://github.com/apache/gluten/pull/13785
## What changes are proposed in this pull request? When `PartialProjectRule` can't convert a `ProjectExec` that contains a UDF or blacklisted expression, it throws away the `ValidationResult`. The fallback report then shows only the original reason, such as the unsupported UDF, and doesn't say why partial project wasn't used. This PR adds the rejection reason to the `ProjectExec`'s fallback tag, for example: `Partial project rejected: The partial projected expressions need all the columns in child output` - **No change to which plans fall back.** This only changes the reported reason. - **Validation order.** `ColumnarPartialProjectExec` is now validated first, and the outer `ProjectExecTransformer` only if that passes. The result is the same as before, since both must pass. The native validation of the outer node is skipped when partial project is already ruled out. - **Only relevant projects are tagged.** Projects with no UDF or blacklisted expression don't get a No UDF or blacklisted expressions reason. - **Small visibility change.** `replacedAlias` on `ColumnarPartialProjectExec` is now a `val`, so the rule can check it. This lets users and developers see which partial project check blocked a project. The possible checks are: ``` - all child columns are needed, - too many RowToColumn columns, - an unsupported expression or data type, - a failed native validation of the remaining project. ``` ## How was this patch tested? New test record partial project rejection reason in `UDFPartialProjectSuite`: - **Rejected case:** `SELECT plus_one(l_orderkey) FROM lineitem` needs every child column. Its `GlutenPlanFallbackEvent` contains Partial project rejected: The partial projected expressions need all the columns in child output. - **Accepted case:** `SELECT plus_one(l_orderkey), l_partkey FROM lineitem` uses `ColumnarPartialProjectExec`, and no fallback reason contains Partial project rejected. Example fallback reason for the rejected query: ``` BEFORE: Project: <original reason, e.g. the unsupported UDF> AFTER : Project: <original reason>; Partial project rejected: The partial projected expressions need all the columns in child output ``` ## 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]
