-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Respect doesColumnSupportEmptyValue when building empty/notEmpty filtered queries #14078
base: 5.1
Are you sure you want to change the base?
Conversation
Thanks so much for the PR @cjavad and welcome to the community! I think the failed test was due to Codecov not being able to receive the uploaded report so I've just set that running again. Would you mind rebasing this onto the 5.1 branch please? As we released 5.1 recently, the next patch release will come from that branch. Let us know if you need any help with doing that. |
@all-contributors please add @cjavad for code |
I've put up a pull request to add @cjavad! 🎉 |
Thank you @RCheesley. It should be correctly rebased to 5.1 now with some git magic. No additional checks or tests has been run yet though. |
Thanks for getting that done so quickly @cjavad 🚀 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 5.1 #14078 +/- ##
============================================
- Coverage 62.18% 62.18% -0.01%
- Complexity 34220 34222 +2
============================================
Files 2252 2252
Lines 102330 102338 +8
============================================
Hits 63635 63635
- Misses 38695 38703 +8
|
Digging deeper it seems this is a duplicate of #12862 opened almost a year ago 😮 Although i prefer my own fix (hehe) there might be a reason for it not being merged earlier? |
@cjavad most likely a lack of testers (it's a huge challenge for us to find enough people to test and review, if you ever fancy helping check out https://mau.tc/tester), and because at this time it has unresolved conflicts, however that PR does have automated test coverage which would be preferable. Could you write tests to cover this PR if we took it forward? @escopecz @kuzmany any thoughts on which approach would be preferable? |
I'll be more than happy to add some tests once applicable. |
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.
@cjavad, Please add test cases which will help us with the example and help improve the code coverage.
Description
Having segments being built with a filter that asserts "date is not empty" or "date is empty" throws a SQL Exception when performing a comparison between a date and an empty string.
This only applies to this ComplexRelationValueFilterQueryBuilder.php not the newer BaseFilterQueryBuilder.php that invokes SegmentOperatorQuerySubscriber.php leading to inconsistent results between the two.
This has only been identified and tested on 5.1, might apply to versions as low as 5.0.
📋 Steps to test this PR:
Without this it errors out.