Skip to content

Better name display for CAST #10274

@yyy1000

Description

@yyy1000

Describe the bug

The type name for CAST is not correct when using datafusion-cli

To Reproduce

DataFusion CLI v37.1.0

SELECT CAST(2 AS INTEGER);
+----------+
| Int64(2) |
+----------+
| 2 |
+----------+
1 row(s) fetched.
Elapsed 0.027 seconds.

SELECT CAST(2 AS DOUBLE);
+----------+
| Int64(2) |
+----------+
| 2.0 |
+----------+
1 row(s) fetched.
Elapsed 0.005 seconds.

SELECT arrow_typeof(CAST(2 AS DOUBLE));
+------------------------+
| arrow_typeof(Int64(2)) |
+------------------------+
| Float64 |
+------------------------+
1 row(s) fetched.
Elapsed 0.008 seconds.

Expected behavior

No response

Additional context

I'm finding what's wrong with it. 🤔

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions