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
Physical planning errors out with the message: Error: Internal("Input field name $f3 does not match with the projection expression Utf8(\"people\")") (line where error arises). This happens though the substrait consumer path, it generates a logical plan out of a substrait plan sucessfully but it fails after, while doing the physical plan. I've observed this occurs mostly while doing UNIONs, some substrait plans come with the alias $fN for some columns. For example, for the substrait reproducer I shared below we get the following Logical Plan:
Projection: Utf8("people") AS product_category, Utf8("people")__temp__0 AS product_type, product_key
Union
Projection: Utf8("people"), Utf8("people") AS Utf8("people")__temp__0, sales.product_key
Left Join: sales.product_key = food.@food_id
TableScan: sales
TableScan: food
Union
Projection: people.$f3, people.$f5, people.product_key0
Left Join: people.product_key0 = food.@food_id
TableScan: people
TableScan: food
TableScan: more_products
It fails while building the uppermost ProjectionExecUtf8("people") AS product_category, Utf8("people")__temp__0 AS product_type, product_key, debugging, I noticed that even though the LogicalPlan Union node has as a schema "Utf8(\"people\")" the UnionExec physcial node ends up having "$f3"
I believe the solution relies on handling schema names coercion while doing the schema for the unionExec here: The find_or_first takes the first field that is nullable either if its from the right or left side of the union, so since "Utf8(\"people\")" is not nullable it will take $f3 which is nullable.
Describe the bug
Physical planning errors out with the message:
Error: Internal("Input field name $f3 does not match with the projection expression Utf8(\"people\")")
(line where error arises). This happens though the substrait consumer path, it generates a logical plan out of a substrait plan sucessfully but it fails after, while doing the physical plan. I've observed this occurs mostly while doing UNIONs, some substrait plans come with the alias$fN
for some columns. For example, for the substrait reproducer I shared below we get the following Logical Plan:It fails while building the uppermost ProjectionExec
Utf8("people") AS product_category, Utf8("people")__temp__0 AS product_type, product_key
, debugging, I noticed that even though the LogicalPlan Union node has as a schema"Utf8(\"people\")"
the UnionExec physcial node ends up having"$f3"
To Reproduce
The following substrait plan:
Expected behavior
Build physical plan sucessfully
Additional context
Using version 47.0
The text was updated successfully, but these errors were encountered: