`MetricValue::Custom` encoding\decoding support
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Is your feature request related to a problem or challenge?
Datafusion 49 brings `MetricValue::Custom { name: Cow<'static, str>, value: Arc,}` which can be used to extend metric handling. With datafusion ballista shipping execution metrics from executors to scheduler question it is not clear how can custom value can be encoded/decoded more details about metric serialisation can be found at [1] ? At the moment with the effort to bring datafusion 49 support to ballista [2] we would throw error in case of custom metrics value.
[1]: https://github.com/milenkovicm/arrow-ballista/blob/e1e9f6ca423fd558664a7f2fb3b1bc3ed07d7db8/ballista/core/src/serde/scheduler/to_proto.rs#L121
[2]: https://github.com/apache/datafusion-ballista/pull/1285
### Describe the solution you'd like
We need to provide a clean path to support encoding/decoding of `MetricValue::Custom`
### Describe alternatives you've considered
Alternative approach would be current approach where custom metrics value would trigger error or to be ignored (somehow)
### Additional context
_No response_
Contributor guide
Research direction
Start with the linked ballista/core/src/serde/scheduler/to_proto.rs location and the DataFusion 49 MetricValue::Custom definition. Compare the existing metric serialization path with the linked Ballista support work, then define encoding and decoding behavior for custom values, including the fallback behavior. Done means custom metrics no longer cause unsupported-value errors and round-trip behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100