Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
c9ab394
first draft
rok Dec 19, 2025
7837d38
attempt to understand gcc behavior
rok Dec 23, 2025
3d7592b
keep vendored lib for gcc
rok Dec 23, 2025
145d12a
simplify with C++20 chrono features
rok Dec 23, 2025
f2eef59
Review feedback
rok Jan 5, 2026
147f35f
lint
rok Jan 5, 2026
bc355cb
Reference to gcc issue
rok Jan 5, 2026
3c17d05
Remove windows tz workarounds
rok Jan 5, 2026
ebb80df
Allow gcc bug on windows
rok Jan 6, 2026
bddfcfa
Fix verify RC step
rok Jan 6, 2026
84f51a8
Fix R's tzdb
rok Jan 6, 2026
ef965e8
Skip failing tests (due to gcc bug)
rok Jan 6, 2026
5b74ef1
add mingw tzdata
rok Jan 6, 2026
311d4a3
enable std::chrono for mingw
rok Jan 6, 2026
e0b0086
reenable downloading of tzdb for clang64 with mingw on windows
rok Jan 6, 2026
750816d
download windowsZones.xml, skip CastTimezone.ZonedTimestampToTime
rok Jan 6, 2026
cc5ba78
experiment
rok Jan 6, 2026
ca65894
work
rok Jan 6, 2026
1e9c3dc
experiment
rok Jan 6, 2026
700ab25
another experiment
rok Jan 6, 2026
23e581a
experiment
rok Jan 7, 2026
ee6341d
Reverting some changes
rok Jan 7, 2026
0de03f6
Reverting more changes
rok Jan 7, 2026
1d0d82e
Review feedback
rok Jan 7, 2026
2d74692
doctest
rok Jan 7, 2026
4e64e84
Assume gcc13+ for R
rok Jan 13, 2026
2e81294
deprecate some functions, set deprecation vesion to 24.0.0
rok Jan 13, 2026
94b061d
skip a test
rok Jan 13, 2026
790ae5d
skip a test
rok Jan 13, 2026
155f142
review feedback
rok Jan 20, 2026
4b2024a
review feedback
rok Jan 20, 2026
03197c7
lint
rok Jan 20, 2026
b7c41fe
fix two tests and skip another
rok Jan 20, 2026
4c078eb
revert change
rok Jan 20, 2026
2d6ed2a
Skip windows tests in R if tzdb_path doesn't exist
rok Jan 20, 2026
e099766
Skip timezone tests on windows R if tzdb_path doesn't exist
rok Jan 20, 2026
570ec29
python fix
rok Jan 20, 2026
5847286
revert R change
rok Jan 20, 2026
e8ba8e5
R PKGBUILD
rok Jan 20, 2026
85e3fe8
python fix
rok Jan 20, 2026
dba51ba
fix ARROW_USE_STD_CHRONO on windows
rok Jan 20, 2026
1b9d00e
use wendored on clang windows
rok Jan 20, 2026
47c59f0
cmake change and python tests
rok Jan 21, 2026
e5938b7
print if assert False
rok Jan 21, 2026
9551944
add tzdb for R jobs
rok Jan 21, 2026
7b631ec
python skipif message
rok Jan 21, 2026
cd495fe
skipif reason argument
rok Jan 21, 2026
5363232
fix python test
rok Jan 21, 2026
a6ac667
fix python test, tidy up
rok Jan 21, 2026
a313b43
tidying up
rok Jan 21, 2026
5176584
supress deprecation warning
rok Jan 21, 2026
2bef459
GlobalOptions initializer
rok Jan 21, 2026
040c0e8
GlobalOptions
rok Jan 21, 2026
4af3b3a
remove appveyor references
rok Jan 28, 2026
d650046
Remove more appveyor references
rok Jan 28, 2026
c34e4e1
fix timestamp check
rok Jan 28, 2026
1e5b734
try checking full string
rok Jan 28, 2026
14f77f1
compare whole timestamp strings on windows
rok Jan 28, 2026
e2be635
temporarily enable problematic test
rok Jan 28, 2026
7234e56
fix failing tests
rok Jan 29, 2026
7e1f050
simplify macro
rok Jan 29, 2026
66965c0
disable rounding test on windows and rename user-agent
rok Jan 29, 2026
3793b88
lint
rok Jan 29, 2026
b60b141
don't doctest
rok Feb 9, 2026
deb0a2a
minor changes and tzdata to latest
rok Feb 10, 2026
1f2d930
iana db to latest
rok Feb 10, 2026
d31e6d4
exclude a problematic timestamp
rok Feb 10, 2026
01632d7
comment out another timestamp, remove NOLINT
rok Feb 10, 2026
9a06bca
reverting nolint
rok Feb 10, 2026
182e44e
exclude two timestamps
rok Feb 10, 2026
7af3c22
fixing one-off error
rok Feb 10, 2026
2ec0a46
Update python/pyarrow/tests/test_compute.py
rok Feb 11, 2026
c730059
provide TZDIR for ORC
rok Feb 12, 2026
9e87d57
forgot import sys
rok Feb 12, 2026
c6caa3c
GH-49287: [C++][R] Clean up any other C++20 partial compatibility iss…
jonkeane Feb 18, 2026
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
7 changes: 6 additions & 1 deletion .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,13 @@ jobs:
export CMAKE_BUILD_PARALLEL_LEVEL=$NUMBER_OF_PROCESSORS
ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
- name: Download Timezone Database
if: matrix.msystem_upper == 'CLANG64'
shell: bash
run: ci/scripts/download_tz_database.sh
run: |
# TODO(GH-48593): msys2 clang64 uses libc++ and vendored date.h library
# which needs tzdata database to build Arrow with time zone support.
# https://github.com/apache/arrow/issues/48593
ci/scripts/download_tz_database.sh
- name: Download MinIO
shell: msys2 {0}
run: |
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/cpp_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ jobs:
with:
fetch-depth: 0
submodules: recursive
- name: Download Timezone Database
shell: bash
run: ci/scripts/download_tz_database.sh
- name: Install msys2 (for tzdata for ORC tests)
uses: msys2/setup-msys2@v2
id: setup-msys2
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/matlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ jobs:
uses: matlab-actions/setup-matlab@v2
with:
release: R2025b
- name: Download Timezone Database
shell: bash
run: ci/scripts/download_tz_database.sh
- name: Install ccache
shell: bash
run: ci/scripts/install_ccache.sh 4.6.3 /usr
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ jobs:
mkdir -p "$HOME/.local/bin"
ci/scripts/install_minio.sh latest "$HOME/.local"
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Download Timezone Database
shell: bash
run: |
# RTools 40 uses GCC 8.x which does not support C++20 chrono timezones,
# so Arrow uses the vendored date library which requires tzdata
ci/scripts/download_tz_database.sh
- run: mkdir r/windows
- name: Download artifacts
uses: actions/download-artifact@v7
Expand Down
2 changes: 1 addition & 1 deletion ci/conda_env_gandiva_win.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
# specific language governing permissions and limitations
# under the License.

