kuzu icon indicating copy to clipboard operation
kuzu copied to clipboard

Unsupported casting function from UNION to UNION.

Open mxwli opened this issue 10 months ago • 0 comments

Creating new nodes with a UNION type is not possible.

CREATE NODE TABLE tab(id SERIAL, un UNION(a INT32), PRIMARY KEY(id));
CREATE (t:tab {un: union_value(a := 1)});

This gives the error message

RuntimeError: Conversion exception: Unsupported casting function from UNION to UNION.

This seems to be because union_value(a := 1) creates a UNION(a INT64)

Edit: The main problem is that union_value isn't sufficient to define the type of the union, and we don't have good casting from different union types.

mxwli avatar Mar 26 '24 19:03 mxwli