LiaCastaneda opened a new issue, #25017:
URL: https://github.com/apache/datafusion/issues/25017
### Is your feature request related to a problem or challenge?
`e.field` doesn't resolve when `e` is a lambda parameter of struct type, in
both the SQL frontend and the Substrait consumer path. Accessing the same
nested field on an ordinary struct-typed column works fine in both -- this is
specific to lambda-bound variables.
### To Reproduce
```
-- Works: whole lambda parameter, no dotted access. Real field names
-- (rule_number, rule_action) survive into the output type.
SELECT array_transform(
make_array(named_struct('rule_number', 1, 'rule_action', 'allow')),
e -> e
);
-- Fails: dotted access into the lambda parameter's own struct fields.
SELECT array_transform(
make_array(named_struct('rule_number', 1, 'rule_action', 'allow')),
e -> e.rule_action
);
```
The second query fails with `Schema error: No field named e.rule_action`. --
even purely in the SQL planner, no Substrait involved.
### Describe the solution you'd like
Support referencing a field in the struct type inside a lambda (in both
paths)
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
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]