dd-david-levin opened a new pull request, #20821:
URL: https://github.com/apache/datafusion/pull/20821
## Summary
- Implements `consume_nested` in the default `SubstraitConsumer` trait to
handle `Nested::List` expressions, which represent inline array constructors
like `ARRAY['a', 'b']` in Substrait plans
- `Nested::List` is converted to a `make_array(...)` scalar function call by
recursively converting each element via `from_substrait_rex`
- `Nested::Struct` and `Nested::Map` return `not_impl_err` for now (separate
follow-ups)
## Motivation
Previously, any Substrait plan containing an inline array constructor (e.g.
from SQL like `SELECT f(col, ARRAY['x', 'y'])`) would fail at the consumer with:
```
This feature is not implemented: Nested expression not supported
```
The fix follows the same pattern used by every other expression type in the
consumer — a `from_nested` function in a dedicated `expr/nested.rs` module,
called from the trait's default `consume_nested` method.
## Test plan
- [ ] Existing substrait tests pass
- [ ] Manual verification: `SELECT make_array('a', 'b')` roundtrips through
Substrait producer → consumer correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]