Skip to content

Commit

Permalink
Rename 'location' field to 'url' in StorageLocation message and updat…
Browse files Browse the repository at this point in the history
…e references
  • Loading branch information
lizardoluis committed Nov 21, 2024
1 parent a0fb6bc commit a27d7aa
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion clade/proto/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ message TableObject {
// A single root storage location, hosting many individual tables
message StorageLocation {
// URL of the storage location root
string location = 1;
string url = 1;
// Connection options for the object store client
map<string, string> options = 2;
// Unique storage location identifier
Expand Down
2 changes: 1 addition & 1 deletion src/catalog/metastore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl Metastore {
.map(|store| {
(
store.name,
(store.location, store.options, store.credentials),
(store.url, store.options, store.credentials),
)
})
.collect();
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/flight/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl SeafowlFlightHandler {
.metastore
.object_stores
.get_log_store_for_table(
Url::parse(&store_loc.location).map_err(|e| {
Url::parse(&store_loc.url).map_err(|e| {
DataFusionError::Execution(format!(
"Couldn't parse sync location: {e}"
))
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ pub fn schemas(include_file_without_store: bool) -> ListSchemaResponse {
stores: vec![
StorageLocation {
name: "minio".to_string(),
location: "s3://seafowl-test-bucket".to_string(),
url: "s3://seafowl-test-bucket".to_string(),
options: minio_options_and_credentials().0,
credentials: minio_options_and_credentials().1,
},
StorageLocation {
name: "minio-prefix".to_string(),
location: "s3://seafowl-test-bucket/test-data".to_string(),
url: "s3://seafowl-test-bucket/test-data".to_string(),
options: minio_options_and_credentials().0,
credentials: minio_options_and_credentials().1,
},
StorageLocation {
name: "fake-gcs".to_string(),
location: "gs://test-data".to_string(),
url: "gs://test-data".to_string(),
options: HashMap::from([(
GoogleConfigKey::ServiceAccount.as_ref().to_string(),
fake_gcs_creds(),
Expand All @@ -91,7 +91,7 @@ pub fn schemas(include_file_without_store: bool) -> ListSchemaResponse {
},
StorageLocation {
name: "local_fs".to_string(),
location: format!(
url: format!(
"file://{}/tests/data/",
std::env::var("CARGO_MANIFEST_DIR").unwrap()
),
Expand Down
2 changes: 1 addition & 1 deletion tests/flight/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ async fn test_sync_custom_store(

let store = StorageLocation {
name: "custom-store".to_string(),
location,
url,
options,
credentials,
};
Expand Down

0 comments on commit a27d7aa

Please sign in to comment.