gene-bordegaray commented on code in PR #24670:
URL: https://github.com/apache/datafusion/pull/24670#discussion_r3915183167
##########
datafusion/physical-plan/src/projection.rs:
##########
@@ -270,6 +270,22 @@ impl ProjectionExec {
))
}
+ /// Returns whether this projection's output metadata differs from the
+ /// metadata derived from its expressions and input schema.
+ fn overrides_metadata(&self) -> Result<bool> {
+ let derived_schema = self
+ .projector
+ .projection()
+ .project_schema(self.input.schema().as_ref())?;
+ let output_schema = self.schema();
+ Ok(derived_schema.metadata() != output_schema.metadata()
+ || derived_schema
+ .fields()
+ .iter()
+ .zip(output_schema.fields())
+ .any(|(derived, output)| derived.metadata() !=
output.metadata()))
+ }
Review Comment:
yes makes sense
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]