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: predicate logic against bools #10679
Conversation
Fix type errors
Codecov Report
@@ Coverage Diff @@
## main #10679 +/- ##
==========================================
+ Coverage 85.60% 85.62% +0.01%
==========================================
Files 196 196
Lines 18241 18243 +2
Branches 3887 3887
==========================================
+ Hits 15616 15620 +4
+ Misses 2547 2546 -1
+ Partials 78 77 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add tests for eq
and ne
on number fields. I found that casting to string also affects numbers. https://github.com/dpilch/predicate-tests
Description of changes
Predicate filtering logic (used by
observe
andobserveQuery
) was not working correctly against bools, because we were casting field values to strings before comparison. This appears to be cruft from POC work — I can't otherwise tell why this cast would have been in place.Issue #, if available
Description of how you validated changes
Added tests that were red. Made the change. Tests turned green.
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.