Skip to content

Commit

Permalink
feat(datafusion): initial implementation for Arrow Datafusion backend
Browse files Browse the repository at this point in the history
Basic things are working, we need to add more operations (depending on the datafusion support) and
additional backend specific tests.

resolves ibis-project#2627
  • Loading branch information
kszucs committed Jan 3, 2022
1 parent c330627 commit f07a429
Show file tree
Hide file tree
Showing 31 changed files with 1,098 additions and 38 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/ibis-backends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,89 @@ jobs:
name: ${{ matrix.backend.name }}-${{ matrix.python-version }}
path: junit.xml

test_datafusion:
name: DataFusion ${{ matrix.datafusion-version }} ubuntu-latest python-${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
datafusion-version:
- master
- latest
python-version:
- "3.7"
- "3.9"
steps:
- name: checkout
uses: actions/checkout@v2

- name: checkout
uses: actions/checkout@v2
if: ${{ matrix.datafusion-version == 'master' }}
with:
path: datafusion
repository: apache/arrow-datafusion

- name: install rust
uses: actions-rs/toolchain@v1
if: ${{ matrix.datafusion-version == 'master' }}
with:
profile: minimal
toolchain: stable

- name: install python
id: install_python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: restore virtualenv
uses: syphar/restore-virtualenv@v1
id: cache-virtualenv
with:
requirement_files: poetry.lock
custom_cache_key_element: ${{ matrix.datafusion-version }}-${{ steps.install_python.outputs.python-version }}

- name: upgrade pip
run: pip install -U pip

- uses: syphar/restore-pip-download-cache@v1
if: ${{ !fromJSON(steps.cache-virtualenv.outputs.cache-hit) }}
with:
requirement_files: poetry.lock
custom_cache_key_element: ${{ matrix.datafusion-version }}-${{ steps.install_python.outputs.python-version }}

- name: install maturin and poetry
if: ${{ !fromJSON(steps.cache-virtualenv.outputs.cache-hit) }}
run: pip install poetry maturin

- name: install datafusion
if: ${{ matrix.datafusion-version == 'master' }}
working-directory: datafusion/python
run: maturin develop

- name: install ibis
if: ${{ !fromJSON(steps.cache-virtualenv.outputs.cache-hit) }}
run: poetry install --extras datafusion

- name: download backend data
run: python ci/datamgr.py download

- name: install backend data
run: python ci/datamgr.py datafusion

- name: run tests
run: ./ci/run_tests.sh
env:
PYTEST_BACKENDS: datafusion

- name: publish test report
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: ${{ matrix.backend }}-${{ matrix.python-version }}
path: junit.xml

backends:
# this job exists so that we can use a single job from this workflow to gate merging
runs-on: ubuntu-latest
Expand All @@ -461,5 +544,6 @@ jobs:
- test_postgres
- test_pyspark
- test_simple_backends
- test_datafusion
steps:
- run: exit 0
9 changes: 9 additions & 0 deletions ci/datamgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,15 @@ def dask(**params):
"""


@cli.command()
def datafusion(**params):
"""
The datafusion backend does not need test data, but we still
have an option for the backend for consistency, and to not
have to avoid calling `./datamgr.py datafusion` in the CI.
"""


@cli.command()
def csv(**params):
"""
Expand Down
9 changes: 5 additions & 4 deletions conda-lock/linux-64-3.7.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion conda-lock/linux-64-3.8.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion conda-lock/linux-64-3.9.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions conda-lock/osx-64-3.7.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion conda-lock/osx-64-3.8.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion conda-lock/osx-64-3.9.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f07a429

Please sign in to comment.