andygrove commented on issue #3421: URL: https://github.com/apache/arrow-datafusion/issues/3421#issuecomment-1244012121
This issue exists in DataFusion 11.0.0. I don't think adding the new
TypeCoercion rule introduced any regression here.
```
DataFusion CLI v11.0.0
❯ create external table test (a int, b float) stored as csv location
'test.csv';
0 rows in set. Query took 0.011 seconds.
❯ explain verbose select a from test where b = 2;
+-------------------------------------------------------+----------------------------------------------------------------------------------------+
| plan_type | plan
|
+-------------------------------------------------------+----------------------------------------------------------------------------------------+
| initial_logical_plan | Projection:
#test.a |
| | Filter: #test.b
= Int64(2) |
| | TableScan:
test |
| logical_plan after simplify_expressions | SAME TEXT AS ABOVE
|
| logical_plan after decorrelate_where_exists | SAME TEXT AS ABOVE
|
| logical_plan after decorrelate_where_in | SAME TEXT AS ABOVE
|
| logical_plan after decorrelate_scalar_subquery | SAME TEXT AS ABOVE
|
| logical_plan after subquery_filter_to_join | SAME TEXT AS ABOVE
|
| logical_plan after eliminate_filter | SAME TEXT AS ABOVE
|
| logical_plan after common_sub_expression_eliminate | SAME TEXT AS ABOVE
|
| logical_plan after eliminate_limit | SAME TEXT AS ABOVE
|
| logical_plan after projection_push_down | Projection:
#test.a |
| | Filter: #test.b
= Int64(2) |
| | TableScan:
test projection=[a, b] |
| logical_plan after rewrite_disjunctive_predicate | SAME TEXT AS ABOVE
|
| logical_plan after reduce_outer_join | SAME TEXT AS ABOVE
|
| logical_plan after filter_push_down | Projection:
#test.a |
| | Filter: #test.b
= Int64(2) |
| | TableScan:
test projection=[a, b], partial_filters=[#test.b = Int64(2)] |
| logical_plan after limit_push_down | SAME TEXT AS ABOVE
|
| logical_plan after SingleDistinctAggregationToGroupBy | SAME TEXT AS ABOVE
|
| logical_plan | Projection:
#test.a |
| | Filter: #test.b
= Int64(2) |
| | TableScan:
test projection=[a, b], partial_filters=[#test.b = Int64(2)] |
| initial_physical_plan | ProjectionExec:
expr=[a@0 as a] |
| | FilterExec: b@1
= CAST(2 AS Float32) |
| | CsvExec:
files=[tmp/test.csv], has_header=false, limit=None, projection=[a, b] |
| |
|
| physical_plan after aggregate_statistics | SAME TEXT AS ABOVE
|
| physical_plan after hash_build_probe_order | SAME TEXT AS ABOVE
|
| physical_plan after coalesce_batches | ProjectionExec:
expr=[a@0 as a] |
| |
CoalesceBatchesExec: target_batch_size=4096
|
| | FilterExec:
b@1 = CAST(2 AS Float32) |
| | CsvExec:
files=[tmp/test.csv], has_header=false, limit=None, projection=[a, b] |
| |
|
| physical_plan after repartition | ProjectionExec:
expr=[a@0 as a] |
| |
CoalesceBatchesExec: target_batch_size=4096
|
| | FilterExec:
b@1 = CAST(2 AS Float32) |
| |
RepartitionExec: partitioning=RoundRobinBatch(48)
|
| | CsvExec:
files=[tmp/test.csv], has_header=false, limit=None, projection=[a, b] |
| |
|
| physical_plan after add_merge_exec | SAME TEXT AS ABOVE
|
| physical_plan | ProjectionExec:
expr=[a@0 as a] |
| |
CoalesceBatchesExec: target_batch_size=4096
|
| | FilterExec:
b@1 = CAST(2 AS Float32) |
| |
RepartitionExec: partitioning=RoundRobinBatch(48)
|
| | CsvExec:
files=[tmp/test.csv], has_header=false, limit=None, projection=[a, b] |
| |
|
+-------------------------------------------------------+----------------------------------------------------------------------------------------+
23 rows in set. Query took 0.001 seconds.
--
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]
