Deprecate ExprSchemable::metadata
- 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?
- Similar to https://github.com/apache/datafusion/issues/18844
ExprSchemable::metadata simply calls through to `to_field` and thus makes the API more complicated for no real gain
https://github.com/apache/datafusion/blob/4f95e6d70249d0d839939facc67f95cd7f54526e/datafusion/expr/src/expr_schema.rs#L421-L424
### Describe the solution you'd like
We should deprecate `metadata` to encourage people to use `to_field` directly
The deprecation guidelines are here: https://datafusion.apache.org/contributor-guide/api-health.html#deprecation-guidelines
### Describe alternatives you've considered
1. Add deprecation notice to `ExprSchemable::metadata`
2. Add a note / example in the docs for `ExprSchemable::to_field` that notes how to get Metadata
3. Update all existing code locations that call `ExprSchemable::metadata` to use `ExprSchemable::to_field` instead
### Additional context
_No response_
Contributor guide
Research direction
Start in datafusion/expr/src/expr_schema.rs at ExprSchemable::metadata and review the deprecation guidelines linked in the issue. Search for existing calls to metadata and inspect ExprSchemable::to_field documentation. Done means metadata is deprecated, to_field explains metadata access, and existing call sites use to_field.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100