Skip to content

Commit

Permalink
test(python): Set up TPC-H benchmark tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Apr 30, 2024
1 parent c441c08 commit d844b44
Show file tree
Hide file tree
Showing 11 changed files with 1,139 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
.yarn/
coverage.lcov
coverage.xml
data/
polars/vendor

# OS
Expand All @@ -32,6 +31,12 @@ __pycache__/
.cargo/
target/

# Data
*.csv
*.parquet
*.feather
*.tbl

# Project
/docs/data/
/docs/images/
Expand Down
1 change: 1 addition & 0 deletions py-polars/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ clean: ## Clean up caches and build artifacts
@rm -rf .mypy_cache/
@rm -rf .pytest_cache/
@$(VENV_BIN)/ruff clean
@rm -rf tests/data/tpch/sf*
@rm -f .coverage
@rm -f coverage.xml
@rm -f polars/polars.abi3.so
Expand Down
2 changes: 1 addition & 1 deletion py-polars/tests/benchmark/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

import polars as pl
from tests.benchmark.datagen_groupby import generate_group_by_data
from tests.benchmark.data import generate_group_by_data


@pytest.fixture(scope="session")
Expand Down
6 changes: 6 additions & 0 deletions py-polars/tests/benchmark/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Data generation functionality for use in the benchmarking suite."""

from tests.benchmark.data.h2oai import generate_group_by_data
from tests.benchmark.data.tpch import load_tpch_table

__all__ = ["load_tpch_table", "generate_group_by_data"]
5 changes: 5 additions & 0 deletions py-polars/tests/benchmark/data/h2oai/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Data generation functionality for use in the test suite."""

from tests.benchmark.data.h2oai.datagen_groupby import generate_group_by_data

__all__ = ["generate_group_by_data"]
5 changes: 5 additions & 0 deletions py-polars/tests/benchmark/data/tpch/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Generate data for the TPC-H benchmark tests."""

from tests.benchmark.data.tpch.generate_data import load_tpch_table

__all__ = ["load_tpch_table"]
Binary file added py-polars/tests/benchmark/data/tpch/dbgen/dbgen
Binary file not shown.

0 comments on commit d844b44

Please sign in to comment.