-
Notifications
You must be signed in to change notification settings - Fork 332
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 filter logic bugs #1753
Fix filter logic bugs #1753
Conversation
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.
❌ Changes requested. Reviewed everything up to 0002c0c in 2 minutes and 12 seconds
More details
- Looked at
628
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. py/core/database/filters.py:376
- Draft comment:
The_build_metadata_condition
method should handle cases whereval
is a list or dict for$eq
and$ne
operators, as these are not currently handled. - Reason this comment was not posted:
Comment was on unchanged code.
2. py/core/database/filters.py:170
-
Draft comment:
This function is identical to the existingpsql_quote_literal
. Consider using that instead to avoid duplication. -
function
psql_quote_literal
(chunks.py) -
Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_LQP9JtPTUtOYc7Cp
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and 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.
The test for filtering on a non-existent column is incomplete. It should check for an empty result set.
detail=f"An error occurred while searching: {e}", | ||
) from e | ||
except Exception as e: | ||
raise HTTPException( |
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.
Catching a generic Exception
and raising an HTTPException with a misleading message about updating an entity. This should be corrected to reflect the actual operation being performed.
Allows for better filtering, fixes a number of bugs around passing integers.
Fixes #1699
Important
Enhances filter logic and error handling for integer values and undefined columns, with new test cases and refactoring in filter-related modules.
filters.py
andgraphs.py
.DocumentsIntegrationSuperUser.test.ts
to verify filter operations like$lte
,$gte
,$eq
, and range filters.graph_search()
ingraphs.py
.filters.py
.filters.py
andgraphs.py
.search.py
to streamline filter selection logic.This description was created by for 0002c0c. It will automatically update as commits are pushed.