Skip to content

Commit fb250b9

Browse files
author
Rafał Hibner
committed
Merge branch 'PushGeneratorWithBackpressure' into combined3
2 parents 92b0f25 + 075e9f8 commit fb250b9

File tree

92 files changed

+2035
-1979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+2035
-1979
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ TZ=UTC
9292
# Used through docker-compose.yml and serves as the default version for the
9393
# ci/scripts/install_vcpkg.sh script. Prefer to use short SHAs to keep the
9494
# docker tags more readable.
95-
VCPKG="f7423ee180c4b7f40d43402c2feb3859161ef625" # 2024.06.15 Release
95+
VCPKG="4334d8b4c8916018600212ab4dd4bbdc343065d1" # 2025.09.17 Release
9696

9797
# This must be updated when we update
9898
# ci/docker/python-*-windows-*.dockerfile or the vcpkg config.

ci/conda_env_cpp.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ gflags
3131
glog
3232
gmock>=1.10.0
3333
google-cloud-cpp>=1.34.0
34-
grpc-cpp<=1.50.1
3534
gtest>=1.10.0
35+
libgrpc
3636
libprotobuf
3737
libutf8proc
3838
lz4-c
3939
make
4040
meson
4141
ninja
4242
nodejs
43-
orc
43+
orc<2.1.0
4444
pkg-config
4545
python
4646
rapidjson

ci/docker/python-wheel-windows-test-vs2022-base.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ SHELL ["cmd", "/S", "/C"]
5151

5252
# Install git, wget, minio
5353
RUN choco install --no-progress -r -y git wget
54-
RUN curl https://dl.min.io/server/minio/release/windows-amd64/archive/minio.RELEASE.2024-09-13T20-26-02Z `
54+
RUN curl https://dl.min.io/server/minio/release/windows-amd64/archive/minio.RELEASE.2025-01-20T14-49-07Z `
5555
--output "C:\Windows\Minio.exe"
5656

5757
# Install the GCS testbench using a well-known Python version.

ci/scripts/python_wheel_windows_build.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ set CMAKE_GENERATOR=Visual Studio 17 2022
6060
set CMAKE_PLATFORM=x64
6161
set VCPKG_ROOT=C:\vcpkg
6262
set VCPKG_FEATURE_FLAGS=-manifests
63-
set VCGPK_TARGET_TRIPLET=amd64-windows-static-md-%CMAKE_BUILD_TYPE%
63+
set VCPKG_TARGET_TRIPLET=amd64-windows-static-md-%CMAKE_BUILD_TYPE%
6464

6565
mkdir C:\arrow-build
6666
pushd C:\arrow-build
@@ -100,7 +100,7 @@ cmake ^
100100
-DMSVC_LINK_VERBOSE=ON ^
101101
-DPARQUET_REQUIRE_ENCRYPTION=%PARQUET_REQUIRE_ENCRYPTION% ^
102102
-DVCPKG_MANIFEST_MODE=OFF ^
103-
-DVCPKG_TARGET_TRIPLET=%VCGPK_TARGET_TRIPLET% ^
103+
-DVCPKG_TARGET_TRIPLET=%VCPKG_TARGET_TRIPLET% ^
104104
-Dxsimd_SOURCE=BUNDLED ^
105105
-G "%CMAKE_GENERATOR%" ^
106106
-A "%CMAKE_PLATFORM%" ^

ci/vcpkg/ports.patch

