Skip to content

Commit

Permalink
Materialize if we're filtering on an indexed constant (#913)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwwoelfel authored Feb 20, 2025
1 parent 798a1a9 commit 8896f10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/instant/db/datalog.clj
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,10 @@
[prev-table]))
parent-froms)
:where (where-clause app-id named-p all-joins)}
:not-materialized]))
(if (and (= :ave (idx-key (:idx named-p)))
(named-constant? (:v named-p)))
:materialized
:not-materialized)]))

(defn symbol-fields-of-pattern
"Keeps track of which idx in the triple maps to which variable.
Expand Down

0 comments on commit 8896f10

Please sign in to comment.