Skip to content

uwescience/tpch-myrial

Repository files navigation

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.

Releases

No releases published

Packages

No packages published