Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/cpp_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ jobs:
runs-on: ${{ inputs.os }}
timeout-minutes: 60
env:
ARROW_AZURE: ON
ARROW_BOOST_USE_SHARED: OFF
ARROW_BUILD_BENCHMARKS: ON
ARROW_BUILD_SHARED: ON
ARROW_BUILD_STATIC: OFF
ARROW_BUILD_TESTS: ON
ARROW_DATASET: ON
ARROW_FILESYSTEM: ON
ARROW_FLIGHT: OFF
ARROW_HDFS: ON
ARROW_HOME: /usr
Expand Down
28 changes: 28 additions & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,13 @@ else()
)
endif()

if(DEFINED ENV{ARROW_WIL_URL})
set(ARROW_WIL_URL "$ENV{ARROW_WIL_URL}")
else()
set_urls(ARROW_WIL_URL
"https://github.com/microsoft/wil/archive/${ARROW_WIL_BUILD_VERSION}.tar.gz")
endif()

if(DEFINED ENV{ARROW_BOOST_URL})
set(BOOST_SOURCE_URL "$ENV{ARROW_BOOST_URL}")
else()
Expand Down Expand Up @@ -4054,6 +4061,27 @@ endif()

function(build_azure_sdk)
message(STATUS "Building Azure SDK for C++ from source")

# On Windows, Azure SDK's WinHTTP transport requires WIL (Windows Implementation Libraries).
# Fetch WIL before Azure SDK so the WIL::WIL target is available.
if(WIN32)
message(STATUS "Fetching WIL (Windows Implementation Libraries) for Azure SDK")
fetchcontent_declare(wil
${FC_DECLARE_COMMON_OPTIONS}
URL ${ARROW_WIL_URL}
URL_HASH "SHA256=${ARROW_WIL_BUILD_SHA256_CHECKSUM}")
set(WIL_BUILD_PACKAGING OFF)
set(WIL_BUILD_TESTS OFF)
fetchcontent_makeavailable(wil)
# Create a minimal config file so Azure SDK's find_package(wil CONFIG) succeeds.
# The WIL::WIL target already exists from FetchContent above.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/wil-config/wilConfig.cmake"
"# WIL loaded via FetchContent - target WIL::WIL already exists\n")
set(wil_DIR
"${CMAKE_CURRENT_BINARY_DIR}/wil-config"
CACHE PATH "" FORCE)
endif()

fetchcontent_declare(azure_sdk
${FC_DECLARE_COMMON_OPTIONS}
URL ${ARROW_AZURE_SDK_URL}
Expand Down
7 changes: 7 additions & 0 deletions cpp/src/arrow/filesystem/azurefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,7 @@ Result<HNSSupport> CheckIfHierarchicalNamespaceIsEnabled(
directory_client.GetAccessControlList();
return HNSSupport::kEnabled;
} catch (std::out_of_range& exception) {
ARROW_UNUSED(exception);
// Azurite issue detected.
DCHECK(IsDfsEmulator(options));
return HNSSupport::kDisabled;
Expand Down Expand Up @@ -2500,6 +2501,7 @@ class AzureFileSystem::Impl {
auto delete_result = deferred_response.GetResponse();
success = delete_result.Value.Deleted;
} catch (const Core::RequestFailedException& exception) {
ARROW_UNUSED(exception);
success = false;
}
if (!success) {
Expand Down Expand Up @@ -3218,6 +3220,11 @@ class AzureFileSystem::Impl {
std::atomic<LeaseGuard::SteadyClock::time_point> LeaseGuard::latest_known_expiry_time_ =
SteadyClock::time_point{SteadyClock::duration::zero()};

// Destructor must be defined here where Impl is a complete type.
// Defining it in the header (even as = default) causes MSVC to fail
// because it tries to instantiate std::default_delete<Impl> before Impl is defined.
AzureFileSystem::~AzureFileSystem() {}

AzureFileSystem::AzureFileSystem(std::unique_ptr<Impl>&& impl)
: FileSystem(impl->io_context()), impl_(std::move(impl)) {
default_async_is_sync_ = false;
Expand Down
4 changes: 3 additions & 1 deletion cpp/src/arrow/filesystem/azurefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ class ARROW_EXPORT AzureFileSystem : public FileSystem {
void ForceCachedHierarchicalNamespaceSupport(int hns_support);

public:
~AzureFileSystem() override = default;
// Destructor must be defined in the .cc file where Impl is complete,
// otherwise MSVC fails with "use of undefined type" for std::unique_ptr<Impl>.
~AzureFileSystem() override;

static Result<std::shared_ptr<AzureFileSystem>> Make(
const AzureOptions& options, const io::IOContext& = io::default_io_context());
Expand Down
3 changes: 3 additions & 0 deletions cpp/thirdparty/versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ ARROW_AWSSDK_BUILD_SHA256_CHECKSUM=b9944ba9905a68d6e53abb4f36ab2b3bd18ac88d85716
# Despite the confusing version name this is still the whole Azure SDK for C++ including core, keyvault, storage-common, etc.
ARROW_AZURE_SDK_BUILD_VERSION=azure-identity_1.9.0
ARROW_AZURE_SDK_BUILD_SHA256_CHECKSUM=97065bfc971ac8df450853ce805f820f52b59457bd7556510186a1569502e4a1
# WIL (Windows Implementation Libraries) is required by Azure SDK on Windows for WinHTTP transport
ARROW_WIL_BUILD_VERSION=v1.0.250325.1
ARROW_WIL_BUILD_SHA256_CHECKSUM=c9e667d5f86ded43d17b5669d243e95ca7b437e3a167c170805ffd4aa8a9a786
ARROW_BOOST_BUILD_VERSION=1.88.0
ARROW_BOOST_BUILD_SHA256_CHECKSUM=dcea50f40ba1ecfc448fdf886c0165cf3e525fef2c9e3e080b9804e8117b9694
ARROW_BROTLI_BUILD_VERSION=v1.0.9
Expand Down