Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the storage location name as the key in the clade schema #556

Merged
merged 3 commits into from
Jul 12, 2024

Conversation

gruuya
Copy link
Contributor

@gruuya gruuya commented Jul 8, 2024

As opposed to keying them via their root URL.

@@ -11,16 +11,18 @@ message TableObject {
string name = 1;
// Path within the provided storage location, if any
string path = 2;
Copy link
Collaborator

@SergeiPatiakin SergeiPatiakin Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we don't care about backwards compatibility here, but should we try to follow Protobuf guidelines on field number assignment?: https://protobuf.dev/programming-guides/proto3/#assigning . This could help make errors clearer in case of a server/client protocol mismatch.

Specifically:

  • NewProtocol.TableObject.store seems like a distinct field from OldProtocol.TableObject.location, so should use a new field number
  • NewProtocol.StorageLocation.location seems like the same field as OldProtocol.StorageLocation.location, so should stay as field number 1
  • NewProtocol.StorageLocation.options seems like the same field as OldProtocol.StorageLocation.options, so should stay as field number 2
@@ -140,21 +140,21 @@ impl Metastore {
async fn build_table(
&self,
table: TableObject,
store_options: &HashMap<String, HashMap<String, String>>,
store_options: &HashMap<String, (String, HashMap<String, String>)>,
Copy link
Collaborator

@SergeiPatiakin SergeiPatiakin Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's 4 Strings in this type and it wasn't clear on first reading what each of them is. Maybe add a comment about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will do.

@gruuya gruuya merged commit 90839ec into main Jul 12, 2024
4 checks passed
@gruuya gruuya deleted the clade-storage-location-id branch July 12, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants