gerashegalov opened a new issue, #5221:
URL: https://github.com/apache/arrow-datafusion/issues/5221
**Describe the bug**
the header produces the type and value of the cast input rather than of the
cast output which looks like a NOP in some situations and hard to recognize
**To Reproduce**
```
❯ select cast('1' as int);
+-----------+
| Utf8("1") |
+-----------+
| 1 |
+-----------+
1 row in set. Query took 0.000 seconds.
❯ select cast(1 as string);
+----------+
| Int64(1) |
+----------+
| 1 |
+----------+
1 row in set. Query took 0.000 seconds.
```
**Expected behavior**
Use some indication of the cast being applied.
E.g. use the output expression name or part of it
`Utf8("1") AS Int64(1) `
```
❯ explain select cast(1 as string);
+---------------+--------------------------------------+
| plan_type | plan |
+---------------+--------------------------------------+
| logical_plan | Projection: Utf8("1") AS Int64(1) |
| | EmptyRelation |
| physical_plan | ProjectionExec: expr=[1 as Int64(1)] |
| | EmptyExec: produce_one_row=true |
| | |
+---------------+--------------------------------------+
2 rows in set. Query took 0.000 seconds.
```
**Additional context**
n/a
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]