Skip to content

fix(federation): handle EXISTS/NOT EXISTS subqueries in federation analyzer #1718

fix(federation): handle EXISTS/NOT EXISTS subqueries in federation analyzer

fix(federation): handle EXISTS/NOT EXISTS subqueries in federation analyzer #1718

Workflow file for this run

---
name: pr
on:
pull_request:
branches:
- main
- spiceai
- spiceai-*
jobs:
lint:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check formatting
run: cargo fmt --all -- --check
- run: cargo clippy --all-features -- -D warnings
build:
name: Build (${{ matrix.features }})
runs-on: ubuntu-latest
strategy:
matrix:
features:
- 'no-default-features'
- 'clickhouse'
- 'duckdb'
- 'postgres'
- 'sqlite'
- 'mysql'
- 'flight'
- 'adbc'
- 'mongodb'
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Build with ${{ matrix.features }}
run: |
if [ "${{ matrix.features }}" = "no-default-features" ]; then
cargo check --no-default-features
else
cargo check --no-default-features --features ${{ matrix.features }}
fi
integration-test:
name: Tests
runs-on: ubuntu-latest
env:
PG_DOCKER_IMAGE: ghcr.io/cloudnative-pg/postgresql:16-bookworm
MYSQL_DOCKER_IMAGE: mysql:8.0
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Cache Docker images
id: docker-cache
uses: actions/cache@v4
with:
path: /tmp/docker-images
key: docker-images-${{ env.PG_DOCKER_IMAGE }}-${{ env.MYSQL_DOCKER_IMAGE }}
- name: Load or pull Docker images
run: |
if [ -f /tmp/docker-images/postgres.tar ] && [ -f /tmp/docker-images/mysql.tar ]; then
echo "Loading cached Docker images..."
docker load -i /tmp/docker-images/postgres.tar
docker load -i /tmp/docker-images/mysql.tar
else
echo "Pulling Docker images..."
docker pull ${{ env.PG_DOCKER_IMAGE }}
docker pull ${{ env.MYSQL_DOCKER_IMAGE }}
mkdir -p /tmp/docker-images
docker save -o /tmp/docker-images/postgres.tar ${{ env.PG_DOCKER_IMAGE }}
docker save -o /tmp/docker-images/mysql.tar ${{ env.MYSQL_DOCKER_IMAGE }}
fi
- name: Free Disk Space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
sudo apt-get update >/dev/null 2>&1
sudo apt install aptitude -y >/dev/null 2>&1 || true
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1 || true
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1 || true
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1 || true
sudo apt-get autoremove -y >/dev/null 2>&1 || true
sudo apt-get autoclean -y >/dev/null 2>&1 || true
echo "some packages purged"
df -h
- name: Install ODBC & Sqlite
run: |
sudo apt-get install -y unixodbc-dev
sudo apt-get install -y libsqlite3-dev
- name: Install ADBC drivers
run: |
curl -LsSf https://dbc.columnar.tech/install.sh | sh
dbc install sqlite
dbc install duckdb
- name: Run tests
run: make test
python-integration-test:
name: Python Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
python
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: 'python/pyproject.toml'
- name: Install ODBC, Sqlite and Roapi
run: |
sudo apt-get install -y unixodbc-dev libsqliteodbc
sudo apt-get install -y libsqlite3-dev
rustup toolchain install nightly
cargo +nightly install --locked --git https://github.com/roapi/roapi --branch main --bins roapi
- name: Build Python package and run tests
run: |
cd python
uv sync --dev --no-install-package datafusion
uv run --no-project maturin develop --uv --release
cd python/tests
uv run --no-project pytest -v .