Comments (3)
Hi @alamb, I am trying to work on this.
I am not very familiar on the
InterleaveExec
in the optimizer. As initial thought, the interleaveExec is acting as a Repartition with equal number of input partitions and output partitions and thus a nature idea is to reusestreaming_merge
with respect to the input size. Wdyt?
Hi @xinlifoobar -- this sounds like it is on the right track
from arrow-datafusion.
Hi @alamb, I am trying to work on this.
I am not very familiar on the InterleaveExec
in the optimizer. As initial thought, the interleaveExec is acting as a Repartition with equal number of input partitions and output partitions and thus a nature idea is to reuse streaming_merge
with respect to the input size. Wdyt?
from arrow-datafusion.
Hi @alamb, found another interesting case while testing. I am not very sure, do you think this could apply InterleaveExec
with same order by sets?
explain select count(*) from ((select distinct c1, c2 from t3 order by c1 ) union all (select distinct c1, c2 from t4 order by c1)) group by cube(c1,c2);
+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan |
+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan | Projection: COUNT(*) |
| | Aggregate: groupBy=[[CUBE (t3.c1, t3.c2)]], aggr=[[COUNT(Int64(1)) AS COUNT(*)]] |
| | Union |
| | Sort: t3.c1 ASC NULLS LAST |
| | Aggregate: groupBy=[[t3.c1, t3.c2]], aggr=[[]] |
| | TableScan: t3 projection=[c1, c2] |
| | Sort: t4.c1 ASC NULLS LAST |
| | Aggregate: groupBy=[[t4.c1, t4.c2]], aggr=[[]] |
| | TableScan: t4 projection=[c1, c2] |
| physical_plan | ProjectionExec: expr=[COUNT(*)@2 as COUNT(*)] |
| | AggregateExec: mode=FinalPartitioned, gby=[c1@0 as c1, c2@1 as c2], aggr=[COUNT(*)], ordering_mode=PartiallySorted([0]) |
| | SortExec: expr=[c1@0 ASC NULLS LAST], preserve_partitioning=[true] |
| | CoalesceBatchesExec: target_batch_size=8192 |
| | RepartitionExec: partitioning=Hash([c1@0, c2@1], 14), input_partitions=14 |
| | RepartitionExec: partitioning=RoundRobinBatch(14), input_partitions=2 |
| | AggregateExec: mode=Partial, gby=[(c1@0 as c1, c2@1 as c2), (NULL as c1, c2@1 as c2), (c1@0 as c1, NULL as c2), (NULL as c1, NULL as c2)], aggr=[COUNT(*)] |
| | UnionExec |
| | CoalescePartitionsExec |
| | AggregateExec: mode=FinalPartitioned, gby=[c1@0 as c1, c2@1 as c2], aggr=[] |
| | CoalesceBatchesExec: target_batch_size=8192 |
| | RepartitionExec: partitioning=Hash([c1@0, c2@1], 14), input_partitions=1 |
| | AggregateExec: mode=Partial, gby=[c1@0 as c1, c2@1 as c2], aggr=[] |
| | MemoryExec: partitions=1, partition_sizes=[0] |
| | CoalescePartitionsExec |
| | AggregateExec: mode=FinalPartitioned, gby=[c1@0 as c1, c2@1 as c2], aggr=[] |
| | CoalesceBatchesExec: target_batch_size=8192 |
| | RepartitionExec: partitioning=Hash([c1@0, c2@1], 14), input_partitions=1 |
| | AggregateExec: mode=Partial, gby=[c1@0 as c1, c2@1 as c2], aggr=[] |
| | MemoryExec: partitions=1, partition_sizes=[0] |
| | |
+---------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 row(s) fetched.
With InterleaveExec
:
ProjectionExec:
AggregateExec:
InterleaveExec:
SortExec:
AggregateExec:
SortExec:
AggregateExec:
from arrow-datafusion.
Related Issues (20)
- Add example for writing a `FileFormat` HOT 4
- Add `union_tag` function HOT 1
- Add `union_extract` function HOT 1
- Add more support for ScalarValue::Float16 where Float32 and Float64 are supported HOT 1
- Nullability of array_agg
- Allow casting durations to different timeunits HOT 1
- `gcd` returns negative results HOT 1
- Methods should return `&Arc` references to inner trait objects for `&self` HOT 1
- Excessive number of filters overflows the stack HOT 4
- `LCM` panicked due to overflow
- Running tests uses 50.1GB on Ubuntu HOT 5
- DataFusion weekly project plan (Andrew Lamb) - June 24, 2024 HOT 3
- Make Eq with negative float zero compat with other engines HOT 1
- Support `Decimal` and `Decimal256` Parquet Data Page Statistics HOT 1
- Support `Timestamp` Parquet Data Page Statistics HOT 4
- Support `Date` Parquet Data Page Statistics HOT 1
- Support `Time` Parquet Data Page Statistics HOT 6
- regression: query error with case when as the group field HOT 6
- ScalarValue::new_ten error cites one not ten
- Support Map as a ScalarValue HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arrow-datafusion.