Jordano-Dremio opened a new pull request, #12755: URL: https://github.com/apache/iceberg/pull/12755
Object Instances of the OutputFile Interface are occasionally referenced directly in error messages. [Example](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/avro/AvroIterable.java#L104). In order for the error message to print the path of the InputFile, each implementation must have a toString() method overridden (typically with .location()). However, if the Implementation does not override the toString, the result is: Failed to open file: com.random.folder.exec.store.iceberg.RandomOutputFileImplementation@5e3d9f12 instead of leaving it up to the implementation to properly override the toString() method, it would be best to print the OutputFile.location(). There are many [examples](https://github.com/apache/iceberg/blob/main/orc/src/main/java/org/apache/iceberg/orc/OrcMetrics.java#L101) in the Iceberg Codebase where we already print the .location instead of the Object's reference ID. This pattern should be followed. Note: We address a similar issue with the 'InputFile' Interface in the following PR: -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org