jonkeane commented on a change in pull request #11898:
URL: https://github.com/apache/arrow/pull/11898#discussion_r768062741



##########
File path: r/tests/testthat/test-chunked-array.R
##########
@@ -228,6 +229,28 @@ test_that("ChunkedArray supports empty arrays 
(ARROW-13761)", {
       expect_identical(length(as.vector(zero_empty_chunks)), 1L)
     }
   }
+
+  skip("array_filter has no kernel matching input types `(array[decimal256(4, 
2)], array[bool])`")
+  # once the above Jira is addressed decimal256() can be moved together with 
the
+  # other types. this chunk can be deleted once decimal256() is added to types
+  type <- decimal256(4, 2)
+  empty_filter <- ChunkedArray$create(type = bool())
+  one_empty_chunk <- ChunkedArray$create(type = type)
+  expect_type_equal(one_empty_chunk$type, type)
+  if (type != struct(x = int32())) {
+    expect_identical(length(one_empty_chunk), 
length(as.vector(one_empty_chunk)))
+  } else {
+    # struct -> tbl and length(tbl) is num_columns instead of num_rows
+    expect_identical(length(as.vector(one_empty_chunk)), 1L)
+  }
+  zero_empty_chunks <- one_empty_chunk$Filter(empty_filter)
+  expect_equal(zero_empty_chunks$num_chunks, 0)
+  expect_type_equal(zero_empty_chunks$type, type)
+  if (type != struct(x = int32())) {
+    expect_identical(length(zero_empty_chunks), 
length(as.vector(zero_empty_chunks)))
+  } else {
+    expect_identical(length(as.vector(zero_empty_chunks)), 1L)
+  }

Review comment:
       That sounds good, could you create one and pop the issue number 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-unsubscr...@arrow.apache.org

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


Reply via email to