jackye1995 commented on code in PR #11021: URL: https://github.com/apache/iceberg/pull/11021#discussion_r1811146654
########## aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java: ########## @@ -443,6 +453,16 @@ public boolean recoverFile(String path) { return recoverVersion.map(version -> recoverObject(version, location.bucket())).orElse(false); } + /** + * Check for a bucket name matching -does not look at endpoint. + * + * @param bucket bucket to probe. + * @return true if the suffix is present + */ + public static boolean checkIfS3Express(final String bucket) { + return bucket.endsWith(S3EXPRESS_STORE_SUFFIX); Review Comment: I think we could do both, in S3URI: ``` public static boolean isDirectoryBucket(String bucket) { ... } public boolean isDirectoryBucket() { return isDirectoryBucket(this.bucket); } ``` But it feels more natural to me to have the logic in `S3URI` rather than `S3FileIO`, because this is a method to check against the S3 naming conventions, not really specific to anything in `FileIO`. If there is a `S3Util` class we could also add the method there, but we don't have that right now, and it is probably not worth adding a new class just for this small method. `S3URI` is protected and not exposed to public, so we can move things around and refactor in the future if we want. What do you think? -- 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