Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix simd comparison kernels #1286

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

jhorstmann
Copy link
Contributor

Which issue does this PR close?

Closes #1285 .

Rationale for this change

The refactoring of the simd comparison in #1146 introduced silly mistake that was not noticed due to missing test coverage.

What changes are included in this PR?

Apart from the bugfix, this adjusts the tests so they automatically also test a larger version of the test input and so cover the chunked part.

@github-actions github-actions bot added the arrow Changes to the arrow crate label Feb 7, 2022
@jhorstmann
Copy link
Contributor Author

@alamb I'm sorry for only noticing this issue so late. Would be nice if we could still include it in the 9.0 release.

@alamb
Copy link
Contributor

alamb commented Feb 7, 2022

@jhorstmann -- I agree this seems serious -- I'll make a new RC to include this

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jhorstmann

@@ -2442,6 +2442,20 @@ mod tests {
let b = b.slice(0, b.len());
let c = $DYN_KERNEL(a.as_ref(), b.as_ref()).unwrap();
assert_eq!(BooleanArray::from($EXPECTED), c);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 in case anyone else is curious, without the code fix, this test fails like this:

---- compute::kernels::comparison::tests::test_primitive_array_eq stdout ----
thread 'compute::kernels::comparison::tests::test_primitive_array_eq' panicked at 'assertion failed: `(left == right)`
  left: `BooleanArray
[
  false,
  false,
  true,
  false,
  false,
  false,
  false,
  true,
  false,
  false,
  ...80 elements...,
  false,
  false,
  true,
  false,
  false,
  false,
  false,
  true,
  false,
  false,
]`,
 right: `BooleanArray
[
  false,
  false,
  true,
  true,
  true,
  true,
  true,
  true,
  true,
  true,
  ...80 elements...,
  false,
  false,
  true,
  false,
  false,
  false,
  false,
  true,
  false,
  false,
]`', arrow/src/compute/kernels/comparison.rs:2486:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
...

@alamb
Copy link
Contributor

alamb commented Feb 7, 2022

I plan to cherry-pick this and create a 9.0.1 branch / RC

@alamb alamb merged commit 936ed5e into apache:master Feb 7, 2022
alamb pushed a commit to alamb/arrow-rs that referenced this pull request Feb 7, 2022
@alamb alamb mentioned this pull request Feb 7, 2022
@alamb alamb mentioned this pull request Feb 9, 2022
alamb added a commit that referenced this pull request Feb 13, 2022
* Fix bitmask creation in chunked part of simd comparison (#1286)

* Update version to 9.0.1

* Update changelog

* Fix bitmask creation also for simd comparisons with scalar (#1290)

* Update versions and changelog for 9.0.2

Co-authored-by: Jörn Horstmann <git@jhorstmann.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mistake in chunked part of comparison kernels
2 participants