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

Use three-valued logic with missing values in ==(::Tuple, ::Tuple) #24963

Merged
merged 2 commits into from
Dec 14, 2017

Conversation

nalimilan
Copy link
Member

For consistency with AbstractArray (missed by #24653).

Also add a test for the special case when the result of equality test is not missing even in the presence of missing values.

@nalimilan nalimilan added the missing data Base.missing and related functionality label Dec 7, 2017
@nalimilan
Copy link
Member Author

@nanosoldier runbenchmarks(ALL, vs=":master")

@test ismissing(("a", missing) == ("a", missing))
@test ismissing((missing,) == (missing,))
@test ismissing((missing, 2) == (1, missing))
@test !((missing, 1) == (missing, 2))
Copy link
Member

Choose a reason for hiding this comment

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

I could be missing something super obvious, but how is this different than the test a few lines down that does !=?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it's the same since the fallback is defined using ==, but that's the assumption we're checking. :-)

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

@nalimilan
Copy link
Member Author

OK, the "simd/local_arrays" regression cannot possibly be related. The "tuple/reduction" benchmark doesn't use == either. The "dates" regressions are also noisy benchmarks -- and so are the improvements. So overall I think we can conclude that nothing changed. Anyway if there was a type unstability, it would have a really dramatic impact.

@nalimilan
Copy link
Member Author

I'll merge tomorrow barring objections.

@StefanKarpinski
Copy link
Sponsor Member

LGTM: the scheme is that isequal always returns a boolean and == uses 3VL, right?

@nalimilan
Copy link
Member Author

Yes. BTW, I've noticed < and > need a similar change (with isless always returning Bool like isequal).

@StefanKarpinski
Copy link
Sponsor Member

Circle CI failures look legit and related, btw.

@nalimilan nalimilan closed this Dec 13, 2017
@nalimilan nalimilan reopened this Dec 13, 2017
@nalimilan
Copy link
Member Author

Circle CI failures look legit and related, btw.

No, AFAICT that's #24984. Let's see what a new run says.

@nalimilan
Copy link
Member Author

CircleCI still fails, but with ProcessExitedException. Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing data Base.missing and related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants