Skip to content
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

Merged
merged 20 commits into from
Jan 17, 2023

Conversation

mpoffald
Copy link
Contributor

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

  1. Queries with filters, iri type clauses, and vars bindings are excluded from simple-subject-crawl

    These 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.

  2. Only tests in clj, due to known issues with cljs testing

  3. 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

  4. 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.

@@ -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}]
Copy link
Contributor Author

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

Copy link
Contributor

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.

@mpoffald mpoffald requested a review from a team January 17, 2023 18:00
Copy link
Contributor

@zonotope zonotope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏃🏾

@mpoffald mpoffald merged commit 13da133 into main Jan 17, 2023
@mpoffald mpoffald deleted the update/simple-subject-crawl-strategy branch January 17, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement simple subject crawl querying strategy
3 participants