Skip to content

Commit 78ac53a

Browse files
Add sqllogictests (v0) (#4395)
* 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
1 parent 799dd74 commit 78ac53a

10 files changed

Lines changed: 1569 additions & 23 deletions

File tree

.github/workflows/rust.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,3 +517,31 @@ jobs:
517517
# If you encounter an error, run './dev/update_config_docs.sh' and commit
518518
./dev/update_config_docs.sh
519519
git diff --exit-code
520+
521+
# Run sqllogictests
522+
sql-logic-tests:
523+
name: run sqllogictests
524+
needs: [linux-build-lib]
525+
runs-on: ubuntu-latest
526+
container:
527+
image: amd64/rust
528+
env:
529+
# Disable full debug symbol generation to speed up CI build and keep memory down
530+
# "1" means line tables only, which is useful for panic tracebacks.
531+
RUSTFLAGS: "-C debuginfo=1"
532+
steps:
533+
- uses: actions/checkout@v3
534+
with:
535+
submodules: true
536+
- name: Cache Cargo
537+
uses: actions/cache@v3
538+
with:
539+
path: /github/home/.cargo
540+
# this key equals the ones on `linux-build-lib` for re-use
541+
key: cargo-cache-
542+
- name: Setup Rust toolchain
543+
uses: ./.github/actions/setup-builder
544+
with:
545+
rust-version: stable
546+
- name: Run sqllogictests
547+
run: cargo test -p datafusion --test sqllogictests

datafusion-cli/Cargo.lock

Lines changed: 127 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion/core/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pyo3 = { version = "0.17.1", optional = true }
9090
rand = "0.8"
9191
rayon = { version = "1.5", optional = true }
9292
smallvec = { version = "1.6", features = ["union"] }
93+
sqllogictest = "0.8.0"
9394
sqlparser = "0.27"
9495
tempfile = "3"
9596
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "fs", "parking_lot"] }
@@ -156,3 +157,8 @@ required-features = ["jit"]
156157
[[bench]]
157158
harness = false
158159
name = "merge"
160+
161+
[[test]]
162+
harness = false
163+
name = "sqllogictests"
164+
path = "tests/sqllogictests/src/main.rs"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.py

0 commit comments

Comments
 (0)