You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Substrait round trip fails for struct field access on lambda parameters #25017
A struct field access on a lambda parameter works in SQL, but fails once the plan is converted to Substrait and back.
To Reproduce
CREATETABLEtASSELECT [named_struct('a', 1, 'b', 'x')] AS s;
SELECT array_transform(s, x -> get_field(x, 'b')) FROM t;
The query runs fine on its own. Converting its plan to Substrait (to_substrait_plan) and consuming it back (from_substrait_plan) fails:
Error during planning: Field b not found in struct
Expected behavior
The consumed plan loads and returns the same result as the original query.
Additional context
Substrait types carry no struct field names, so the consumer gives the lambda parameter declared in the plan the fields c0, c1, while the list s keeps its real names from the table schema.
Dotted access on lambda parameters in SQL (e -> e.field) was also reported here originally; it is a separate bug, now tracked in #27088.
changed the title [-]Nested struct field access on lambda parameters is unsupported (SQL and Substrait)[/-][+]Substrait round trip fails for struct field access on lambda parameters[/+]on Nov 4, 2026
Activity
LiaCastaneda commentedon Sep 9, 2026
ok not sure this is super urgent actually, we can use
get_fieldand it will workThe roundtrip wont work though (SQL -> Logical -> substrait -> Logical)
LiaCastaneda commentedon Nov 1, 2026
take
[-]Nested struct field access on lambda parameters is unsupported (SQL and Substrait)[/-][+]Substrait round trip fails for struct field access on lambda parameters[/+]fix: keep struct field names on Substrait lambda parameters (apache#2…
fix: keep struct field names on Substrait lambda parameters (apache#2…