This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [uri (str "datomic:mem://" (d/squuid)) | |
_ (d/create-database uri) | |
conn (d/connect uri) | |
schema [ | |
{:db/id #db/id[:db.part/db] | |
:db/ident :a/id | |
:db/valueType :db.type/uuid | |
:db/cardinality :db.cardinality/one | |
:db.install/_attribute :db.part/db} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn print-state [db] | |
(prn | |
(d/entid db :value/before) | |
(count (seq (d/datoms db :aevt :value/before))) | |
(d/entid db :value/after) | |
(count (seq (d/datoms db :aevt :value/after))))) | |
(defn repro [] | |
(let [uri (str "datomic:mem://" (d/squuid)) | |
_ (d/create-database uri) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new-state | |
new-state | |
new-model | |
new-state | |
new-state | |
new-model | |
new-state | |
new-args | |
node-ids () | |
new-state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defprotocol SchemaRedirect | |
(freeze [this v]) | |
(thaw [this v])) | |
(defmulti redirect identity) | |
(defmethod redirect :default [a] | |
(reify SchemaRedirect | |
(freeze [this v] v) | |
(thaw [this v] v))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns app.loader | |
(:require [pigpen.raw :as raw] | |
[pigpen.core :as pig] | |
;[pigpen.parquet.local :as parquet] | |
;[pigpen.util :refer [pigsym-zero pigsym-inc]] | |
) | |
(:import (parquet.hadoop.ParquetReader) | |
(parquet.tools.read SimpleReadSupport SimpleRecord SimpleRecord$NameValue) | |
(parquet.hadoop ParquetReader) | |
(org.apache.hadoop.fs Path))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns pigpen.benchmark | |
(:require [taoensso.nippy :as nippy] | |
[clojure.data.fressian :as fressian] | |
[clojure.data]) | |
(:import [java.nio ByteBuffer])) | |
(set! *warn-on-reflection* true) | |
(defn bench-nippy [f] | |
(prn (count (nippy/freeze (f) {:legacy-mode true, :compressor nil}))) |