LuciferYang opened a new pull request, #13198: URL: https://github.com/apache/gluten/pull/13198
## What changes are proposed in this pull request? `bindGetStructField` maps a `GetStructField` chain to the ordinal the native plan reads. It found the root attribute by name and kept the last match, so when a projection's input holds two same-named struct attributes with different layouts, such as a struct column `s` on both sides of a join, fields were read from the wrong struct. It also looked each field up by name and kept the last match, which misreads structs with duplicate field names. This binds the root attribute by exprId. When the input attribute has the type the expression was resolved against, the expression's own ordinal is used. When the type differs, each level is still looked up by name, but a level that has the name more than once now makes the operator fall back instead of guessing. ## How was this patch tested? `StructFieldBindSuite` adds unit tests for binding the root by exprId next to a same-named decoy, for duplicate field names keeping their ordinals, for the by-name lookup on a pruned input struct, and for falling back on an ambiguous name. Two end-to-end tests compare against vanilla Spark for the join in the issue and for `lateral view inline(...) v as x, x`, and assert that the struct fields are read by a `ProjectExecTransformer`. ## Was this patch authored or co-authored using generative AI tooling? Yes. Generated-by: Claude Opus. -- 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]
