Git Product home page Git Product logo

sdqlpy's Introduction

sdqlpy: A Compiled Query Engine for Python

This project is an implementation of the research paper "Building a Compiled Query Engine in Python" that will be presented at the Compiler Construction Conference (CC'23)

Use the following procedure to install sdqlpy and run its TPCH test suite:

Required Linux packages:

sudo su
apt-get install libssl-dev openssl  
apt install libtbb-dev  

Required MacOS packages:

brew install openssl  
brew install tbb@2020  

Note: do the specified exports after TBB installation.

Python building and installation:

This project uses the Python ast library and needs Python version 3.8.10 to be installed on your machine. If you already have this version, ignore this part but make sure that python3 correctly points to the above-mentioned version.

cd ~  
mkdir tmp  
cd tmp  
wget https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz  
tar zxvf Python-3.8.10.tgz  
cd Python-3.8.10  
./configure  
make  
make install  
alias python3=/usr/bin/python3.8  

Python dependencies installation:

python3 -m pip install pip  
pip3 install numpy==1.22.0  

Making the datasets ready:

mkdir sdqlpy_test  
cd sdqlpy_test  
git clone https://github.com/edin-dal/tpch-dbgen
cd tpch-dbgen  
make  

Replace the 1 parameter in the following command with the needed scaling factor:

./dbgen -s 1 -vf  
export TPCH_DATASET=$PWD'/'  

Installation of sdqlpy:

git clone https://github.com/edin-dal/sdqlpy  
cd sdqlpy/src  
python3 setup.py build  
python3 setup.py install  

Testing TPCH queries:

cd ../test  

On Linux, sdqlpy enables Hyper-Threading by default. If you want to disable it you need to set the related environment variable to 1 as follows: (on MacOS it must also be set to 1 and user can decide about enabling/disabling it on their machine)

export NO_HYPER_THREADING=1

Inside "test_all.py", configure the sdqlpy_init and the other parameters as explained in the internal comments. Then execute the file as follows:

python3 test_all.py  

Notes:

  • The project is still in the development phase and might have portability issues. Please kindly send us the issues you face while using this code.
  • TBB and phmap library are heavily used in the auto-generated C++ codes.

sdqlpy's People

Contributors

hesamshahrokhi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.