alamb commented on issue #5471:
URL:
https://github.com/apache/arrow-datafusion/issues/5471#issuecomment-1680921731
🤔 I got the same results as you did @appletreeisyellow
```
(arrow_dev) alamb@MacBook-Pro-8:~/Downloads/arrow-datafusion/datafusion-cli$
./target/debug/datafusion-cli
DataFusion CLI v29.0.0
❯ create table foo(x varchar) as values ('foo'), ('bar');
0 rows in set. Query took 0.006 seconds.
❯ create table foo_dict as select arrow_cast(x, 'Dictionary(Int32, Utf8)')
as x from foo;
0 rows in set. Query took 0.005 seconds.
❯ select upper(x) from foo_dict;
+-------------------+
| upper(foo_dict.x) |
+-------------------+
| FOO |
| BAR |
+-------------------+
2 rows in set. Query took 0.004 seconds.
```
And in fact the plan looks reasonable (though not performant) by
automatically casting the argument to a varchar
```
❯ explain select upper(x) from foo_dict;
+---------------+-----------------------------------------------------------------------------------------------+
| plan_type | plan
|
+---------------+-----------------------------------------------------------------------------------------------+
| logical_plan | Projection: upper(CAST(foo_dict.x AS Utf8))
|
| | TableScan: foo_dict projection=[x]
|
| physical_plan | ProjectionExec: expr=[upper(CAST(x@0 AS Utf8)) as
upper(foo_dict.x)] |
| | MemoryExec: partitions=16, partition_sizes=[1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
| |
|
+---------------+-----------------------------------------------------------------------------------------------+
2 rows in set. Query took 0.004 seconds.
```
Thus I am not sure why it was failing in IOx in
https://github.com/influxdata/influxdb_iox/pull/8479 🤔 I think more
investigation is needed
--
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]