Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit b4061b1

Browse files
authored
feat(sqllogictest): add initial TPC-H Q1-6 tests (#232)
We don't really know if the generated plan is correct or not -- what we all know now is whether we can generate a plan. Therefore, it's important to also evaluate if the result is correct. In this patch, we add sqllogictest, the test infra to ensure the execution result is correct. In `sqllogictest.rs`, you can replace the following statement to planning + execution solely with datafusion. This yields source-of-truth result. ``` DatafusionDBMS::new_no_optd().await? ``` Now we have TPC-H Q1-6. Note that Q2 doesn't work b/c there are too many NLJs and the datafusion built-in statistics would throw multiply overflow error. --------- Signed-off-by: Alex Chi <[email protected]>
1 parent 7ac3930 commit b4061b1

File tree

12 files changed

+683
-3
lines changed

12 files changed

+683
-3
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ members = [
99
"optd-gungnir",
1010
"optd-perfbench",
1111
"optd-datafusion-repr-adv-cost",
12+
"optd-sqllogictest",
1213
]
1314
resolver = "2"
1415

optd-sqllogictest/Cargo.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[package]
2+
name = "optd-sqllogictest"
3+
description = "sqllogictest for optd"
4+
version.workspace = true
5+
edition.workspace = true
6+
homepage.workspace = true
7+
keywords.workspace = true
8+
license.workspace = true
9+
repository.workspace = true
10+
11+
[dependencies]
12+
thiserror = "2"
13+
sqllogictest = "0.22"
14+
clap = { version = "4.5.4", features = ["derive"] }
15+
anyhow = { version = "1", features = ["backtrace"] }
16+
async-trait = "0.1"
17+
datafusion-optd-cli = { path = "../datafusion-optd-cli", version = "32.0.0" }
18+
optd-datafusion-repr-adv-cost = { path = "../optd-datafusion-repr-adv-cost", version = "0.1" }
19+
datafusion = { version = "32.0.0", features = [
20+
"avro",
21+
"crypto_expressions",
22+
"encoding_expressions",
23+
"regex_expressions",
24+
"unicode_expressions",
25+
"compression",
26+
] }
27+
env_logger = "0.9"
28+
mimalloc = { version = "0.1", default-features = false }
29+
regex = "1.8"
30+
tokio = { version = "1.24", features = [
31+
"macros",
32+
"rt",
33+
"rt-multi-thread",
34+
"sync",
35+
"parking_lot",
36+
] }
37+
optd-datafusion-bridge = { path = "../optd-datafusion-bridge", version = "0.1" }
38+
optd-datafusion-repr = { path = "../optd-datafusion-repr", version = "0.1" }
39+
itertools = "0.13"
40+
lazy_static = "1.4.0"
41+
42+
[[test]]
43+
name = "harness"
44+
path = "./tests/harness.rs"
45+
harness = false

0 commit comments

Comments
 (0)