Ted-Jiang opened a new issue, #2281: URL: https://github.com/apache/arrow-datafusion/issues/2281
**Is your feature request related to a problem or challenge? Please describe
what you are trying to do.**
Use or we can get pushdown in parquet Exec
```
explain select count(*) from test where o_orderkey=2785313 or o_orderkey =
2 or o_orderkey = 3;
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan
|
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan | Projection: #COUNT(UInt8(1))
|
| | Aggregate: groupBy=[[]], aggr=[[COUNT(UInt8(1))]]
|
| | Filter: #test.o_orderkey = Int64(2785313) OR
#test.o_orderkey = Int64(2) OR #test.o_orderkey = Int64(3)
|
| | TableScan: test projection=Some([0]),
partial_filters=[#test.o_orderkey = Int64(2785313) OR #test.o_orderkey =
Int64(2) OR #test.o_orderkey = Int64(3)]
|
| physical_plan | ProjectionExec: expr=[COUNT(UInt8(1))@0 as
COUNT(UInt8(1))]
|
| | HashAggregateExec: mode=Final, gby=[],
aggr=[COUNT(UInt8(1))]
|
| | CoalescePartitionsExec
|
| | HashAggregateExec: mode=Partial, gby=[],
aggr=[COUNT(UInt8(1))]
|
| | CoalesceBatchesExec: target_batch_size=4096
|
| | FilterExec: o_orderkey@0 = 2785313 OR
o_orderkey@0 = 2 OR o_orderkey@0 = 3
|
| | RepartitionExec:
partitioning=RoundRobinBatch(16)
|
| | ParquetExec: limit=None,
partitions=[/Users/yangjiang/test-data/tpch-1g-oneFile/orders/part-00000-0e58b960-37a0-44c9-8561-53f0c32cf038-c000.snappy.parquet],
predicate=o_orderkey_min@0 <= 2785313 AND 2785313 <= o_orderkey_max@1 OR
o_orderkey_min@0 <= 2 AND 2 <= o_orderkey_max@1 OR o_orderkey_min@0 <= 3 AND 3
<= o_orderkey_max@1, projection=[o_orderkey] |
| |
```
But use `in` we can not push the filter down , get `predicate=true `
```
explain select count(*) from test where o_orderkey in(2785313, 2, 3);
+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan
|
+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan | Projection: #COUNT(UInt8(1))
|
| | Aggregate: groupBy=[[]], aggr=[[COUNT(UInt8(1))]]
|
| | Filter: #test.o_orderkey IN ([Int64(2785313),
Int64(2), Int64(3)])
|
| | TableScan: test projection=Some([0]),
partial_filters=[#test.o_orderkey IN ([Int64(2785313), Int64(2), Int64(3)])]
|
| physical_plan | ProjectionExec: expr=[COUNT(UInt8(1))@0 as
COUNT(UInt8(1))]
|
| | HashAggregateExec: mode=Final, gby=[],
aggr=[COUNT(UInt8(1))]
|
| | CoalescePartitionsExec
|
| | HashAggregateExec: mode=Partial, gby=[],
aggr=[COUNT(UInt8(1))]
|
| | CoalesceBatchesExec: target_batch_size=4096
|
| | FilterExec: o_orderkey@0 IN ([Literal { value:
Int64(2785313) }, Literal { value: Int64(2) }, Literal { value: Int64(3) }])
|
| | RepartitionExec:
partitioning=RoundRobinBatch(16)
|
| | ParquetExec: limit=None,
partitions=[/Users/yangjiang/test-data/tpch-1g-oneFile/orders/part-00000-0e58b960-37a0-44c9-8561-53f0c32cf038-c000.snappy.parquet],
predicate=true, projection=[o_orderkey] |
| |
|
+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set. Query took 0.007 seconds.
```
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features
you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
--
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]
