kevinwilfong opened a new pull request, #13478: URL: https://github.com/apache/gluten/pull/13478
## What changes are proposed in this pull request? Today, when schema pruning removes struct field, GetStructField only updates the field ordinals when directly accessing the field from a struct. When it's accessed through a map or array of structs, the original ordinal is maintained. Likewise GetArrayStructFields never updates the ordinals of the struct fields. This change updates GetStructField and GetArrayStructFields in the ExpressionConverter to leverage ProjectionOverSchema to recursively update struct field ordinals in cases where schema pruning was applied. This fixes a bug that resulted in failures if the ordinal pointed off the end of the updated list of struct fields or to a field with a different type, or worse incorrect results if it pointed at a different field with the same type. ## How was this patch tested? Added unit tests that demonstrated the issue, and validate that the bug is fixed. Likewise added tests for various edge cases and failure scenarios. Verified the original query that prompted the investigation now succeeds. ## Was this patch authored or co-authored using generative AI tooling? Generated-by: GPT-6.1 Sol -- 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]
