kosiew opened a new pull request, #16672: URL: https://github.com/apache/datafusion/pull/16672
## Which issue does this PR close? - Part of a series of PR to address #16652. ## Rationale for this change This change standardizes the internal representation of several `DataFusionError` variants by wrapping them in `Box<T>`. This: - Improves performance by reducing the memory footprint of the `DataFusionError` enum. - Enables more consistent and idiomatic error handling. - Complies with Clippy recommendations for large error enums. - Simplifies pattern matching and variant propagation logic. ## What changes are included in this PR? - Refactored the `DataFusionError` enum to use `Box<T>` for: - `ArrowError` - `ParquetError` - `AvroError` - `object_store::Error` - `ParserError` - `SchemaError` - `JoinError` - Updated all relevant match arms and constructors to handle boxed errors. - Refactored error-related macros (`arrow_datafusion_err!`, `sql_datafusion_err!`, etc.) to use `Box<T>`. - Adjusted test cases and error assertions for boxed variants. - Added internal documentation for Copilot and agent linting (`copilot-instructions.md`, `AGENTS.md`). ## Are these changes tested? Yes. These changes are covered by existing unit and integration tests, which validate correct error handling and propagation. Additional assertions were added where necessary to handle boxed variants. ## Are there any user-facing changes? No. This refactor maintains API compatibility and does not introduce breaking changes for users. Error messages and types remain consistent from the user's perspective. -- 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