An implementation of TPC-H in the MyriaL language
Python Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
templates
.gitignore
README.md
catalog.py
do_all_queries.sh
do_all_queries_py.sh
do_query.py
do_query.sh
gen_validation.py
ingest-radish.sh

README.md

tpch-myrial

This is an implementation of TPC-H in the MyriaL language. You can use it to generate TPC-H query plans for any back end of the Raco relational algebra compiler.

Setup

tpch-myrial requires TPC-H qgen to generate SQL queries and Raco to generate the query plans.

  • Download qgen
  • Install Raco by following its README.md and then make sure to set RACO_HOME to the directory of your Raco

Generate the queries

The queries are expressed as TPC-H qgen template files. The following command will run qgen on all the templates using the test parameters from the TPC-H specification.

python gen_validation.py

See the plan of a query

$RACO_HOME/scripts/myrial [flag] q1.myl

Run $RACO_HOME/scripts/myrial -h for documentation about the different kinds of output.

Compile the queries to Grappa (Radish) programs

python do_all_queries_py.sh COMPILER_FLAGS

Caveats

  • The queries are currently modified to omit sorting (ORDER BY) because MyriaL does not yet support ORDER BY.
  • If you want qgen to work in general (e.g., to use the templates for the traditional ad-hoc TPC-H benchmark), then you need to fix the date ranges. See query 4 for an example. MyriaL doesn't have date intervals, but qgen expects them. The easiest fix is to extend Raco with a built-in function.