malinjawi opened a new pull request, #12821:
URL: https://github.com/apache/gluten/pull/12821

   ## What changes are proposed in this pull request?
   
   Substrait identifies nested struct fields by ordinal, but the Velox converter
   currently represents every level as a name-based field access. Struct fields
   may have duplicate or empty names, so name lookup can select the wrong child.
   
   Add a dedicated conversion path for full `Expression::selection` expressions.
   The root input remains a `FieldAccessTypedExpr`, while nested struct fields 
use
   `DereferenceTypedExpr` with their Substrait ordinals. Existing direct
   `FieldReference` callers remain unchanged, and invalid references continue to
   fail with a user error.
   
   Nested aggregate masks are rejected explicitly because Velox aggregation 
masks
   must reference a top-level input field. This prevents an unsupported nested 
mask
   from being silently dropped.
   
   Simplified evaluation of the resulting ordinal dereference also requires
   [Velox #18537](https://github.com/facebookincubator/velox/pull/18537).
   
   ## How was this patch tested?
   
   - Added regression coverage for duplicate unnamed nested fields.
   - Added validation coverage for invalid ordinals and non-struct traversal.
   - Added plan-conversion coverage for top-level and nested aggregate masks.
   - Ran ClangFormat 15 and compiled all changed translation units with 
`-Werror`.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-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]

Reply via email to