You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "gerashegalov (via GitHub)" <gi...@apache.org> on 2023/02/08 20:09:44 UTC

[GitHub] [arrow-datafusion] gerashegalov opened a new issue, #5221: CLI query result header for cast expressions with literals is confusing

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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] andygrove commented on issue #5221: CLI query result header for cast expressions with literals is confusing

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on issue #5221:
URL: https://github.com/apache/arrow-datafusion/issues/5221#issuecomment-1427417908

   This is quite confusing UX.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org