Skip to content

[C++] Filter kernel returns invalid data when filtering with an Array slice #23111

Description

@asfimport

See ARROW-3808. This failing test reproduces the issue:

--- a/cpp/src/arrow/compute/kernels/filter_test.cc
+++ b/cpp/src/arrow/compute/kernels/filter_test.cc@@ -151,6 +151,12@@TYPED_TEST(TestFilterKernelWithNumeric, FilterNumeric) {
this->AssertFilter("[7, 8, 9]", "[null, 1, 0]", "[null, 8]");
this->AssertFilter("[7, 8, 9]", "[1, null, 1]", "[7, null, 9]");
+ this->AssertFilterArrays(
+ ArrayFromJSON(this->type_singleton(), "[7, 8, 9]"),
+ ArrayFromJSON(boolean(), "[0, 1, 1, 1, 0, 1]")->Slice(3, 3),
+ ArrayFromJSON(this->type_singleton(), "[7, 9]")
+ );
+
arrow/cpp/src/arrow/testing/gtest_util.cc:82: FailureFailed@@ -2, +2@@
+0
[ FAILED ] TestFilterKernelWithNumeric/9.FilterNumeric, whereTypeParam = arrow::DoubleType (0ms)

Reporter: Neal Richardson / @nealrichardson
Assignee: Neal Richardson / @nealrichardson

PRs and other links:

Note: This issue was originally created as ARROW-6773. Please see the migration documentation for further details.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions