Kontinuation commented on issue #17422: URL: https://github.com/apache/datafusion/issues/17422#issuecomment-3273733032
Hi. I've also made some progress investigating this issue. I found that it is related to the outer references to columns of other tables in subqueries. [`Expr::OuterReferenceColumn`](https://github.com/apache/datafusion/blob/da3d90ab1ba8245bfd9151aa312b178b1ca311d0/datafusion/expr/src/expr.rs#L365) is defined as `OuterReferenceColumn(DataType, Column)`, it stores only the `DataType` (no metadata) plus the `Column`. The metadata of the referenced column is lost. This leads to further problems dealing with the Arrow extension metadata of outer references. My current approach to fix this problem is to change the definition of `OuterReferenceColumn` to `OuterReferenceColumn(FieldRef, Column)` or `OuterReferenceColumn(FieldMetadata, Column)` to attach field metadata to outer reference columns. Let me know if there's a better approach, or you'd like to continue working on this issue and will submit a fix soon. -- 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