From e6c55fd41deafc981afd20c439f1a2ccfbb4b6f9 Mon Sep 17 00:00:00 2001 From: Benjamin Kietzman Date: Thu, 14 Mar 2024 16:18:30 -0400 Subject: [PATCH 1/2] GH-40562: [C++] Repair FileSystem merge error --- cpp/src/arrow/filesystem/azurefs.cc | 8 ++++---- cpp/src/arrow/filesystem/azurefs.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpp/src/arrow/filesystem/azurefs.cc b/cpp/src/arrow/filesystem/azurefs.cc index dd9fb817b7a..b691cd2e34c 100644 --- a/cpp/src/arrow/filesystem/azurefs.cc +++ b/cpp/src/arrow/filesystem/azurefs.cc @@ -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; @@ -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 credential_kind; std::optional credential_kind_value; @@ -216,7 +216,7 @@ Status AzureOptions::ExtractFromUriQuery(const arrow::internal::Uri& uri) { return Status::OK(); } -Result AzureOptions::FromUri(const arrow::internal::Uri& uri, +Result AzureOptions::FromUri(const Uri& uri, std::string* out_path) { AzureOptions options; options.ExtractFromUriSchemeAndHierPart(uri, out_path); @@ -226,7 +226,7 @@ Result AzureOptions::FromUri(const arrow::internal::Uri& uri, Result 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); } diff --git a/cpp/src/arrow/filesystem/azurefs.h b/cpp/src/arrow/filesystem/azurefs.h index c4c4c3fc9fd..3986187e0d2 100644 --- a/cpp/src/arrow/filesystem/azurefs.h +++ b/cpp/src/arrow/filesystem/azurefs.h @@ -127,9 +127,9 @@ struct ARROW_EXPORT AzureOptions { ~AzureOptions(); private: - void ExtractFromUriSchemeAndHierPart(const arrow::internal::Uri& uri, + void ExtractFromUriSchemeAndHierPart(const Uri& uri, std::string* out_path); - Status ExtractFromUriQuery(const arrow::internal::Uri& uri); + Status ExtractFromUriQuery(const Uri& uri); public: /// \brief Construct a new AzureOptions from an URI. @@ -175,7 +175,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 FromUri(const arrow::internal::Uri& uri, + static Result FromUri(const Uri& uri, std::string* out_path); static Result FromUri(const std::string& uri, std::string* out_path); From 8d7c8b6bf947998e944bce6fdd35339607eb560d Mon Sep 17 00:00:00 2001 From: Benjamin Kietzman Date: Thu, 14 Mar 2024 16:27:41 -0400 Subject: [PATCH 2/2] format --- cpp/src/arrow/filesystem/azurefs.cc | 3 +-- cpp/src/arrow/filesystem/azurefs.h | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cpp/src/arrow/filesystem/azurefs.cc b/cpp/src/arrow/filesystem/azurefs.cc index b691cd2e34c..8b7358fbcf2 100644 --- a/cpp/src/arrow/filesystem/azurefs.cc +++ b/cpp/src/arrow/filesystem/azurefs.cc @@ -216,8 +216,7 @@ Status AzureOptions::ExtractFromUriQuery(const Uri& uri) { return Status::OK(); } -Result AzureOptions::FromUri(const Uri& uri, - std::string* out_path) { +Result AzureOptions::FromUri(const Uri& uri, std::string* out_path) { AzureOptions options; options.ExtractFromUriSchemeAndHierPart(uri, out_path); RETURN_NOT_OK(options.ExtractFromUriQuery(uri)); diff --git a/cpp/src/arrow/filesystem/azurefs.h b/cpp/src/arrow/filesystem/azurefs.h index 3986187e0d2..308347426ae 100644 --- a/cpp/src/arrow/filesystem/azurefs.h +++ b/cpp/src/arrow/filesystem/azurefs.h @@ -127,8 +127,7 @@ struct ARROW_EXPORT AzureOptions { ~AzureOptions(); private: - void ExtractFromUriSchemeAndHierPart(const Uri& uri, - std::string* out_path); + void ExtractFromUriSchemeAndHierPart(const Uri& uri, std::string* out_path); Status ExtractFromUriQuery(const Uri& uri); public: @@ -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 FromUri(const Uri& uri, - std::string* out_path); + static Result FromUri(const Uri& uri, std::string* out_path); static Result FromUri(const std::string& uri, std::string* out_path); Status ConfigureDefaultCredential();