mingmwang commented on code in PR #6372:
URL: https://github.com/apache/arrow-datafusion/pull/6372#discussion_r1201436354


##########
datafusion/optimizer/src/scalar_subquery_to_join.rs:
##########
@@ -694,17 +680,19 @@ mod tests {
             .build()?;
 
         let expected = "Projection: customer.c_custkey [c_custkey:Int64]\
-        \n  Inner Join: customer.c_custkey = __scalar_sq_1.__value, 
customer.c_custkey = __scalar_sq_1.o_custkey [c_custkey:Int64, c_name:Utf8, 
o_custkey:Int64, __value:Int64;N]\
-        \n    TableScan: customer [c_custkey:Int64, c_name:Utf8]\
-        \n    SubqueryAlias: __scalar_sq_1 [o_custkey:Int64, __value:Int64;N]\
-        \n      Projection: orders.o_custkey, MAX(orders.o_custkey) + Int32(1) 
AS __value [o_custkey:Int64, __value:Int64;N]\
-        \n        Aggregate: groupBy=[[orders.o_custkey]], 
aggr=[[MAX(orders.o_custkey)]] [o_custkey:Int64, MAX(orders.o_custkey):Int64;N]\
-        \n          TableScan: orders [o_orderkey:Int64, o_custkey:Int64, 
o_orderstatus:Utf8, o_totalprice:Float64;N]";
+        \n  Filter: customer.c_custkey = __scalar_sq_1.__value 
[c_custkey:Int64, c_name:Utf8, o_custkey:Int64;N, __value:Int64;N]\

Review Comment:
   I'm afraid not.  To remove this filter, we need to enhance the Filter 
pushdown rule and covert such filters to join conditions



-- 
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]

Reply via email to