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

WIP: Port to Nulls #2

Closed
wants to merge 1 commit into from
Closed

WIP: Port to Nulls #2

wants to merge 1 commit into from

Conversation

quinnj
Copy link
Contributor

@quinnj quinnj commented Oct 6, 2017

Companion PR to Query.

Not a lot of changes needed here, just the default_if_empty update and a few cases boolean checks where we want to make sure we account for Nulls behavior of null == true = null. This should allow preserving existing semantics in Query/QueryOperators as they worked w/ DataValues.

@codecov-io
Copy link

codecov-io commented Oct 6, 2017

Codecov Report

Merging #2 into master will not change coverage.
The diff coverage is 18.18%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #2   +/-   ##
=======================================
  Coverage   25.36%   25.36%           
=======================================
  Files          14       14           
  Lines         347      347           
=======================================
  Hits           88       88           
  Misses        259      259
Impacted Files Coverage Δ
src/enumerable/enumerable_count.jl 0% <0%> (ø) ⬆️
src/enumerable/enumerable_defaultifempty.jl 0% <0%> (ø) ⬆️
src/enumerable/enumerable_where.jl 90% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1eded27...66466bb. Read the comment docs.

@@ -3,7 +3,7 @@ function _count(source::Enumerable, filter::Function, state)
while !done(source, state)
ret_val = next(source, state)
state = ret_val[2]
if filter(ret_val[1])
if Nulls.coalesce(filter(ret_val[1]), false)

Choose a reason for hiding this comment

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

=== true is simpler and possibly more efficient.

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

Successfully merging this pull request may close these issues.

None yet

4 participants