You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "felipecrv (via GitHub)" <gi...@apache.org> on 2023/03/31 19:09:22 UTC

[GitHub] [arrow] felipecrv commented on a diff in pull request #34761: GH-34382: [C++] Support more types in run_end_encode and run_end_decode functions

felipecrv commented on code in PR #34761:
URL: https://github.com/apache/arrow/pull/34761#discussion_r1154807316


##########
cpp/src/arrow/compute/kernels/vector_run_end_encode_test.cc:
##########
@@ -317,7 +320,52 @@ INSTANTIATE_TEST_SUITE_P(
             REETestData::TypeMinMaxNull<Int64Type>(),
             REETestData::TypeMinMaxNull<UInt64Type>(),
             REETestData::TypeMinMaxNull<FloatType>(),
-            REETestData::TypeMinMaxNull<DoubleType>()),
+            REETestData::TypeMinMaxNull<DoubleType>(),
+            // A few temporal types
+            REETestData::JSON(
+                date32(), "[86400, 86400, 0, 432000, 432000, 432000, 22075200, 22075200]",
+                "[86400, 0, 432000, 22075200]", "[2, 3, 6, 8]"),
+            REETestData::JSON(date64(),
+                              "[86400000, 86400000, 0, 432000000, 432000000, 432000000, "
+                              "22032000000, 22032000000]",
+                              "[86400000, 0, 432000000, 22032000000]", "[2, 3, 6, 8]"),
+            REETestData::JSON(time32(TimeUnit::SECOND), "[1, 1, 0, 5, 5, 5, 255, 255]",
+                              "[1, 0, 5, 255]", "[2, 3, 6, 8]"),
+            REETestData::JSON(time64(TimeUnit::MICRO), "[1, 1, 0, 5, 5, 5, 255, 255]",
+                              "[1, 0, 5, 255]", "[2, 3, 6, 8]"),
+            // Decimal and fixed size binary types
+            REETestData::JSON(
+                decimal128(4, 1),
+                R"(["1.0", "1.0", "0.0", "5.2", "5.2", "5.2", "255.0", "255.0"])",
+                R"(["1.0", "0.0", "5.2", "255.0"])", "[2, 3, 6, 8]"),
+            REETestData::JSON(
+                decimal256(4, 1),
+                R"(["1.0", "1.0", "0.0", "5.2", "5.2", "5.2", "255.0", "255.0"])",
+                R"(["1.0", "0.0", "5.2", "255.0"])", "[2, 3, 6, 8]"),
+            REETestData::JSON(
+                fixed_size_binary(3),
+                R"(["abc", "abc", "abc", "def", "def", "def", "ghi", "ghi"])",
+                R"(["abc", "def", "ghi"])", "[3, 6, 8]"),
+            REETestData::JSON(
+                fixed_size_binary(3),
+                R"([null, "abc", "abc", "abc", "def", "def", "def", "ghi", "ghi", null, null])",
+                R"([null, "abc", "def", "ghi", null])", "[1, 4, 7, 9, 11]"),
+            // String and binary types
+            REETestData::JSON(
+                utf8(), R"(["abc", "abc", "", "", "de", "de", "de", "ghijkl", "ghijkl"])",
+                R"(["abc", "", "de", "ghijkl"])", "[2, 4, 7, 9]"),

Review Comment:
   Is copy and paste OK? Keeps the data neatly declarative here.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org