Lines changed: 55 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake
2-
index 7cab6f726..697ab1bb4 100644
2+
index 6788bc7b7f..6b689dedf0 100644
33
--- a/ports/curl/portfile.cmake
44
+++ b/ports/curl/portfile.cmake
5-
@@ -84,9 +84,12 @@ vcpkg_cmake_configure(
6-
-DBUILD_TESTING=OFF
5+
@@ -83,10 +83,13 @@ vcpkg_cmake_configure(
76
-DENABLE_CURL_MANUAL=OFF
8-
-DCURL_CA_FALLBACK=ON
7+
-DIMPORT_LIB_SUFFIX= # empty
8+
-DSHARE_LIB_OBJECT=OFF
99
+ -DCURL_CA_PATH=none
1010
+ -DCURL_CA_BUNDLE=none
11+
-DCURL_USE_PKGCONFIG=ON
1112
-DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON
12-
OPTIONS_DEBUG
13-
-DENABLE_DEBUG=ON
13+
MAYBE_UNUSED_VARIABLES
14+
PKG_CONFIG_EXECUTABLE
1415
+ ${EXTRA_ARGS_DEBUG}
1516
)
1617
vcpkg_cmake_install()
1718
vcpkg_copy_pdbs()
1819
diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake
19-
index a79c72a59..6b7fa6a66 100644
20+
index 7764357a6d..da7374ecec 100644
2021
--- a/ports/llvm/portfile.cmake
2122
+++ b/ports/llvm/portfile.cmake
22-
@@ -292,6 +292,8 @@ vcpkg_cmake_configure(
23+
@@ -302,6 +302,8 @@ vcpkg_cmake_configure(
2324
${FEATURE_OPTIONS}
2425
MAYBE_UNUSED_VARIABLES
2526
COMPILER_RT_ENABLE_IOS
@@ -28,92 +29,52 @@ index a79c72a59..6b7fa6a66 100644
2829
)
2930

3031
vcpkg_cmake_install(ADD_BIN_TO_PATH)
31-
diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake
32-
index 0312b2ae1..fdb576b5f 100644
33-
--- a/ports/snappy/portfile.cmake
34-
+++ b/ports/snappy/portfile.cmake
35-
@@ -8,5 +8,6 @@ vcpkg_from_github(
36-
fix_clang-cl_build.patch
37-
no-werror.patch
38-
pkgconfig.diff
39-
+ "snappy-disable-bmi.patch"
40-
)
41-
file(COPY "${CURRENT_PORT_DIR}/snappy.pc.in" DESTINATION "${SOURCE_PATH}")
42-
diff --git a/ports/snappy/snappy-disable-bmi.patch b/ports/snappy/snappy-disable-bmi.patch
32+
diff --git a/ports/orc/orc-fix-exception-propagation.diff b/ports/orc/orc-fix-exception-propagation.diff
4333
new file mode 100644
44-
index 000000000..e839c93a4
34+
index 0000000000..25568e70cd
4535
--- /dev/null
46-
+++ b/ports/snappy/snappy-disable-bmi.patch
47-
@@ -0,0 +1,19 @@
48-
+diff --git a/snappy.cc b/snappy.cc
49-
+index d414718..7b49d2a 100644
50-
+--- a/snappy.cc
51-
++++ b/snappy.cc
52-
+@@ -1014,14 +1014,10 @@ static inline void Report(const char *algorithm, size_t compressed_size,
53-
+ static inline uint32_t ExtractLowBytes(const uint32_t& v, int n) {
54-
+ assert(n >= 0);
55-
+ assert(n <= 4);
56-
+-#if SNAPPY_HAVE_BMI2
57-
+- return _bzhi_u32(v, 8 * n);
58-
+-#else
59-
+ // This needs to be wider than uint32_t otherwise `mask << 32` will be
60-
+ // undefined.
61-
+ uint64_t mask = 0xffffffff;
62-
+ return v & ~(mask << (8 * n));
63-
+-#endif
64-
+ }
36+
+++ b/ports/orc/orc-fix-exception-propagation.diff
37+
@@ -0,0 +1,30 @@
38+
+diff --git a/c++/src/Timezone.cc b/c++/src/Timezone.cc
39+
+index 384f8ea99..07c75e0a7 100644
40+
+--- a/c++/src/Timezone.cc
41+
++++ b/c++/src/Timezone.cc
42+
+@@ -696,12 +696,21 @@ namespace orc {
43+
+ std::string filename_;
44+
+ mutable std::unique_ptr<TimezoneImpl> impl_;
45+
+ mutable std::once_flag initialized_;
46+
++ mutable std::exception_ptr init_exception_;
47+
+
48+
+ TimezoneImpl* getImpl() const {
49+
+- std::call_once(initialized_, [&]() {
50+
+- auto buffer = loadTZDB(filename_);
51+
+- impl_ = std::make_unique<TimezoneImpl>(filename_, std::move(buffer));
52+
+- });
53+
++ std::call_once(initialized_, [&]() {
54+
++ try {
55+
++ auto buffer = loadTZDB(filename_);
56+
++ impl_ = std::make_unique<TimezoneImpl>(filename_, std::move(buffer));
57+
++ } catch (...) {
58+
++ // If initialization failed, re-throw the exception
59+
++ init_exception_ = std::current_exception();
60+
++ }
61+
++ });
62+
++ if (init_exception_) {
63+
++ std::rethrow_exception(init_exception_);
64+
++ }
65+
+ return impl_.get();
66+
+ }
6567
+
66-
+ static inline bool LeftShiftOverflows(uint8_t value, uint32_t shift) {
67-
diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake
68-
index 1501782..71d2147 100644
69-
--- a/ports/thrift/portfile.cmake
70-
+++ b/ports/thrift/portfile.cmake
71-
@@ -12,7 +12,7 @@ vcpkg_find_acquire_program(BISON)
72-
vcpkg_from_github(
73-
OUT_SOURCE_PATH SOURCE_PATH
74-
REPO apache/thrift
75-
- REF "${VERSION}"
76-
+ REF "v${VERSION}"
77-
SHA512 5e4ee9870b30fe5ba484d39781c435716f7f3903793dc8aae96594ca813b1a5a73363b84719038ca8fa3ab8ef0a419a28410d936ff7b3bbadf36fc085a6883ae
78-
HEAD_REF master
79-
PATCHES
80-
diff --git a/ports/thrift/vcpkg.json b/ports/thrift/vcpkg.json
81-
index 2d5a854..9ff49ec 100644
82-
--- a/ports/thrift/vcpkg.json
83-
+++ b/ports/thrift/vcpkg.json
84-
@@ -1,6 +1,7 @@
85-
{
86-
"name": "thrift",
87-
"version": "0.20.0",
88-
+ "port-version": 1,
89-
"description": "Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible.",
90-
"homepage": "https://github.com/apache/thrift",
91-
"license": "Apache-2.0",
92-
diff --git a/versions/baseline.json b/versions/baseline.json
93-
index c6ce736..9ad1d63 100644
94-
--- a/versions/baseline.json
95-
+++ b/versions/baseline.json
96-
@@ -8622,7 +8622,7 @@
97-
},
98-
"thrift": {
99-
"baseline": "0.20.0",
100-
- "port-version": 0
101-
+ "port-version": 1
102-
},
103-
"tidy-html5": {
104-
"baseline": "5.8.0",
105-
diff --git a/versions/t-/thrift.json b/versions/t-/thrift.json
106-
index 3db38c5..7464bde 100644
107-
--- a/versions/t-/thrift.json
108-
+++ b/versions/t-/thrift.json
109-
@@ -1,5 +1,10 @@
110-
{
111-
"versions": [
112-
+ {
113-
+ "git-tree": "13757a6b05741cf3c9c39e3a1dcc5e5cd685e025",
114-
+ "version": "0.20.0",
115-
+ "port-version": 1
116-
+ },
117-
{
118-
"git-tree": "6855be1ce96497811d4eb0a9879baf6cf1b3610c",
119-
"version": "0.20.0",
68+
diff --git a/ports/orc/portfile.cmake b/ports/orc/portfile.cmake
69+
index 77ebf41ec3..4d065594a7 100644
70+
--- a/ports/orc/portfile.cmake
71+
+++ b/ports/orc/portfile.cmake
72+
@@ -6,6 +6,8 @@ vcpkg_from_github(
73+
REF "v${VERSION}"
74+
SHA512 eabee16a6e984452a8cb715d0524041b20dd1bd88d78bb32534db93e5dbdd786aa4df8c05975406cb0728241eb3025a506c4fefb8c334ef0d8a27e6cb920d44c
75+
HEAD_REF master
76+
+ PATCHES
77+
+ orc-fix-exception-propagation.diff
78+
)
79+
80+
file(REMOVE "${SOURCE_PATH}/cmake_modules/FindGTest.cmake")

cpp/src/arrow/flight/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,19 @@ set(ARROW_FLIGHT_SRCS
189189
transport/grpc/util_internal.cc
190190
types.cc)
191191

192+
# Handle Unity build header conflicts on Windows.
193+
if(CMAKE_UNITY_BUILD AND WIN32)
194+
set_source_files_properties(client.cc
195+
cookie_internal.cc
196+
serialization_internal.cc
197+
server.cc
198+
transport/grpc/serialization_internal.cc
199+
transport/grpc/protocol_grpc_internal.cc
200+
transport/grpc/util_internal.cc
201+
types.cc
202+
PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)
203+
endif()
204+
192205
if(ARROW_WITH_OPENTELEMETRY)
193206
list(APPEND ARROW_FLIGHT_SRCS otel_logging.cc)
194207
endif()

cpp/src/arrow/flight/sql/odbc/flight_sql/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,12 @@ if(WIN32)
9999
system_dsn.cc)
100100
endif()
101101

102-
target_link_libraries(arrow_odbc_spi_impl PUBLIC odbcabstraction arrow_flight_sql_shared)
102+
target_link_libraries(arrow_odbc_spi_impl PUBLIC odbcabstraction arrow_flight_sql_shared
103+
arrow_compute_shared Boost::locale)
103104

104-
if(MSVC)
105-
target_link_libraries(arrow_odbc_spi_impl PUBLIC Boost::locale)
105+
# Link libraries on MINGW64 and macOS
106+
if(MINGW OR APPLE)
107+
target_link_libraries(arrow_odbc_spi_impl PUBLIC ${ODBCINST})
106108
endif()
107109

108110
set_target_properties(arrow_odbc_spi_impl
@@ -121,7 +123,7 @@ set_target_properties(arrow_odbc_spi_impl_cli
121123
target_link_libraries(arrow_odbc_spi_impl_cli arrow_odbc_spi_impl)
122124

123125
# Unit tests
124-
add_arrow_test(arrow_odbc_spi_impl_test
126+
add_arrow_test(odbc_spi_impl_test
125127
SOURCES
126128
accessors/boolean_array_accessor_test.cc
127129
accessors/binary_array_accessor_test.cc

cpp/src/arrow/flight/sql/odbc/flight_sql/accessors/binary_array_accessor.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ inline RowStatus MoveSingleCellToBinaryBuffer(ColumnBinding* binding, BinaryArra
5656
value_offset = -1;
5757
}
5858

59-
if (binding->strlen_buffer) {
60-
binding->strlen_buffer[i] = static_cast<ssize_t>(remaining_length);
59+
if (binding->str_len_buffer) {
60+
binding->str_len_buffer[i] = static_cast<ssize_t>(remaining_length);
6161
}
6262

6363
return result;
@@ -72,15 +72,15 @@ BinaryArrayFlightSqlAccessor<TARGET_TYPE>::BinaryArrayFlightSqlAccessor(Array* a
7272

7373
template <>
7474
RowStatus
75-
BinaryArrayFlightSqlAccessor<odbcabstraction::CDataType_BINARY>::MoveSingleCell_impl(
75+
BinaryArrayFlightSqlAccessor<odbcabstraction::CDataType_BINARY>::MoveSingleCellImpl(
7676
ColumnBinding* binding, int64_t arrow_row, int64_t i, int64_t& value_offset,
7777
bool update_value_offset, odbcabstraction::Diagnostics& diagnostics) {
7878
return MoveSingleCellToBinaryBuffer(binding, this->GetArray(), arrow_row, i,
7979
value_offset, update_value_offset, diagnostics);
8080
}
8181

8282
template <CDataType TARGET_TYPE>
83-
size_t BinaryArrayFlightSqlAccessor<TARGET_TYPE>::GetCellLength_impl(
83+
size_t BinaryArrayFlightSqlAccessor<TARGET_TYPE>::GetCellLengthImpl(
8484
ColumnBinding* binding) const {
8585
return binding->buffer_length;
8686
}

cpp/src/arrow/flight/sql/odbc/flight_sql/accessors/binary_array_accessor.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ class BinaryArrayFlightSqlAccessor
3434
public:
3535
explicit BinaryArrayFlightSqlAccessor(Array* array);
3636

37-
RowStatus MoveSingleCell_impl(ColumnBinding* binding, int64_t arrow_row, int64_t i,
38-
int64_t& value_offset, bool update_value_offset,
39-
odbcabstraction::Diagnostics& diagnostics);
37+
RowStatus MoveSingleCellImpl(ColumnBinding* binding, int64_t arrow_row, int64_t i,
38+
int64_t& value_offset, bool update_value_offset,
39+
odbcabstraction::Diagnostics& diagnostics);
4040

41-
size_t GetCellLength_impl(ColumnBinding* binding) const;
41+
size_t GetCellLengthImpl(ColumnBinding* binding) const;
4242
};
4343

4444
} // namespace flight_sql

cpp/src/arrow/flight/sql/odbc/flight_sql/accessors/binary_array_accessor_test.cc

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ TEST(BinaryArrayAccessor, Test_CDataType_BINARY_Basic) {
3535

3636
BinaryArrayFlightSqlAccessor<odbcabstraction::CDataType_BINARY> accessor(array.get());
3737

38-
size_t max_strlen = 64;
39-
std::vector<char> buffer(values.size() * max_strlen);
40-
std::vector<ssize_t> strlen_buffer(values.size());
38+
size_t max_str_len = 64;
39+
std::vector<char> buffer(values.size() * max_str_len);
40+
std::vector<ssize_t> str_len_buffer(values.size());
4141

4242
ColumnBinding binding(odbcabstraction::CDataType_BINARY, 0, 0, buffer.data(),
43-
max_strlen, strlen_buffer.data());
43+
max_str_len, str_len_buffer.data());
4444

4545
int64_t value_offset = 0;
4646
odbcabstraction::Diagnostics diagnostics("Foo", "Foo", OdbcVersion::V_3);
@@ -49,12 +49,13 @@ TEST(BinaryArrayAccessor, Test_CDataType_BINARY_Basic) {
4949
diagnostics, nullptr));
5050

5151
for (int i = 0; i < values.size(); ++i) {
52-
ASSERT_EQ(values[i].length(), strlen_buffer[i]);
52+
ASSERT_EQ(values[i].length(), str_len_buffer[i]);
5353
// Beware that CDataType_BINARY values are not null terminated.
5454
// It's safe to create a std::string from this data because we know it's
5555
// ASCII, this doesn't work with arbitrary binary data.
56-
ASSERT_EQ(values[i], std::string(buffer.data() + i * max_strlen,
57-
buffer.data() + i * max_strlen + strlen_buffer[i]));
56+
ASSERT_EQ(values[i],
57+
std::string(buffer.data() + i * max_str_len,
58+
buffer.data() + i * max_str_len + str_len_buffer[i]));
5859
}
5960
}
6061

@@ -65,12 +66,12 @@ TEST(BinaryArrayAccessor, Test_CDataType_BINARY_Truncation) {
6566

6667
BinaryArrayFlightSqlAccessor<odbcabstraction::CDataType_BINARY> accessor(array.get());
6768

68-
size_t max_strlen = 8;
69-
std::vector<char> buffer(values.size() * max_strlen);
70-
std::vector<ssize_t> strlen_buffer(values.size());
69+
size_t max_str_len = 8;
70+
std::vector<char> buffer(values.size() * max_str_len);
71+
std::vector<ssize_t> str_len_buffer(values.size());
7172

7273
ColumnBinding binding(odbcabstraction::CDataType_BINARY, 0, 0, buffer.data(),
73-
max_strlen, strlen_buffer.data());
74+
max_str_len, str_len_buffer.data());
7475

7576
std::stringstream ss;
7677
int64_t value_offset = 0;
@@ -83,13 +84,13 @@ TEST(BinaryArrayAccessor, Test_CDataType_BINARY_Truncation) {
8384
int64_t original_value_offset = value_offset;
8485
ASSERT_EQ(1, accessor.GetColumnarData(&binding, 0, 1, value_offset, true, diagnostics,
8586
nullptr));
86-
ASSERT_EQ(values[0].length() - original_value_offset, strlen_buffer[0]);
87+
ASSERT_EQ(values[0].length() - original_value_offset, str_len_buffer[0]);
8788

8889
int64_t chunk_length = 0;
8990
if (value_offset == -1) {
90-
chunk_length = strlen_buffer[0];
91+
chunk_length = str_len_buffer[0];
9192
} else {
92-
chunk_length = max_strlen;
93+
chunk_length = max_str_len;
9394
}
9495

9596
// Beware that CDataType_BINARY values are not null terminated.

0 commit comments

Comments
 (0)