Closed andygrove closed 4 days ago
I am moving this to draft for now. The plan creation time now matches the ScanExec metric since https://github.com/apache/datafusion-comet/pull/1105 was merged.
I would still like to see the planning time, but only if it excludes execution time for the first batch. I have some ideas I want to try out to resolve this.
24/11/19 19:04:23 INFO core/src/execution/jni_api.rs: Comet native query plan with metrics (plan creation took 1339 ms):
ShuffleWriterExec: partitioning=UnknownPartitioning(1), metrics=[output_rows=10, elapsed_compute=32.602µs, spill_count=0, spilled_bytes=0, data_size=704]
ScanExec: source=[], schema=[col_0: Int64, col_1: Decimal128(34, 4), col_2: Date32, col_3: Int32], metrics=[output_rows=20, elapsed_compute=1.339205712s, cast_time=1ns]
@viirya @kazuyukitanimura @comphead Could you take another look? The scope increased slightly (see updated PR description).
This is what the logging looks like now for native query plans with metrics:
[Stage 18 Partition 25] plan creation (including CometScans fetching first batches) took 1.490261253s:
ShuffleWriterExec: partitioning=UnknownPartitioning(1), metrics=[output_rows=10, elapsed_compute=55.574µs, spill_count=0, spilled_bytes=0, data_size=704]
ScanExec: source=[], schema=[col_0: Int64, col_1: Decimal128(34, 4), col_2: Date32, col_3: Int32], metrics=[output_rows=20, elapsed_compute=1.490176093s, cast_time=1ns]
@viirya @kazuyukitanimura @comphead Could you take another look? The scope increased slightly (see updated PR description).
This is what the logging looks like now for native query plans with metrics:
[Stage 18 Partition 25] plan creation (including CometScans fetching first batches) took 1.490261253s: ShuffleWriterExec: partitioning=UnknownPartitioning(1), metrics=[output_rows=10, elapsed_compute=55.574µs, spill_count=0, spilled_bytes=0, data_size=704] ScanExec: source=[], schema=[col_0: Int64, col_1: Decimal128(34, 4), col_2: Date32, col_3: Int32], metrics=[output_rows=20, elapsed_compute=1.490176093s, cast_time=1ns]
its lgtm, do you need to info!
explicitly planning times?
its lgtm, do you need to
info!
explicitly planning times?
I'm going to keep iterating on this. I would like to see the actual planning time without the partial execution of fetching the first batch.
Which issue does this PR close?
Part of https://github.com/apache/datafusion-comet/issues/1098
Rationale for this change
What changes are included in this PR?
Various improvements:
elapsed_compute
metricget_next_batch
in CometScanelapsed_compute
metricExample of "native explain" logging
How are these changes tested?
Non-functional change. Existing tests.