Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idea: use a template language to manage tests #143

Open
xxchan opened this issue Jan 9, 2023 · 5 comments
Open

idea: use a template language to manage tests #143

xxchan opened this issue Jan 9, 2023 · 5 comments

Comments

@xxchan
Copy link
Member

xxchan commented Jan 9, 2023

From risingwavelabs/risingwave#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

@liurenjie1024
Copy link
Contributor

liurenjie1024 commented Jan 9, 2023

Strongly +1 for this. I have two solide use cases:

  1. For batch query in risingwave, we can use template for different query modes rather than using include. This way we can run slts parallely.
  2. 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

@liurenjie1024
Copy link
Contributor

Rust also has jinja2 template engine: https://github.com/Keats/tera

@TennyZhuang
Copy link
Contributor

BTW, I guess we don't need to use a rust jinja.

@TennyZhuang
Copy link
Contributor

TennyZhuang commented Jan 28, 2023

The feature is conflicted with #114

@TennyZhuang
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants