mingmwang commented on issue #5060:
URL: 
https://github.com/apache/arrow-datafusion/issues/5060#issuecomment-1485264567

   There is something wrong to the q17 plan in the latest datafusion.
   
   Projection: CAST(SUM(lineitem.l_extendedprice) AS Float64) / Float64(7) AS 
avg_yearly
     Aggregate: groupBy=[[]], aggr=[[SUM(lineitem.l_extendedprice)]]
       Projection: lineitem.l_extendedprice
         Filter: CAST(lineitem.l_quantity AS Decimal128(30, 15)) < 
CAST(__scalar_sq_1.__value AS Decimal128(30, 15)) AND __scalar_sq_1.l_partkey = 
lineitem.l_partkey
           Projection: lineitem.l_partkey, lineitem.l_quantity, 
lineitem.l_extendedprice, __scalar_sq_1.l_partkey, __scalar_sq_1.__value
             Inner Join: part.p_partkey = __scalar_sq_1.l_partkey
               Filter: part.p_partkey = lineitem.l_partkey AND 
lineitem.l_partkey = part.p_partkey
                 Inner Join: lineitem.l_partkey = part.p_partkey
                   TableScan: lineitem projection=[l_partkey, l_quantity, 
l_extendedprice]
                   Projection: part.p_partkey
                     Filter: part.p_brand = Utf8("Brand#23") AND 
part.p_container = Utf8("MED BOX")
                       TableScan: part projection=[p_partkey, p_brand, 
p_container]
               SubqueryAlias: __scalar_sq_1
                 Projection: lineitem.l_partkey, Float64(0.2) * 
CAST(AVG(lineitem.l_quantity) AS Float64) AS __value
                   Aggregate: groupBy=[[lineitem.l_partkey]], 
aggr=[[AVG(lineitem.l_quantity)]]
                     TableScan: lineitem projection=[l_partkey, l_quantity]


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