Skip to content

Commit

Permalink
Harmonize with ARROW-14111.
Browse files Browse the repository at this point in the history
  • Loading branch information
rok committed Sep 27, 2021
1 parent c09e79a commit 23b6bd2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cpp/src/arrow/compute/kernels/scalar_temporal.cc
Expand Up @@ -1371,7 +1371,7 @@ void RegisterScalarTemporal(FunctionRegistry* registry) {

static const auto default_strftime_options = StrftimeOptions();
auto strftime = MakeSimpleUnaryTemporal<Strftime>(
"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)));

Expand Down
2 changes: 0 additions & 2 deletions cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
Expand Up @@ -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");

Expand Down Expand Up @@ -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])";
Expand Down
2 changes: 1 addition & 1 deletion docs/source/cpp/compute.rst
Expand Up @@ -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` | |
+-----------------+------------+--------------------+------------------+------------------------------+-------+
Expand Down
4 changes: 4 additions & 0 deletions r/tests/testthat/test-dplyr-lubridate.R
Expand Up @@ -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)) %>%
Expand Down Expand Up @@ -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)) %>%
Expand Down

0 comments on commit 23b6bd2

Please sign in to comment.