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

array_contains: Incorrect example #348

Closed
Ardweaden opened this issue Mar 15, 2022 · 2 comments
Closed

array_contains: Incorrect example #348

Ardweaden opened this issue Mar 15, 2022 · 2 comments
Assignees
Milestone

Comments

@Ardweaden
Copy link
Contributor

Process ID: array_contains

Describe the issue:
Description states:

All definitions for the process eq regarding the comparison of values apply here as well. A null return value from eq is handled exactly as false (no match).

where

If any operand is null, the return value is null. Therefore, eq(null, null) returns null instead of true.

Example #4 says:

array_contains(data = [1,2,null], value = null) => true

Proposed solution:
Correct example would be array_contains(data = [1,2,null], value = null) => false

@m-mohr
Copy link
Member

m-mohr commented Mar 15, 2022

You are right, this should be fixed. (Nevertheless, this is really unintuitive.)
I also need to check whether array_find has a similar issue.

m-mohr added a commit that referenced this issue Mar 16, 2022
…ue` always returns `false` or `null` respectively, also fixed the incorrect examples. #348
@m-mohr
Copy link
Member

m-mohr commented Mar 16, 2022

Fixed in e4df864

@m-mohr m-mohr closed this as completed Mar 16, 2022
@m-mohr m-mohr added this to the 1.3.0 milestone Mar 16, 2022
@m-mohr m-mohr self-assigned this Mar 16, 2022
@m-mohr m-mohr modified the milestones: 1.3.0, 2.0.0 Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants