Describe the bug
coalesce(REE_column, literal) fails to plan when one argument is a RunEndEncoded column and another is a non-REE literal. The same failure occurs for any expression routed through type_union_resolution (UNION, NULLIF, CASE, etc.).
Function 'coalesce' user-defined coercion failed with: Execution error:
Fail to find the coerced type, errors: Execution error:
Expect to get struct but got RunEndEncoded("run_ends": non-null Int32, "values": Utf8).
No function matches the given name and argument types
'coalesce(RunEndEncoded("run_ends": non-null Int32, "values": Utf8), Utf8)'.
To Reproduce
CREATE TABLE ree_t AS
SELECT arrow_cast(c, 'RunEndEncoded("run_ends": non-null Int32, "values": Utf8)') AS ree_col
FROM (VALUES ('hello'), (NULL), ('world')) AS t(c);
SELECT coalesce(ree_col, '__null__') FROM ree_t;
Expected behavior
Describe the bug
coalesce(REE_column, literal)fails to plan when one argument is aRunEndEncodedcolumn and another is a non-REE literal. The same failure occurs for any expression routed throughtype_union_resolution(UNION,NULLIF,CASE, etc.).To Reproduce
Expected behavior