Skip to content

Commit

Permalink
Add sqllogictests (v0) (#4395)
Browse files Browse the repository at this point in the history
* sqllogictests v0

* Add CI workflow

* Add license

* Run linter + remove submodule requirement in CI

* Add submodules back

* Remove files

* Address comments:

* Move sqllogic tests in datafusion/core/tests

* Update README

* Add licences

* Update CI check

* rust_lint.sh

* Run prettier on readme

* Fix checks

* New line (windows)

* sqllogictests don't parse correctly on windows - ignore windows

* empty commit - rerun CI

* Add LICENSE.txt and NOTICE.txt back:

* pyarrow fix
  • Loading branch information
mvanschellebeeck committed Dec 1, 2022
1 parent 799dd74 commit 78ac53a
Show file tree
Hide file tree
Showing 10 changed files with 1,569 additions and 23 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -517,3 +517,31 @@ jobs:
# If you encounter an error, run './dev/update_config_docs.sh' and commit
./dev/update_config_docs.sh
git diff --exit-code
# Run sqllogictests
sql-logic-tests:
name: run sqllogictests
needs: [linux-build-lib]
runs-on: ubuntu-latest
container:
image: amd64/rust
env:
# Disable full debug symbol generation to speed up CI build and keep memory down
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v3
with:
path: /github/home/.cargo
# this key equals the ones on `linux-build-lib` for re-use
key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Run sqllogictests
run: cargo test -p datafusion --test sqllogictests
150 changes: 127 additions & 23 deletions datafusion-cli/Cargo.lock

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

6 changes: 6 additions & 0 deletions datafusion/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ pyo3 = { version = "0.17.1", optional = true }
rand = "0.8"
rayon = { version = "1.5", optional = true }
smallvec = { version = "1.6", features = ["union"] }
sqllogictest = "0.8.0"
sqlparser = "0.27"
tempfile = "3"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "fs", "parking_lot"] }
Expand Down Expand Up @@ -156,3 +157,8 @@ required-features = ["jit"]
[[bench]]
harness = false
name = "merge"

[[test]]
harness = false
name = "sqllogictests"
path = "tests/sqllogictests/src/main.rs"
1 change: 1 addition & 0 deletions datafusion/core/tests/sqllogictests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.py

0 comments on commit 78ac53a

Please sign in to comment.