-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fixes #3682 - Fix $ne filters incorrectly excluding null values #3686
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged No assets were unchanged |
@coderabbitai full review |
WalkthroughThe pull request introduces significant updates to the In Assessment against linked issues
Suggested labels
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🧰 Additional context used🔇 Additional comments (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
is this fixing the same issue as #3669? |
I can take a deeper look this weekend, but quick glance is that they are similar but complementary changes. #3669 appears to change the behaviour of "category is/not (empty)" to properly handle transfers, whereas mine changes the behaviour of "category isnot (real_category)" to properly not exclude transactions where category = null (transfers/off-budget). |
I've also looked, and they don't conflict. Mine are on queries where the null is passed in the filter directly, ie I'm not sure where the named parameters are in use by the app though, aside from the |
Yeah, I did the change for regular non-null $ne filters, and noticed the namedParameter portion. I couldn't find where in the app namedParams were actually used so I wrote the tests to make sure they worked in a way consistent with my initial change. I've double checked the differences between this change and #3669 - they don't overlap. |
Fixes #3682
As described in the ticket, any "is not" or "not one of" filters currently exclude the specified value(s) and also exclude null values.
Reproduce by filtering All Transactions to exclude any category - all off-budget or categorized transactions also get filtered out.
Given, example list dataset of Items (name, colour)
And query of
select * from Items where colour != "Yellow"
,Old result set (incorrectly excluding both null and "Yellow" Items):
"Car", "Red"
After my change, the new result set returns all Items which aren't yellow:
I wrote a couple tests for namedParameter queries and no existing tests are failing, but even still I'm not overly confident in the changes on lines 709-710 due to it being a weird bit of sql and I'm not a sql expert. I would appreciate it if someone with more sql knowledge confirms it won't have any weird edge-cases I didn't think to test for.