diff --git a/cpp/src/arrow/compute/kernels/scalar_temporal.cc b/cpp/src/arrow/compute/kernels/scalar_temporal.cc index bb4b44e77fbc2..674be60d42bd8 100644 --- a/cpp/src/arrow/compute/kernels/scalar_temporal.cc +++ b/cpp/src/arrow/compute/kernels/scalar_temporal.cc @@ -1199,7 +1199,7 @@ void RegisterScalarTemporal(FunctionRegistry* registry) { static const auto default_strftime_options = StrftimeOptions(); auto strftime = MakeSimpleUnaryTemporal( - "strftime", {WithDates, WithTimestamps}, utf8(), &strftime_doc, + "strftime", {WithTimes, WithDates, WithTimestamps}, utf8(), &strftime_doc, &default_strftime_options, StrftimeState::Init); DCHECK_OK(registry->AddFunction(std::move(strftime))); diff --git a/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc b/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc index f457a4f02b942..fcc54e418ee28 100644 --- a/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc +++ b/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc @@ -639,7 +639,6 @@ TEST_F(ScalarTemporalTest, Strftime) { CheckScalarUnary("strftime", timestamp(TimeUnit::NANO, "US/Hawaii"), nanoseconds, utf8(), string_nanoseconds, &options); -<<<<<<< HEAD auto options_hms = StrftimeOptions("%H:%M:%S"); auto options_ymdhms = StrftimeOptions("%Y-%m-%dT%H:%M:%S"); @@ -696,7 +695,6 @@ TEST_F(ScalarTemporalTest, Strftime) { Strftime(arr_ns, StrftimeOptions("%Y-%m-%dT%H:%M:%S%Z"))); auto options_ymd = StrftimeOptions("%Y-%m-%d"); - auto options_ymdhms = StrftimeOptions("%Y-%m-%dT%H:%M:%S"); const char* date32s = R"([0, 10957, 10958, null])"; const char* date64s = R"([0, 946684800000, 946771200000, null])"; diff --git a/docs/source/cpp/compute.rst b/docs/source/cpp/compute.rst index f6988a0b0d1fc..3c53a255023d7 100644 --- a/docs/source/cpp/compute.rst +++ b/docs/source/cpp/compute.rst @@ -1215,7 +1215,7 @@ provided by a concrete function :func:`~arrow::compute::Cast`. +=================+============+====================+==================+==============================+=======+ | cast | Unary | Many | Variable | :struct:`CastOptions` | | +-----------------+------------+--------------------+------------------+------------------------------+-------+ -| strftime | Unary | Timestamp, Time | String | :struct:`StrftimeOptions` | \(1) | +| strftime | Unary | Temporal | String | :struct:`StrftimeOptions` | \(1) | +-----------------+------------+--------------------+------------------+------------------------------+-------+ | strptime | Unary | String-like | Timestamp | :struct:`StrptimeOptions` | | +-----------------+------------+--------------------+------------------+------------------------------+-------+ diff --git a/r/tests/testthat/test-dplyr-lubridate.R b/r/tests/testthat/test-dplyr-lubridate.R index 19c867bfc0cc0..cf4b0c5a8fdf0 100644 --- a/r/tests/testthat/test-dplyr-lubridate.R +++ b/r/tests/testthat/test-dplyr-lubridate.R @@ -125,6 +125,8 @@ test_that("extract wday from timestamp", { test_df ) + skip_on_os("windows") # https://issues.apache.org/jira/browse/ARROW-13168 + expect_dplyr_equal( input %>% mutate(x = wday(date, label = TRUE)) %>% @@ -267,6 +269,8 @@ test_that("extract wday from date", { test_df ) + skip_on_os("windows") # https://issues.apache.org/jira/browse/ARROW-13168 + expect_dplyr_equal( input %>% mutate(x = wday(date, label = TRUE, abbr = TRUE)) %>%