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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]