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
1 change: 1 addition & 0 deletions ci/docker/python-wheel-windows-vs2022-base.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ ENV CMAKE_BUILD_TYPE=${build_type} `
VCPKG_DEFAULT_TRIPLET=amd64-windows-static-md-${build_type} `
VCPKG_FEATURE_FLAGS="manifests"
COPY ci/vcpkg/vcpkg.json arrow/ci/vcpkg/

# cannot use the S3 feature here because while aws-sdk-cpp=1.9.160 contains
# ssl related fixes as well as we can patch the vcpkg portfile to support
# arm machines it hits ARROW-15141 where we would need to fall back to 1.8.186
Expand Down
11 changes: 11 additions & 0 deletions ci/vcpkg/vcpkg.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
diff --git a/scripts/toolchains/windows.cmake b/scripts/toolchains/windows.cmake
index 3cc90cc..36af495 100644
--- a/scripts/toolchains/windows.cmake
+++ b/scripts/toolchains/windows.cmake
@@ -88,4 +88,4 @@ if(NOT _VCPKG_WINDOWS_TOOLCHAIN)
set(CMAKE_C_FLAGS_DEBUG "${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
- set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
- set(CMAKE_C_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
+ set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
+ set(CMAKE_C_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")

diff --git a/scripts/cmake/vcpkg_execute_build_process.cmake b/scripts/cmake/vcpkg_execute_build_process.cmake
index 60fd5b587a..c8dc021af8 100644
--- a/scripts/cmake/vcpkg_execute_build_process.cmake
Expand Down
12 changes: 7 additions & 5 deletions cpp/src/arrow/compute/kernels/scalar_cast_nested.cc
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,13 @@ struct CastStruct {
for (int out_field_index = 0; out_field_index < out_field_count; ++out_field_index) {
const auto& out_field = out_type.field(out_field_index);

// Take the first field with matching name, if any. Extract it from the map so it
// can't be reused.
auto maybe_in_field_index = in_fields.extract(out_field->name());
if (!maybe_in_field_index.empty()) {
fields_to_select[out_field_index] = maybe_in_field_index.mapped();
// Take the first field with matching name, if any. Erase it from the map so it
// can't be reused. Use lower_bound (which guarantees first-match) instead of
// find/extract (which do not guarantee first for duplicate keys).
auto it = in_fields.lower_bound(out_field->name());
if (it != in_fields.end() && it->first == out_field->name()) {
fields_to_select[out_field_index] = it->second;
in_fields.erase(it);
} else if (out_field->nullable()) {
fields_to_select[out_field_index] = kFillNullSentinel;
} else {
Expand Down
22 changes: 22 additions & 0 deletions dev/tasks/python-wheels/github.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,28 @@ jobs:
esac
echo "TEST_IMAGE_PREFIX=${test_image_prefix}" >> ${GITHUB_ENV}

- name: Configure Docker data-root
shell: powershell
run: |
# The D: drive on windows-2022 GH Actions runners has ~44GB free vs ~14GB on C:.
# Moving Docker's data-root to D: prevents hcsshim::ImportLayer failures when
# building large Windows container layers (e.g. the vcpkg install layer). GH-49676
Stop-Service docker
$daemonJson = "C:\ProgramData\Docker\config\daemon.json"
New-Item -ItemType Directory -Force -Path (Split-Path $daemonJson) | Out-Null
if (Test-Path $daemonJson) {
$json = Get-Content $daemonJson | ConvertFrom-Json
$json | Add-Member -Force -NotePropertyName "data-root" -NotePropertyValue "D:\docker"
$json | ConvertTo-Json -Depth 10 | Set-Content $daemonJson
} else {
Set-Content $daemonJson -Value '{"data-root":"D:\docker"}'
}
Start-Service docker
Write-Host "=== daemon.json ==="
Get-Content $daemonJson
Write-Host "=== docker info ==="
docker info

- name: Build wheel
shell: cmd
run: |
Expand Down
Loading