Skip to content

Support type cast in union #2125

@Ted-Jiang

Description

@Ted-Jiang

in postgresql union support type cast like below

postgres=# select '1.2' as a union select 2.3 as b union select 3 as b ;
  a
-----
 2.3
   3
 1.2
(3 rows)

postgres=# \gdesc
 Column |  Type
--------+---------
 a      | numeric
(1 row)

Maybe we can open a ticket support this ?

In datafusion

SELECT 1 as NUMBER union SELECT '1' ;
Plan("UNION ALL schemas are expected to be the same")

Originally posted by @Ted-Jiang in #2108 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions