               (do (conj! old t) hash))))
         (transient (fast-map)))
      (persistent!))))
+
 
 (defn hash-join [rel1 hash1 join-syms rel2]
   (let [syms1       (-symbols rel1)

    (mapa offset-map syms))
  (-copy-tuple [_ tuple idxs target target-idxs]
    (dotimes [i (shim/alength idxs)]
      (shim/aset target (shim/aget target-idxs i) (nth tuple (shim/aget idxs i))))))

(defn coll-rel [symbols coll]
  (let [offset-map (reduce-kv

          (if (empty? non-consts)
            context ;; join was by constants only, nothing changes
            (let [sets (map #(collect % non-consts) contexts)
                  rel  (coll-rel non-consts (into (first sets) cat (next sets)))]
              (hash-join-rel context rel))))))
    "resolve-or" (dp/source clause)))

