sqllogictest-rs
sqllogictest-rs copied to clipboard
idea: use a template language to manage tests
From https://github.com/risingwavelabs/risingwave/issues/7006, maybe we can maintain such a tool in sqllogictest-rs
One specific use case is that we can deprecate include
, which introduced quite a few problems, e.g., prohibits parallel execution, and https://github.com/risinglightdb/sqllogictest-rs/issues?q=label%3AA-include
Strongly +1 for this. I have two solide use cases:
- For batch query in risingwave, we can use template for different query modes rather than using include. This way we can run slts parallely.
- We can use templates for different types. An example comes from duckdb: https://github.com/duckdb/duckdb/blob/53d9518e5f5fef1c1155d353d0132982d85d9ad9/test/sql/join/test_not_distinct_from.test_slow
Rust also has jinja2 template engine: https://github.com/Keats/tera
BTW, I guess we don't need to use a rust jinja.
The feature is conflicted with #114
The real solution is that an SLT file should be both self-contained and easy to use. An example of this is JsonNet.
If we don't want to spend too much effort on this, just introducing some rough sugar like include
is impossible to be friendly enough. I agree with jinja2.