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

Comparisons with scalar don't work on slices #740

Closed
bjchambers opened this issue Sep 2, 2021 · 0 comments · Fixed by #741
Closed

Comparisons with scalar don't work on slices #740

bjchambers opened this issue Sep 2, 2021 · 0 comments · Fixed by #741
Labels

Comments

@bjchambers
Copy link
Contributor

Describe the bug

Comparisons on scalars don't work when applied to slices. This seems to be the same as #738.

To Reproduce
Steps to reproduce the behavior.

    #[test]
    fn test_primitive_array_eq_scalar_with_slice() {
        let a = Int32Array::from(vec![Some(1), None, Some(2), Some(3)]);
        let a = a.slice(1, 3);
        let a: &Int32Array = as_primitive_array(&a);
        let a_eq = eq_scalar(a, 2).unwrap();
        assert_eq!(
            a_eq,
            BooleanArray::from(vec![None, Some(true), Some(false)])
        );
    }

Expected behavior

The test should pass.

Actual behavior

The test does not pass.

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant