artorias1024 commented on issue #7949: URL: https://github.com/apache/arrow-datafusion/issues/7949#issuecomment-1794052591
If we only focus on Query 17, is the ideal execution plan for this SQL
statement supposed to be like the following?
```
┌───────────────────────────────────┐
│ Aggregate │
│ │
│ │
└──────────────────┬────────────────┘
│
│
▼
┌──────────────────────────────────┐
│ Filter: lineitem.l_quantity < │
│((0.2 * (avg(lineitem.l_quantity) │
│ OVER (?)))) │
│ │
└──────────────────────────────────┘
│
│
│
▼
┌──────────────────────────────────┐
│ Window Aggregate │
│ output: avg(lineitem.l_quantity) │
│ OVER (?), lineitem.l_quantity, │
│ lineitem.l_extendedprice, │
└──────────────────────────────────┘
│
│
│
▼
┌──────────────────────────────────┐
│ Hash Join │
│ │
│ │
│ │
└─────────┬───────────────┬────────┘
│ │
┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
│
│
│
▼ ▼
┌───────────────────────────────┐ ┌───────────────────────────────┐
│ Table Scan: part │ │ Table Scan: lineitem │
│ Filter: part.p_brand = .. AND │ │ │
│ part.p_container = .. │ │ │
│ │ │ │
└───────────────────────────────┘ └───────────────────────────────┘
```
--
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]
