-
Notifications
You must be signed in to change notification settings - Fork 23
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
re-enable simple-subject-crawl for some queries #340
Conversation
…wl strategy not yet supported
allows us to write tests with plain vectors/maps instead of creating records
@@ -16,18 +18,17 @@ | |||
(defn- subjects-chan | |||
"Returns chan of subjects in chunks per index-leaf | |||
that can be pulled as needed based on the selection criteria of a where clause." | |||
[{:keys [conn novelty t] :as db} error-ch vars {:keys [p o idx p-ref?] :as _where-clause}] | |||
[{:keys [conn novelty t] :as db} error-ch vars {:keys [p o p-ref?] :as _where-clause}] |
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.
This p-ref?
is never present now, but I left it in case it should be re-enabled?
Fwiw it looks like it was removed in fc90f94 (unless it got moved elsewhere in that file and I didn't catch it). This was well before the recent parsing rewrite
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.
p-ref?
is a legacy concept. Before a property/predicate could be a ref always, or never. Now we support multiple datatype values for any predicate, we cannot know upfront if a predicate has refs or scalar values, or a mix of both.
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.
🏃🏾
Closes #309
Updates our query-reparsing code for the simple-subject-crawl execution strategy to handle the new format output by parsing, and reintroduces the use of this strategy in some cases (see caveats below).
Also adds some tests that exercise the new parsing pipeline.
I tried to make it as minimally-invasive as possible, so I opted to reparse into something the downstream code could handle, rather than trying to thread updated logic throughout the execution.
notes and caveats
Queries with filters,
iri
type clauses, andvars
bindings are excluded from simple-subject-crawlThese used to be supported, but in the interest of time, they were not included in this PR.
For now these will just be rejected by simple-subject-crawl code and executed like regular queries.
Only tests in clj, due to known issues with cljs testing
There's a lot of cleanup that could be done throughout the ssc execution code (read: dead code, map keys that no longer exist), but I punted on that for now
Queries with recursive predicates and fullText predicates don't parse at all right now (Queries with recursive predicates do not parse #339). These were previously ineligible for simple-subject-crawl, so I've attempted to reject these in re-parsing based on how they should parse now, but it's not tested.