-
Notifications
You must be signed in to change notification settings - Fork 79
rest: build resource paths from final config #482
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
Conversation
21775d9 to
f2213de
Compare
|
|
||
| std::unique_ptr<RestCatalogProperties> final_config = RestCatalogProperties::FromMap( | ||
| MergeConfigs(server_config.overrides, config.configs(), server_config.defaults)); | ||
| MergeConfigs(server_config.defaults, config.configs(), server_config.overrides)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! Let's not complicate the PR. I think this change can be added without the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! Let's not complicate the PR. I think this change can be added without the test.
Yes, i create a new pull request for it.https://github.com/apache/iceberg-cpp/pull/483/files
f2213de to
d74a7dc
Compare
d74a7dc to
72a2ef9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to build resource paths from the final config. In this case, the SetBaseUri will no longer be necessary. Could you help remove it?
Btw, I don't think it's worth changing to the signature of the ResourcePaths::Config.
SetBaseUri removed. Do you mean build a ResourcePaths to get config? |
Well, sorry—I might not have put it clearly. I just wanted to say that I agree with your changes to |
|
|
||
| /// \brief Get the /v1/config endpoint path. | ||
| Result<std::string> Config() const; | ||
| static Result<std::string> Config(const std::string& base_uri); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds good to remove SetBaseUri. However, it leads to confusion to make this a static function. I'd suggest to revert this function as you have created a new ResourcePaths based on the server config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds good to remove
SetBaseUri. However, it leads to confusion to make this a static function. I'd suggest to revert this function as you have created a new ResourcePaths based on the server config.
it's reasonable, i've reverted.
aab3c9b to
3edf52c
Compare
wgtmac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this @plusplusjiajia and for the review @HeartLinked
Build ResourcePaths using final URI + prefix after fetching server config: ref:https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L233