-
Notifications
You must be signed in to change notification settings - Fork 22
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/subject object scans #539
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.
🦦
Looks good to me! I'd personally like to see a test that corresponds to the original bug report as well, but the fix itself looks good.
@@ -222,3 +222,38 @@ | |||
:schema/name "Brian"}]} | |||
subject) | |||
"returns all results in a map keyed by alias."))))) | |||
|
|||
(deftest ^:integration subject-object-test |
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.
Since this is meant to fix deletion as reported in https://github.com/fluree/core/issues/18, could we also get a corresponding test in update-test
ns?
src/fluree/db/query/exec/where.cljc
Outdated
in an object pattern under the `::fn` key (if any) by also checking if a | ||
prospective flake object is equal to the supplied `o` value if and only if the | ||
`:spot` index is used, the `p` value is `nil`, and the `s` and `o` values are | ||
not `nil`b. In this case, the new object value returned by this function will |
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.
Little typo in the second sentence of the docstring:
" not nil
b. " has an extraneous "b" at the end
This patch scans all the flakes for a subject in the spot index and filters those flakes by object in the case we know the subject and object values to match against but do not know the predicate. This ensures we consider every flake necessary. Otherwise, we could skip some flakes depending on the structure of the underlying sorted set and which flakes it branches on.
This batch depends on #536, so please review that first.
Really Fixes fluree/core#18