Skip to content

Conversation

@plusplusjiajia
Copy link
Member

@plusplusjiajia plusplusjiajia commented Jan 3, 2026

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

@plusplusjiajia plusplusjiajia force-pushed the fix-prefix branch 2 times, most recently from 21775d9 to f2213de Compare January 3, 2026 16:57
@plusplusjiajia plusplusjiajia reopened this Jan 3, 2026
@plusplusjiajia plusplusjiajia reopened this Jan 4, 2026

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));
Copy link
Member

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.

Copy link
Member Author

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

@plusplusjiajia plusplusjiajia force-pushed the fix-prefix branch 2 times, most recently from f2213de to d74a7dc Compare January 4, 2026 06:59
@plusplusjiajia plusplusjiajia changed the title rest: rebuild resource paths from final config rest: build resource paths from final config Jan 4, 2026
Copy link
Contributor

@HeartLinked HeartLinked left a 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.

@plusplusjiajia
Copy link
Member Author

I think it makes sense to build resource paths from the final config, and I agree to create a new ResourcePaths instance. 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?

@HeartLinked
Copy link
Contributor

HeartLinked commented Jan 5, 2026

I think it makes sense to build resource paths from the final config, and I agree to create a new ResourcePaths instance. 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 src/iceberg/catalog/rest/rest_catalog.cc. :)


/// \brief Get the /v1/config endpoint path.
Result<std::string> Config() const;
static Result<std::string> Config(const std::string& base_uri);
Copy link
Member

@wgtmac wgtmac Jan 5, 2026

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.

Copy link
Member Author

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.

Copy link
Member

@wgtmac wgtmac left a 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

@wgtmac wgtmac merged commit 95ec7a3 into apache:main Jan 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants