kmitchener commented on code in PR #3404:
URL: https://github.com/apache/arrow-datafusion/pull/3404#discussion_r966435939


##########
datafusion/core/tests/sql/predicates.rs:
##########
@@ -427,11 +427,12 @@ async fn multiple_or_predicates() -> Result<()> {
     let expected =vec![
         "Explain [plan_type:Utf8, plan:Utf8]",
         "  Projection: #lineitem.l_partkey [l_partkey:Int64]",
-        "    Projection: #part.p_partkey = #lineitem.l_partkey AS 
#part.p_partkey = #lineitem.l_partkey#lineitem.l_partkey#part.p_partkey, 
#lineitem.l_partkey, #lineitem.l_quantity, #part.p_brand, #part.p_size 
[#part.p_partkey = 
#lineitem.l_partkey#lineitem.l_partkey#part.p_partkey:Boolean;N, 
l_partkey:Int64, l_quantity:Float64, p_brand:Utf8, p_size:Int32]",
-        "      Filter: #part.p_partkey = #lineitem.l_partkey AND #part.p_brand 
= Utf8(\"Brand#12\") AND #lineitem.l_quantity >= CAST(Int64(1) AS Float64) AND 
#lineitem.l_quantity <= CAST(Int64(11) AS Float64) AND #part.p_size BETWEEN 
Int64(1) AND Int64(5) OR #part.p_brand = Utf8(\"Brand#23\") AND 
#lineitem.l_quantity >= CAST(Int64(10) AS Float64) AND #lineitem.l_quantity <= 
CAST(Int64(20) AS Float64) AND #part.p_size BETWEEN Int64(1) AND Int64(10) OR 
#part.p_brand = Utf8(\"Brand#34\") AND #lineitem.l_quantity >= CAST(Int64(20) 
AS Float64) AND #lineitem.l_quantity <= CAST(Int64(30) AS Float64) AND 
#part.p_size BETWEEN Int64(1) AND Int64(15) [l_partkey:Int64, 
l_quantity:Float64, p_partkey:Int64, p_brand:Utf8, p_size:Int32]",
+        "    Projection: #part.p_partkey = #lineitem.l_partkey AS 
#part.p_partkey = #lineitem.l_partkey#lineitem.l_partkey#part.p_partkey, 
#part.p_size >= Int32(1) AS #part.p_size >= Int32(1)Int32(1)#part.p_size, 
#lineitem.l_partkey, #lineitem.l_quantity, #part.p_brand, #part.p_size 
[#part.p_partkey = 
#lineitem.l_partkey#lineitem.l_partkey#part.p_partkey:Boolean;N, #part.p_size 
>= Int32(1)Int32(1)#part.p_size:Boolean;N, l_partkey:Int64, l_quantity:Float64, 
p_brand:Utf8, p_size:Int32]",
+        "      Filter: #part.p_partkey = #lineitem.l_partkey AND #part.p_brand 
= Utf8(\"Brand#12\") AND #lineitem.l_quantity >= CAST(Int64(1) AS Float64) AND 
#lineitem.l_quantity <= CAST(Int64(11) AS Float64) AND #part.p_size <= Int32(5) 
OR #part.p_brand = Utf8(\"Brand#23\") AND #lineitem.l_quantity >= 
CAST(Int64(10) AS Float64) AND #lineitem.l_quantity <= CAST(Int64(20) AS 
Float64) AND #part.p_size <= Int32(10) OR #part.p_brand = Utf8(\"Brand#34\") 
AND #lineitem.l_quantity >= CAST(Int64(20) AS Float64) AND #lineitem.l_quantity 
<= CAST(Int64(30) AS Float64) AND #part.p_size <= Int32(15) [l_partkey:Int64, 
l_quantity:Float64, p_partkey:Int64, p_brand:Utf8, p_size:Int32]",
         "        CrossJoin: [l_partkey:Int64, l_quantity:Float64, 
p_partkey:Int64, p_brand:Utf8, p_size:Int32]",
         "          TableScan: lineitem projection=[l_partkey, l_quantity] 
[l_partkey:Int64, l_quantity:Float64]",
-        "          TableScan: part projection=[p_partkey, p_brand, p_size] 
[p_partkey:Int64, p_brand:Utf8, p_size:Int32]",
+        "          Filter: #part.p_size >= Int32(1) [p_partkey:Int64, 
p_brand:Utf8, p_size:Int32]",

Review Comment:
   Oof, that would be excellent. For another PR if someone doesn't beat me to 
it :)



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