Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPC-H Query 17 #168

Closed
Tracked by #158
alamb opened this issue Apr 26, 2021 · 2 comments · Fixed by #2885
Closed
Tracked by #158

TPC-H Query 17 #168

alamb opened this issue Apr 26, 2021 · 2 comments · Fixed by #2885
Labels
datafusion Changes in the datafusion crate
Milestone

Comments

@alamb
Copy link
Contributor

alamb commented Apr 26, 2021

Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-11530

Subquery in (WHERE) expression support is missing.

{{Error: NotImplemented("Unsupported ast node Subquery(Query { with: None, body: Select(Select { distinct: false, top: None, projection: [UnnamedExpr(BinaryOp { left: Value(Number("0.2")), op: Multiply, right: Function(Function { name: ObjectName([Ident { value: "avg", quote_style: None }]), args: [Unnamed(Identifier(Ident { value: "l_quantity", quote_style: None }))], over: None, distinct: false }) })], from: [TableWithJoins { relation: Table { name: ObjectName([Ident { value: "lineitem", quote_style: None }]), alias: None, args: [], with_hints: [] }, joins: [] }], selection: Some(BinaryOp { left: Identifier(Ident { value: "l_partkey", quote_style: None }), op: Eq, right: Identifier(Ident { value: "p_partkey", quote_style: None }) }), group_by: [], having: None }), order_by: [], limit: None, offset: None, fetch: None }) in sqltorel")}}

@alamb alamb added the datafusion Changes in the datafusion crate label Apr 26, 2021
@Dandandan Dandandan added this to the TPC-H milestone Aug 23, 2021
@andygrove
Copy link
Member

Latest failure:

Error: NotImplemented("Physical plan does not support logical expression (Subquery: Projection: Float64(0.2) * #AVG(lineitem.l_quantity)\n  Aggregate: groupBy=[[]], aggr=[[AVG(#lineitem.l_quantity)]]\n    Filter: #lineitem.l_partkey = #part.p_partkey\n      TableScan: lineitem projection=None)")
t

@avantgardnerio
Copy link
Contributor

Resolved in this branch which I am getting ready for PR.

+-------------------+
| avg_yearly        |
+-------------------+
| 348406.0542857141 |
+-------------------+
Query 17 iteration 2 took 91715.6 ms and returned 1 rows
Query 17 avg time: 92059.84 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate
Projects
None yet
4 participants