-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
- CMPH:
opam pin add cmph https://github.com/jfeser/ocaml-cmph.git
- Genhash:
opam pin add genhash https://github.com/jfeser/genhash.git
- LLVM: You may want to build with
-DCMAKE_BUILD_TYPE=RelWithDebInfo
to get better errors. - PostgreSQL
- Ocaml: Install OPAM dependencies with
opam pin add castor .
in source dir.
Build with dune build
.
Castor looks for the following environment variables:
-
LLVM_ROOT
: path to the current LLVM root directory -
CASTOR_ROOT
: path to the Castor source directory -
CASTOR_DB
: Postgres connection string for the DB to use when compiling -
CASTOR_COST_DB
: Postgres connection string for the DB to use for the cost model (should be a sample ofCASTOR_DB
) -
CASTOR_TPCH_DB
: Postgres connection string for a TPC-H DB -
CASTOR_TPCH_TEST_DB
: Postgres connection string for a sample of the TPC-H DB
Run unit tests with dune runtest
.
Some of the tests depend on the benchmark databases and will fail if they are not installed.
We have two benchmark suites. One is based on TPC-H and one on data from Demomatch.
To set up the data for the TPC-H benchmark, use the generation script in https://github.com/jfeser/tpch-dbgen. It will create a database tpch
containing the benchmark data.
Run the individual queries with bench/tpch/run-bench.py QUERY
. The specialized queries are in files of the form bench/tpch/*-gold.txt
. Benchmark results are in bench/tpch/results.csv
. Temporary files, logs, and output are in a folder with the same name as the query.
Both the specialized and unspecialized forms of each query are committed to the repository. The specialized forms can be regenerated by running dune build @check_transforms
. The arguments to the query transformer are in *.args
files.
To set up the data for the Demomatch benchmark, run:
$ createdb demomatch
$ xz -d -c bench/demomatch/demomatch.sql.xz | pv | psql -d demomatch