ARROW-5950: [Rust][DataFusion] Add logger#8986
ARROW-5950: [Rust][DataFusion] Add logger#8986Dandandan wants to merge 5 commits intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8986 +/- ##
==========================================
- Coverage 82.65% 82.65% -0.01%
==========================================
Files 200 200
Lines 49675 49678 +3
==========================================
+ Hits 41058 41060 +2
- Misses 8617 8618 +1
Continue to review full report at Codecov.
|
jorgecarleitao
left a comment
There was a problem hiding this comment.
Cool. Yes, good idea.
FWIW for me we can add it to the bin, also.
I think that's a good idea, but don't want to add a logger as dependency directly to datafusion. Doing so at the bin level is not yet supported rust-lang/cargo#1982 It will probably change though rust-lang/rfcs#3020 |
alamb
left a comment
There was a problem hiding this comment.
I agree the idea of allowing logging, as well as the implementation of using the standard logging system is a good idea. Thanks @Dandandan!
It looks like a rebase is needed but otherwise I think this PR is ready to go
|
Thanks @alamb updated the PR |
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
```
Closes apache#8986 from Dandandan/add_logger
Lead-authored-by: Heres, Daniel <danielheres@gmail.com>
Co-authored-by: Daniël Heres <danielheres@gmail.com>
Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
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):