Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
ee29e0a
first draft
rok Dec 19, 2025
9a90f22
attempt to understand gcc behavior
rok Dec 23, 2025
1d4d846
keep vendored lib for gcc
rok Dec 23, 2025
0572874
simplify with C++20 chrono features
rok Dec 23, 2025
0825be5
Review feedback
rok Jan 5, 2026
ad434d0
lint
rok Jan 5, 2026
16dd991
Reference to gcc issue
rok Jan 5, 2026
d229dd7
Remove windows tz workarounds
rok Jan 5, 2026
85c33f5
Allow gcc bug on windows
rok Jan 6, 2026
7e595b9
Fix verify RC step
rok Jan 6, 2026
6dd921c
Fix R's tzdb
rok Jan 6, 2026
b51047d
Skip failing tests (due to gcc bug)
rok Jan 6, 2026
c8895fd
add mingw tzdata
rok Jan 6, 2026
3e70c52
enable std::chrono for mingw
rok Jan 6, 2026
ebfe03f
reenable downloading of tzdb for clang64 with mingw on windows
rok Jan 6, 2026
69fb921
download windowsZones.xml, skip CastTimezone.ZonedTimestampToTime
rok Jan 6, 2026
d28a9c4
experiment
rok Jan 6, 2026
64821d7
work
rok Jan 6, 2026
9ca3092
experiment
rok Jan 6, 2026
51f4804
another experiment
rok Jan 6, 2026
d7102c2
experiment
rok Jan 7, 2026
a937824
Reverting some changes
rok Jan 7, 2026
cc13cf6
Reverting more changes
rok Jan 7, 2026
e4dca03
Review feedback
rok Jan 7, 2026
dd17900
doctest
rok Jan 7, 2026
e02beb8
Assume gcc13+ for R
rok Jan 13, 2026
246d8e5
deprecate some functions, set deprecation vesion to 24.0.0
rok Jan 13, 2026
51dfaca
skip a test
rok Jan 13, 2026
252bb5f
skip a test
rok Jan 13, 2026
e2b6dae
review feedback
rok Jan 20, 2026
37acb88
review feedback
rok Jan 20, 2026
5d38aa3
lint
rok Jan 20, 2026
8bba447
fix two tests and skip another
rok Jan 20, 2026
104bd1d
revert change
rok Jan 20, 2026
00d6420
Skip windows tests in R if tzdb_path doesn't exist
rok Jan 20, 2026
7235e38
Skip timezone tests on windows R if tzdb_path doesn't exist
rok Jan 20, 2026
4d6bf22
python fix
rok Jan 20, 2026
b7d6f48
revert R change
rok Jan 20, 2026
98e3ced
R PKGBUILD
rok Jan 20, 2026
5b0a861
python fix
rok Jan 20, 2026
9cf043c
fix ARROW_USE_STD_CHRONO on windows
rok Jan 20, 2026
f0e8cbb
use wendored on clang windows
rok Jan 20, 2026
074e46e
cmake change and python tests
rok Jan 21, 2026
89c7c6a
print if assert False
rok Jan 21, 2026
9a6195f
add tzdb for R jobs
rok Jan 21, 2026
1ac7d9f
python skipif message
rok Jan 21, 2026
1b55784
skipif reason argument
rok Jan 21, 2026
9361c21
fix python test
rok Jan 21, 2026
f607399
fix python test, tidy up
rok Jan 21, 2026
1c81ba1
tidying up
rok Jan 21, 2026
96cd7ef
supress deprecation warning
rok Jan 21, 2026
90842e6
GlobalOptions initializer
rok Jan 21, 2026
6dd0c46
GlobalOptions
rok Jan 21, 2026
1112805
remove appveyor references
rok Jan 28, 2026
0d4bcf9
Remove more appveyor references
rok Jan 28, 2026
7284897
fix timestamp check
rok Jan 28, 2026
d1a6456
try checking full string
rok Jan 28, 2026
a4561e2
compare whole timestamp strings on windows
rok Jan 28, 2026
58592ee
temporarily enable problematic test
rok Jan 28, 2026
8ae4a92
fix failing tests
rok Jan 29, 2026
23e8aa9
simplify macro
rok Jan 29, 2026
80e9a39
disable rounding test on windows and rename user-agent
rok Jan 29, 2026
060dd32
lint
rok Jan 29, 2026
32fbc78
don't doctest
rok Feb 9, 2026
2745fb2
minor changes and tzdata to latest
rok Feb 10, 2026
cbefb70
iana db to latest
rok Feb 10, 2026
30d4ef2
exclude a problematic timestamp
rok Feb 10, 2026
f099df9
comment out another timestamp, remove NOLINT
rok Feb 10, 2026
54c9655
reverting nolint
rok Feb 10, 2026
c0dc13e
exclude two timestamps
rok Feb 10, 2026
4c5113f
fixing one-off error
rok Feb 10, 2026
cde409e
Update python/pyarrow/tests/test_compute.py
rok Feb 11, 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