Skip to content

Commit 292304b

Browse files
authored
Try infer file io scheme from metadata location ahead of warehouse path (#1590)
## Which issue does this PR close? - Closes #1589 ## What changes are included in this PR? As S3Tables REST endpoint accept `warehouse` only in ARN format, Current code logic will infer file io scheme through `warehouse_path` in ARN format as `arn` which is wrong and unable to be processed. Changed the code logic to try infer file io scheme with `metadata_location` before `warehouse_path`, This makes file io scheme infer as `s3` correctly. ## Are these changes tested? Test only in `load_table` path for rest catalog implementation
1 parent 50cd2ab commit 292304b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/catalog/rest/src/catalog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ impl RestCatalog {
320320
None => None,
321321
};
322322

323-
let file_io = match warehouse_path.or(metadata_location) {
323+
let file_io = match metadata_location.or(warehouse_path) {
324324
Some(url) => FileIO::from_path(url)?
325325
.with_props(props)
326326
.with_extensions(self.file_io_extensions.clone())

0 commit comments

Comments
 (0)