andygrove commented on issue #353:
URL: https://github.com/apache/arrow-ballista/issues/353#issuecomment-1279836013

   Scheduler has this optimized logical plan:
   
   ```
   Calculated optimized plan: Sort: lineitem.l_returnflag ASC NULLS LAST, 
lineitem.l_linestatus ASC NULLS LAST
   ballista-scheduler_1  |   Projection: lineitem.l_returnflag, 
lineitem.l_linestatus, SUM(lineitem.l_quantity) AS sum_qty, 
SUM(lineitem.l_extendedprice) AS sum_base_price, SUM(lineitem.l_extendedprice * 
Int64(1) - lineitem.l_discount) AS sum_disc_price, SUM(lineitem.l_extendedprice 
* Int64(1) - lineitem.l_discount * Int64(1) + lineitem.l_tax) AS sum_charge, 
AVG(lineitem.l_quantity) AS avg_qty, AVG(lineitem.l_extendedprice) AS 
avg_price, AVG(lineitem.l_discount) AS avg_disc, COUNT(UInt8(1)) AS count_order
   ballista-scheduler_1  |     Aggregate: groupBy=[[lineitem.l_returnflag, 
lineitem.l_linestatus]], aggr=[[SUM(lineitem.l_quantity), 
SUM(lineitem.l_extendedprice), SUM(lineitem.l_extendedprice * Float64(1) - 
lineitem.l_discountFloat64(1) - 
lineitem.l_discountlineitem.l_discountFloat64(1)lineitem.l_extendedprice AS 
lineitem.l_extendedprice * Float64(1) - lineitem.l_discount) AS 
SUM(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount), 
SUM(lineitem.l_extendedprice * Float64(1) - lineitem.l_discountFloat64(1) - 
lineitem.l_discountlineitem.l_discountFloat64(1)lineitem.l_extendedprice AS 
lineitem.l_extendedprice * Float64(1) - lineitem.l_discount * Float64(1) + 
lineitem.l_tax) AS SUM(lineitem.l_extendedprice * Int64(1) - 
lineitem.l_discount * Int64(1) + lineitem.l_tax), AVG(lineitem.l_quantity), 
AVG(lineitem.l_extendedprice), AVG(lineitem.l_discount), COUNT(UInt8(1))]]
   ballista-scheduler_1  |       Projection: lineitem.l_extendedprice * 
Float64(1) - lineitem.l_discount AS lineitem.l_extendedprice * Float64(1) - 
lineitem.l_discountFloat64(1) - 
lineitem.l_discountlineitem.l_discountFloat64(1)lineitem.l_extendedprice, 
lineitem.l_quantity, lineitem.l_extendedprice, lineitem.l_discount, 
lineitem.l_tax, lineitem.l_returnflag, lineitem.l_linestatus
   ballista-scheduler_1  |         Filter: lineitem.l_shipdate <= 
Date32("10471")
   ballista-scheduler_1  |           TableScan: lineitem 
projection=[l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, 
l_linestatus, l_shipdate], partial_filters=[lineitem.l_shipdate <= 
Date32("10471")]
   ```
   
   Then the following code fails:
   
   ```
           let plan = session_ctx.create_physical_plan(&optimized_plan).await?;
           let x = format!("{:?}", plan);
           assert!(!x.contains("EmptyExec"));
   ```


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