-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support type cast in union #2125
Comments
Seems to be resolved as of master 96512ac Running on datafusion-cli: DataFusion CLI v14.0.0
❯ SELECT 1 as NUMBER union SELECT '1';
+--------+
| number |
+--------+
| 1 |
+--------+
1 row in set. Query took 0.007 seconds.
❯ explain verbose SELECT 1 as NUMBER union SELECT '1';
+------------------------------------------------------------+-----------------------------------------------------------------------------------+
| plan_type | plan |
+------------------------------------------------------------+-----------------------------------------------------------------------------------+
| initial_logical_plan | Distinct: |
| | Union |
| | Projection: CAST(Int64(1) AS Utf8) AS number |
| | EmptyRelation |
| | Projection: Utf8("1") AS number |
| | EmptyRelation |
| logical_plan after inline_table_scan | SAME TEXT AS ABOVE |
| logical_plan after type_coercion | SAME TEXT AS ABOVE |
| logical_plan after simplify_expressions | Distinct: |
| | Union |
| | Projection: Utf8("1") AS number |
| | EmptyRelation |
| | Projection: Utf8("1") AS number |
| | EmptyRelation |
| logical_plan after unwrap_cast_in_comparison | SAME TEXT AS ABOVE |
...
| logical_plan after projection_push_down | SAME TEXT AS ABOVE |
| logical_plan | Distinct: |
| | Union |
| | Projection: Utf8("1") AS number |
| | EmptyRelation |
| | Projection: Utf8("1") AS number |
| | EmptyRelation |
...
54 rows in set. Query took 0.005 seconds.
❯ Probably fixed by #3407? |
@Jefffrey Thanks
i will close this issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in postgresql union support type cast like below
Maybe we can open a ticket support this ?
In datafusion
Originally posted by @Ted-Jiang in #2108 (comment)
The text was updated successfully, but these errors were encountered: