Skip to content

Commit 7124872

Browse files
lidavidmrok
andcommitted
ARROW-13548: [C++] Implement temporal difference kernels
Co-authored-by: Rok Mihevc <rok@mihevc.org>
1 parent 9093795 commit 7124872

File tree

12 files changed

+949
-9
lines changed

12 files changed

+949
-9
lines changed

cpp/src/arrow/array/diff.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ class MakeFormatterImpl {
464464
impl_ = [](const Array& array, int64_t index, std::ostream* os) {
465465
auto month_day_nanos =
466466
checked_cast<const MonthDayNanoIntervalArray&>(array).Value(index);
467-
*os << month_day_nanos.months << "m" << month_day_nanos.days << "d"
467+
*os << month_day_nanos.months << "M" << month_day_nanos.days << "d"
468468
<< month_day_nanos.nanoseconds << "ns";
469469
};
470470
return Status::OK();

cpp/src/arrow/array/diff_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ TEST_F(DiffTest, UnifiedDiffFormatter) {
507507
target_ = ArrayFromJSON(month_day_nano_interval(), R"([])");
508508
AssertDiffAndFormat(R"(
509509
@@ -0, +0 @@
510-
-2m3d1ns
510+
-2M3d1ns
511511
)");
512512

513513
// lists

cpp/src/arrow/compute/kernels/codegen_internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,10 @@ using ScalarBinaryEqualTypes = ScalarBinary<OutType, ArgType, ArgType, Op>;
923923
template <typename OutType, typename ArgType, typename Op>
924924
using ScalarBinaryNotNullEqualTypes = ScalarBinaryNotNull<OutType, ArgType, ArgType, Op>;
925925

926+
template <typename OutType, typename ArgType, typename Op>
927+
using ScalarBinaryNotNullStatefulEqualTypes =
928+
ScalarBinaryNotNullStateful<OutType, ArgType, ArgType, Op>;
929+
926930
} // namespace applicator
927931

928932
// ----------------------------------------------------------------------

0 commit comments

Comments
 (0)