diff --git a/src/arrow_parquet/uri_utils.rs b/src/arrow_parquet/uri_utils.rs index 745058f..e1dc475 100644 --- a/src/arrow_parquet/uri_utils.rs +++ b/src/arrow_parquet/uri_utils.rs @@ -58,8 +58,6 @@ fn parse_bucket_and_key(uri: &Url) -> (String, String) { fn object_store_with_location(uri: &Url, copy_from: bool) -> (Arc, Path) { if uri.scheme() == "s3" { - ensure_object_store_access_privilege(copy_from); - let (bucket_name, key) = parse_bucket_and_key(uri); let storage_container = PG_BACKEND_TOKIO_RUNTIME @@ -71,8 +69,6 @@ fn object_store_with_location(uri: &Url, copy_from: bool) -> (Arc { let uri = parse_uri(&uri); + ensure_access_privilege_to_uri(&uri, true); let parquet_metadata = parquet_metadata_from_uri(&uri); let mut rows = vec![]; @@ -137,6 +140,7 @@ mod parquet { > { let uri = parse_uri(&uri); + ensure_access_privilege_to_uri(&uri, true); let parquet_metadata = parquet_metadata_from_uri(&uri); let created_by = parquet_metadata @@ -174,6 +178,7 @@ mod parquet { > { let uri = parse_uri(&uri); + ensure_access_privilege_to_uri(&uri, true); let parquet_metadata = parquet_metadata_from_uri(&uri); let kv_metadata = parquet_metadata.file_metadata().key_value_metadata(); diff --git a/src/parquet_udfs/schema.rs b/src/parquet_udfs/schema.rs index 7e5c68f..c2fcf00 100644 --- a/src/parquet_udfs/schema.rs +++ b/src/parquet_udfs/schema.rs @@ -1,4 +1,6 @@ -use crate::arrow_parquet::uri_utils::{parquet_schema_from_uri, parse_uri, uri_as_string}; +use crate::arrow_parquet::uri_utils::{ + ensure_access_privilege_to_uri, parquet_schema_from_uri, parse_uri, uri_as_string, +}; use ::parquet::{ format::{ConvertedType, FieldRepetitionType, LogicalType, Type}, @@ -32,6 +34,7 @@ mod parquet { > { let uri = parse_uri(&uri); + ensure_access_privilege_to_uri(&uri, true); let parquet_schema = parquet_schema_from_uri(&uri); let root_type = parquet_schema.root_schema();