-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
ExprSchemable::metadata simply calls through to to_field and thus makes the API more complicated for no real gain
datafusion/datafusion/expr/src/expr_schema.rs
Lines 421 to 424 in 4f95e6d
| fn metadata(&self, schema: &dyn ExprSchema) -> Result<FieldMetadata> { | |
| self.to_field(schema) | |
| .map(|(_, field)| FieldMetadata::from(field.metadata())) | |
| } |
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
- Add deprecation notice to
ExprSchemable::metadata - Add a note / example in the docs for
ExprSchemable::to_fieldthat notes how to get Metadata - Update all existing code locations that call
ExprSchemable::metadatato useExprSchemable::to_fieldinstead
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request