Skip to content

Commit

Permalink
GH-40562: [C++] Repair FileSystem merge error (#40564)
Browse files Browse the repository at this point in the history
### Rationale for this change

Failure to rebase and build when merging #39067 (which renamed `internal::Uri` -> `util::Uri`) led to a merge conflict since #40325 added more usages of `internal::Uri`

### What changes are included in this PR?
Rename internal::Uri -> util::Uri

### Are these changes tested?
Yes

### Are there any user-facing changes?
No

* GitHub Issue: #40562

Authored-by: Benjamin Kietzman <[email protected]>
Signed-off-by: Benjamin Kietzman <[email protected]>
  • Loading branch information
bkietz authored Mar 14, 2024
1 parent b235f83 commit eecd779
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
9 changes: 4 additions & 5 deletions cpp/src/arrow/filesystem/azurefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ AzureOptions::AzureOptions() = default;

AzureOptions::~AzureOptions() = default;

void AzureOptions::ExtractFromUriSchemeAndHierPart(const arrow::internal::Uri& uri,
void AzureOptions::ExtractFromUriSchemeAndHierPart(const Uri& uri,
std::string* out_path) {
const auto host = uri.host();
std::string path;
Expand Down Expand Up @@ -99,7 +99,7 @@ void AzureOptions::ExtractFromUriSchemeAndHierPart(const arrow::internal::Uri& u
}
}

Status AzureOptions::ExtractFromUriQuery(const arrow::internal::Uri& uri) {
Status AzureOptions::ExtractFromUriQuery(const Uri& uri) {
const auto account_key = uri.password();
std::optional<CredentialKind> credential_kind;
std::optional<std::string> credential_kind_value;
Expand Down Expand Up @@ -216,8 +216,7 @@ Status AzureOptions::ExtractFromUriQuery(const arrow::internal::Uri& uri) {
return Status::OK();
}

Result<AzureOptions> AzureOptions::FromUri(const arrow::internal::Uri& uri,
std::string* out_path) {
Result<AzureOptions> AzureOptions::FromUri(const Uri& uri, std::string* out_path) {
AzureOptions options;
options.ExtractFromUriSchemeAndHierPart(uri, out_path);
RETURN_NOT_OK(options.ExtractFromUriQuery(uri));
Expand All @@ -226,7 +225,7 @@ Result<AzureOptions> AzureOptions::FromUri(const arrow::internal::Uri& uri,

Result<AzureOptions> AzureOptions::FromUri(const std::string& uri_string,
std::string* out_path) {
arrow::internal::Uri uri;
Uri uri;
RETURN_NOT_OK(uri.Parse(uri_string));
return FromUri(uri, out_path);
}
Expand Down
8 changes: 3 additions & 5 deletions cpp/src/arrow/filesystem/azurefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@ struct ARROW_EXPORT AzureOptions {
~AzureOptions();

private:
void ExtractFromUriSchemeAndHierPart(const arrow::internal::Uri& uri,
std::string* out_path);
Status ExtractFromUriQuery(const arrow::internal::Uri& uri);
void ExtractFromUriSchemeAndHierPart(const Uri& uri, std::string* out_path);
Status ExtractFromUriQuery(const Uri& uri);

public:
/// \brief Construct a new AzureOptions from an URI.
Expand Down Expand Up @@ -175,8 +174,7 @@ struct ARROW_EXPORT AzureOptions {
/// AzureOptions::ConfigureClientSecretCredential() is called.
/// * client_secret: You must specify "tenant_id" and "client_id"
/// too. AzureOptions::ConfigureClientSecretCredential() is called.
static Result<AzureOptions> FromUri(const arrow::internal::Uri& uri,
std::string* out_path);
static Result<AzureOptions> FromUri(const Uri& uri, std::string* out_path);
static Result<AzureOptions> FromUri(const std::string& uri, std::string* out_path);

Status ConfigureDefaultCredential();
Expand Down

0 comments on commit eecd779

Please sign in to comment.