You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/17 19:24:41 UTC
[GitHub] [arrow-datafusion] Dandandan commented on a diff in pull request #3862: put subquery's equal clause into join on clauses instead of filter cl…
Dandandan commented on code in PR #3862:
URL: https://github.com/apache/arrow-datafusion/pull/3862#discussion_r997429260
##########
datafusion/optimizer/src/scalar_subquery_to_join.rs:
##########
@@ -519,13 +558,12 @@ mod tests {
.build()?;
let expected = r#"Projection: customer.c_custkey [c_custkey:Int64]
- Filter: customer.c_custkey = __sq_1.__value [c_custkey:Int64, c_name:Utf8, __value:Int64;N]
- CrossJoin: [c_custkey:Int64, c_name:Utf8, __value:Int64;N]
- TableScan: customer [c_custkey:Int64, c_name:Utf8]
- Projection: MAX(orders.o_custkey) AS __value, alias=__sq_1 [__value:Int64;N]
- Aggregate: groupBy=[[]], aggr=[[MAX(orders.o_custkey)]] [MAX(orders.o_custkey):Int64;N]
- Filter: orders.o_custkey = orders.o_custkey [o_orderkey:Int64, o_custkey:Int64, o_orderstatus:Utf8, o_totalprice:Float64;N]
- TableScan: orders [o_orderkey:Int64, o_custkey:Int64, o_orderstatus:Utf8, o_totalprice:Float64;N]"#;
+ Inner Join: customer.c_custkey = __sq_1.__value [c_custkey:Int64, c_name:Utf8, __value:Int64;N]
Review Comment:
Probably supporting this via https://github.com/apache/arrow-datafusion/issues/3781 would be better? Not sure if inner join is faster here than a cross join (with scalar) + filter?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org