alamb commented on issue #3031:
URL:
https://github.com/apache/arrow-datafusion/issues/3031#issuecomment-1217785185
Here is a self contained reproducer for anyone following along:
```sql
❯ create table foo as select column1 as d from (values (1), (2));
+---+
| d |
+---+
| 1 |
| 2 |
+---+
2 rows in set. Query took 0.005 seconds.
❯ create table bar as select cast (d as decimal) as d from foo;
+--------------+
| d |
+--------------+
| 1.0000000000 |
| 2.0000000000 |
+--------------+
2 rows in set. Query took 0.005 seconds.
❯ explain select * from bar where d = 1.4;
+---------------+-----------------------------------------------------------------------------------+
| plan_type | plan
|
+---------------+-----------------------------------------------------------------------------------+
| logical_plan | Projection: #bar.d
|
| | Filter: #bar.d = Float64(1.4)
|
| | TableScan: bar projection=[d]
|
| physical_plan | ProjectionExec: expr=[d@0 as d]
|
| | CoalesceBatchesExec: target_batch_size=4096
|
| | FilterExec: CAST(d@0 AS Decimal128(38, 15)) = CAST(1.4
AS Decimal128(38, 15)) |
| | RepartitionExec: partitioning=RoundRobinBatch(16)
|
| | MemoryExec: partitions=1, partition_sizes=[1]
|
| |
|
+---------------+-----------------------------------------------------------------------------------+
2 rows in set. Query took 0.005 seconds.
```
The FilterExec line above should not have the CAST operations in them
--
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]