datafusion
datafusion copied to clipboard
refactor: move metrics module to `datafusion-common` crate
Which issue does this PR close?
Rationale for this change
https://github.com/apache/datafusion/issues/18456 requires this refactor. Now we have dependency physical-plan -> physical-expr -> common, and metrics module lives in physical-plan. We want metrics module to directly accessible from physical-expr crate, so they should be moved to common crate.
For compile time concern, I've checked cargo build --profile release-nonlto --timings benchmark, compiling common crate takes 5s in 3min total, so it has no noticeable impact. They're all keep in this project wide root datafusion-common dependency for simplicity.
What changes are included in this PR?
- Metrics module depends on memory util
get_record_batch_memory_size, so it's first moved tocommoncrate - Move metrics module to
commoncrate
Above moves are all re-exported in the original place to keep the public APIs backward-compatible