Dandandan opened a new pull request #8986:
URL: https://github.com/apache/arrow/pull/8986


   It seems useful to me to do some extra (debug, info, etc) logging.
   
   I added to the benchmark.
   Executing with `RUST_LOG="debug"` gives (next to sqlparser logs):
   
   ```
   [2020-12-21T23:04:59Z DEBUG datafusion::execution::context] Logical plan:
        Sort: #l_returnflag ASC NULLS FIRST, #l_linestatus ASC NULLS FIRST
         Projection: #l_returnflag, #l_linestatus, #SUM(l_quantity) AS sum_qty, 
#SUM(l_extendedprice) AS sum_base_price, #SUM(l_extendedprice Multiply Int64(1) 
Minus l_discount) AS sum_disc_price, #SUM(l_extendedprice Multiply Int64(1) 
Minus l_discount Multiply Int64(1) Plus l_tax) AS sum_charge, #AVG(l_quantity) 
AS avg_qty, #AVG(l_extendedprice) AS avg_price, #AVG(l_discount) AS avg_disc, 
#COUNT(UInt8(1)) AS count_order
           Aggregate: groupBy=[[#l_returnflag, #l_linestatus]], 
aggr=[[SUM(#l_quantity), SUM(#l_extendedprice), SUM(#l_extendedprice Multiply 
Int64(1) Minus #l_discount), SUM(#l_extendedprice Multiply Int64(1) Minus 
#l_discount Multiply Int64(1) Plus #l_tax), AVG(#l_quantity), 
AVG(#l_extendedprice), AVG(#l_discount), COUNT(UInt8(1))]]
             Filter: #l_shipdate LtEq CAST(Utf8("1998-09-02") AS Date32(Day))
               TableScan: lineitem projection=None
   [2020-12-21T23:04:59Z DEBUG datafusion::execution::context] Optimized 
logical plan:
        Sort: #l_returnflag ASC NULLS FIRST, #l_linestatus ASC NULLS FIRST
         Projection: #l_returnflag, #l_linestatus, #SUM(l_quantity) AS sum_qty, 
#SUM(l_extendedprice) AS sum_base_price, #SUM(l_extendedprice Multiply Int64(1) 
Minus l_discount) AS sum_disc_price, #SUM(l_extendedprice Multiply Int64(1) 
Minus l_discount Multiply Int64(1) Plus l_tax) AS sum_charge, #AVG(l_quantity) 
AS avg_qty, #AVG(l_extendedprice) AS avg_price, #AVG(l_discount) AS avg_disc, 
#COUNT(UInt8(1)) AS count_order
           Aggregate: groupBy=[[#l_returnflag, #l_linestatus]], 
aggr=[[SUM(#l_quantity), SUM(#l_extendedprice), SUM(#l_extendedprice Multiply 
Int64(1) Minus #l_discount), SUM(#l_extendedprice Multiply Int64(1) Minus 
#l_discount Multiply Int64(1) Plus #l_tax), AVG(#l_quantity), 
AVG(#l_extendedprice), AVG(#l_discount), COUNT(UInt8(1))]]
             Filter: #l_shipdate LtEq CAST(Utf8("1998-09-02") AS Date32(Day))
               TableScan: lineitem projection=Some([4, 5, 6, 7, 8, 9, 10])
   Query 1 iteration 9 took 802.7 ms
   Query 1 avg time: 915.30 ms
   ```


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to