# ARROW-17830 Temporarily pin LLVM version on Appveyor due to a bug in Conda's packaging of LLVM 15.
# ARROW-17830 Temporarily pin LLVM version on Windows due to a bug in Conda's packaging of LLVM 15.
clangdev<15
llvmdev<15
1 change: 0 additions & 1 deletion ci/scripts/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ source_dir="$ARROW_HOME"
# Append `#commit=54b1b2f688e5e84b4c664b1e12a95f93b94ab2f3` to the URL to select a revision
# source=("${source_dir}"::"git+https://github.com/apache/arrow")
# sha256sums=("SKIP")
# source_dir="${APPVEYOR_BUILD_FOLDER}/${source_dir}"

cpp_build_dir=build-${CARCH}-cpp

Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/download_tz_database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
set -ex

# Download database
curl https://data.iana.org/time-zones/releases/tzdata2024b.tar.gz --output ~/Downloads/tzdata.tar.gz
curl https://data.iana.org/time-zones/tzdata-latest.tar.gz --output ~/Downloads/tzdata.tar.gz
Copy link
Member Author

@rok rok Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing here and elsewhere to latest.


# Extract
mkdir -p ~/Downloads/tzdata
Expand Down
2 changes: 0 additions & 2 deletions cpp/src/arrow/compute/function_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,9 @@ TEST(FunctionOptions, Equality) {
options.emplace_back(new StrptimeOptions("%Y", TimeUnit::type::MILLI, true));
options.emplace_back(new StrptimeOptions("%Y", TimeUnit::type::NANO));
options.emplace_back(new StrftimeOptions("%Y-%m-%dT%H:%M:%SZ", "C"));
#ifndef _WIN32
options.emplace_back(new AssumeTimezoneOptions(
"Europe/Amsterdam", AssumeTimezoneOptions::Ambiguous::AMBIGUOUS_RAISE,
AssumeTimezoneOptions::Nonexistent::NONEXISTENT_RAISE));
#endif
options.emplace_back(new PadOptions(5, " "));
options.emplace_back(new PadOptions(10, "A"));
options.emplace_back(new PadOptions(10, "A", false));
Expand Down
15 changes: 6 additions & 9 deletions cpp/src/arrow/compute/kernels/scalar_cast_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2358,15 +2358,7 @@ constexpr char kTimestampSecondsJson[] =
constexpr char kTimestampExtremeJson[] =
R"(["1677-09-20T00:00:59.123456", "2262-04-13T23:23:23.999999"])";

class CastTimezone : public ::testing::Test {
protected:
void SetUp() override {
#ifdef _WIN32
// Initialize timezone database on Windows
ASSERT_OK(InitTestTimezoneDatabase());
#endif
}
};
class CastTimezone : public ::testing::Test {};

TEST(Cast, TimestampToDate) {
// See scalar_temporal_test.cc
Expand Down Expand Up @@ -2595,6 +2587,11 @@ TEST(Cast, TimestampToTime) {
}

TEST_F(CastTimezone, ZonedTimestampToTime) {
// TODO(GH-48743): GCC libstdc++ has a bug with DST transitions
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
#if defined(_WIN32) && defined(__GNUC__) && !defined(__clang__)
GTEST_SKIP() << "Test triggers GCC libstdc++ bug (GH-48743).";
#endif
CheckCast(ArrayFromJSON(timestamp(TimeUnit::NANO, "Pacific/Marquesas"), kTimestampJson),
ArrayFromJSON(time64(TimeUnit::NANO), R"([
52259123456789, 50003999999999, 56480001001001, 65000000000000,
Expand Down
43 changes: 22 additions & 21 deletions cpp/src/arrow/compute/kernels/scalar_temporal_binary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "arrow/util/checked_cast.h"
#include "arrow/util/logging_internal.h"
#include "arrow/util/time.h"
#include "arrow/vendored/datetime.h"

namespace arrow {

Expand All @@ -37,28 +36,30 @@ using internal::checked_pointer_cast;
namespace compute {
namespace internal {

namespace chrono = arrow::internal::chrono;

namespace {

using arrow_vendored::date::days;
using arrow_vendored::date::floor;
using arrow_vendored::date::hh_mm_ss;
using arrow_vendored::date::local_days;
using arrow_vendored::date::local_time;
using arrow_vendored::date::sys_days;
using arrow_vendored::date::sys_time;
using arrow_vendored::date::trunc;
using arrow_vendored::date::weekday;
using arrow_vendored::date::weeks;
using arrow_vendored::date::year_month_day;
using arrow_vendored::date::year_month_weekday;
using arrow_vendored::date::years;
using arrow_vendored::date::literals::dec;
using arrow_vendored::date::literals::jan;
using arrow_vendored::date::literals::last;
using arrow_vendored::date::literals::mon;
using arrow_vendored::date::literals::sun;
using arrow_vendored::date::literals::thu;
using arrow_vendored::date::literals::wed;
using chrono::days;
using chrono::dec;
using chrono::floor;
using chrono::hh_mm_ss;
using chrono::jan;
using chrono::last;
using chrono::local_days;
using chrono::local_time;
using chrono::mon;
using chrono::sun;
using chrono::sys_days;
using chrono::sys_time;
using chrono::thu;
using chrono::trunc;
using chrono::wed;
using chrono::weekday;
using chrono::weeks;
using chrono::year_month_day;
using chrono::year_month_weekday;
using chrono::years;
using internal::applicator::ScalarBinaryNotNullStatefulEqualTypes;

using DayOfWeekState = OptionsWrapper<DayOfWeekOptions>;
Expand Down
33 changes: 25 additions & 8 deletions cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -411,14 +411,6 @@ class ScalarTemporalTest : public ::testing::Test {
RoundTemporalOptions round_to_15_quarters =
RoundTemporalOptions(15, CalendarUnit::QUARTER);
RoundTemporalOptions round_to_15_years = RoundTemporalOptions(15, CalendarUnit::YEAR);

protected:
void SetUp() override {
#ifdef _WIN32
// Initialize timezone database on Windows
ASSERT_OK(InitTestTimezoneDatabase());
#endif
}
};

class ScalarTemporalTestStrictCeil : public ScalarTemporalTest {
Expand Down Expand Up @@ -716,6 +708,11 @@ TEST_F(ScalarTemporalTest, TestIsLeapYear) {
}

TEST_F(ScalarTemporalTest, TestZoned1) {
// TODO(GH-48743): GCC libstdc++ has a bug with DST transitions
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
#if defined(_WIN32) && defined(__GNUC__) && !defined(__clang__)
GTEST_SKIP() << "Test triggers GCC libstdc++ bug (GH-48743).";
#endif
std::vector<std::string> timezones = {"Pacific/Marquesas", "-09:30"};
for (const auto& timezone : timezones) {
auto unit = timestamp(TimeUnit::NANO, timezone);
Expand Down Expand Up @@ -814,6 +811,11 @@ TEST_F(ScalarTemporalTest, TestZoned1) {
}

TEST_F(ScalarTemporalTest, TestZoned2) {
// TODO(GH-48743): GCC libstdc++ has a bug with DST transitions
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
#if defined(_WIN32) && defined(__GNUC__) && !defined(__clang__)
GTEST_SKIP() << "Test triggers GCC libstdc++ bug (GH-48743).";
#endif
for (auto u : TimeUnit::values()) {
auto unit = timestamp(u, "Australia/Broken_Hill");
auto month = "[1, 3, 1, 5, 1, 12, 12, 12, 1, 1, 1, 1, 12, 12, 12, 1, null]";
Expand Down Expand Up @@ -2775,6 +2777,11 @@ TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, CeilUTC) {
}

TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, CeilZoned) {
// TODO(GH-48743): GCC libstdc++ has a bug with DST transitions
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
#if defined(_WIN32) && defined(__GNUC__) && !defined(__clang__)
GTEST_SKIP() << "Test triggers GCC libstdc++ bug (GH-48743).";
#endif
std::string op = "ceil_temporal";

// Data for tests below was generated via lubridate with the exception
Expand Down Expand Up @@ -3165,6 +3172,11 @@ TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, FloorUTC) {
}

TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, FloorZoned) {
// TODO(GH-48743): GCC libstdc++ has a bug with DST transitions
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
#if defined(_WIN32) && defined(__GNUC__) && !defined(__clang__)
GTEST_SKIP() << "Test triggers GCC libstdc++ bug (GH-48743).";
#endif
std::string op = "floor_temporal";

// Data for tests below was generated via lubridate with the exception
Expand Down Expand Up @@ -3598,6 +3610,11 @@ TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, RoundUTC) {
}

TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, RoundZoned) {
// TODO(GH-48743): GCC libstdc++ has a bug with DST transitions
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
#if defined(_WIN32) && defined(__GNUC__) && !defined(__clang__)
GTEST_SKIP() << "Test triggers GCC libstdc++ bug (GH-48743).";
#endif
std::string op = "round_temporal";

// Data for tests below was generated via lubridate with the exception
Expand Down
74 changes: 36 additions & 38 deletions cpp/src/arrow/compute/kernels/scalar_temporal_unary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "arrow/util/logging_internal.h"
#include "arrow/util/time.h"
#include "arrow/util/value_parsing.h"
#include "arrow/vendored/datetime.h"

namespace arrow {

Expand All @@ -38,34 +37,36 @@ using internal::checked_pointer_cast;

namespace compute::internal {

namespace chrono = arrow::internal::chrono;

namespace {

using arrow_vendored::date::ceil;
using arrow_vendored::date::days;
using arrow_vendored::date::floor;
using arrow_vendored::date::hh_mm_ss;
using arrow_vendored::date::local_days;
using arrow_vendored::date::local_time;
using arrow_vendored::date::locate_zone;
using arrow_vendored::date::Monday;
using arrow_vendored::date::months;
using arrow_vendored::date::round;
using arrow_vendored::date::Sunday;
using arrow_vendored::date::sys_time;
using arrow_vendored::date::trunc;
using arrow_vendored::date::weekday;
using arrow_vendored::date::weeks;
using arrow_vendored::date::year;
using arrow_vendored::date::year_month_day;
using arrow_vendored::date::year_month_weekday;
using arrow_vendored::date::years;
using arrow_vendored::date::literals::dec;
using arrow_vendored::date::literals::jan;
using arrow_vendored::date::literals::last;
using arrow_vendored::date::literals::mon;
using arrow_vendored::date::literals::sun;
using arrow_vendored::date::literals::thu;
using arrow_vendored::date::literals::wed;
using chrono::ceil;
using chrono::days;
using chrono::dec;
using chrono::floor;
using chrono::hh_mm_ss;
using chrono::jan;
using chrono::last;
using chrono::local_days;
using chrono::local_time;
using chrono::locate_zone;
using chrono::mon;
using chrono::Monday;
using chrono::months;
using chrono::round;
using chrono::sun;
using chrono::Sunday;
using chrono::sys_time;
using chrono::thu;
using chrono::trunc;
using chrono::wed;
using chrono::weekday;
using chrono::weeks;
using chrono::year;
using chrono::year_month_day;
using chrono::year_month_weekday;
using chrono::years;
using std::chrono::duration_cast;
using std::chrono::hours;
using std::chrono::minutes;
Expand Down Expand Up @@ -525,8 +526,8 @@ struct Week {
}

Localizer localizer_;
arrow_vendored::date::weekday wd_;
arrow_vendored::date::days days_offset_;
chrono::weekday wd_;
chrono::days days_offset_;
const bool count_from_zero_;
const bool first_week_is_fully_in_year_;
};
Expand Down Expand Up @@ -1379,35 +1380,32 @@ struct AssumeTimezone {
T Call(KernelContext*, Arg0 arg, Status* st) const {
try {
return get_local_time<T, Arg0>(arg, &tz_);
} catch (const arrow_vendored::date::nonexistent_local_time& e) {
} catch (const chrono::nonexistent_local_time& e) {
switch (options.nonexistent) {
case AssumeTimezoneOptions::Nonexistent::NONEXISTENT_RAISE: {
*st = Status::Invalid("Timestamp doesn't exist in timezone '", options.timezone,
"': ", e.what());
return arg;
}
case AssumeTimezoneOptions::Nonexistent::NONEXISTENT_EARLIEST: {
return get_local_time<T, Arg0>(arg, arrow_vendored::date::choose::latest,
&tz_) -
1;
return get_local_time<T, Arg0>(arg, chrono::choose::latest, &tz_) - 1;
}
case AssumeTimezoneOptions::Nonexistent::NONEXISTENT_LATEST: {
return get_local_time<T, Arg0>(arg, arrow_vendored::date::choose::latest, &tz_);
return get_local_time<T, Arg0>(arg, chrono::choose::latest, &tz_);
}
}
} catch (const arrow_vendored::date::ambiguous_local_time& e) {
} catch (const chrono::ambiguous_local_time& e) {
switch (options.ambiguous) {
case AssumeTimezoneOptions::Ambiguous::AMBIGUOUS_RAISE: {
*st = Status::Invalid("Timestamp is ambiguous in timezone '", options.timezone,
"': ", e.what());
return arg;
}
case AssumeTimezoneOptions::Ambiguous::AMBIGUOUS_EARLIEST: {
return get_local_time<T, Arg0>(arg, arrow_vendored::date::choose::earliest,
&tz_);
return get_local_time<T, Arg0>(arg, chrono::choose::earliest, &tz_);
}
case AssumeTimezoneOptions::Ambiguous::AMBIGUOUS_LATEST: {
return get_local_time<T, Arg0>(arg, arrow_vendored::date::choose::latest, &tz_);
return get_local_time<T, Arg0>(arg, chrono::choose::latest, &tz_);
}
}
}
Expand Down
Loading
Loading