berkaysynnada commented on code in PR #15779: URL: https://github.com/apache/datafusion/pull/15779#discussion_r2058837968
########## datafusion/physical-expr-common/src/physical_expr.rs: ########## @@ -333,6 +333,15 @@ pub trait PhysicalExpr: Send + Sync + Display + Debug + DynEq + DynHash { // This is a safe default behavior. Ok(None) } + + /// Adapt this [`PhysicalExpr`] to a new schema. + /// For example, `Column("b", 1)` can be adapted to `Column("b", 0)` + /// given the schema `Schema::new(vec![("b", DataType::Int32)])`. + fn with_schema(&self, _schema: &Schema) -> Result<Option<Arc<dyn PhysicalExpr>>> { Review Comment: DataSource's and FileSources can also share a similar API. Let me open a draft PR for this? -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org