pitrou commented on a change in pull request #10177:
URL: https://github.com/apache/arrow/pull/10177#discussion_r696015918
##########
File path: cpp/src/arrow/array/array_test.cc
##########
@@ -3060,4 +3098,14 @@ TEST(TestSwapEndianArrayData, ExtensionType) {
AssertArrayDataEqualsWithSwapEndian(test_data, expected_data);
}
+TEST(TestSwapEndianArrayData, MonthDayNanoInterval) {
+ auto array = ArrayFromJSON(month_day_nano_interval(), R"([[0, 1, 2],
+ [5000, 200,
3000000000]])");
+ auto swap_array =
MakeArray(*::arrow::internal::SwapEndianArrayData(array->data()));
+ EXPECT_TRUE(!swap_array->Equals(array));
+ ASSERT_ARRAYS_EQUAL(
+ *MakeArray(*::arrow::internal::SwapEndianArrayData(swap_array->data())),
*array);
+ ASSERT_OK(swap_array->ValidateFull());
+}
Review comment:
Uh, for some reason, Github wasn't showing the right changeset. Sorry
for this :-(
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]