risinglightdb / sqllogictest-rs

Sqllogictest (dialect with extensions) parser and runner in Rust.
Apache License 2.0
176 stars 47 forks source link

support `defer` statement #77

Open BugenZhao opened 2 years ago

BugenZhao commented 2 years ago

We may support the defer statement to do some clean-ups. There're several cases:

xxchan commented 2 years ago

Cool! I think this is a nice-to-have feature.

But the problem 1/2 (clean-up) can be alternatively solved (or bypassed) by -j1 😄.

For the .part problem, this solution can partly solve it, but I think it's still not the best way. IMO include subtest1.part should be (able to be) parallized (but maybe another syntax e.g., subtest subtest1.part). If so, the session-level side effects can also be isolated.

BugenZhao commented 2 years ago

But the problem 1/2 (clean-up) can be alternatively solved (or bypassed) by -j1 😄.

You're really clever! 😄

BugenZhao commented 2 years ago

But the problem 1/2 (clean-up) can be alternatively solved (or bypassed) by -j1 😄.

But we may also want to test the drop statement. 🥵

xxchan commented 2 years ago

But the problem 1/2 (clean-up) can be alternatively solved (or bypassed) by -j1 😄.

But we may also want to test the drop statement. 🥵

drop is tested in a single slt? Or what case do you mean.

BugenZhao commented 2 years ago

But the problem 1/2 (clean-up) can be alternatively solved (or bypassed) by -j1 😄.

But we may also want to test the drop statement. 🥵

drop is tested in a single slt? Or what case do you mean.

We want to test the correctness of the drop statements, but we may not want to resolve the dependencies manually to write the lines in order. 🤣

xxchan commented 2 years ago

Yes, so I said your proposal is a nice-to-have feature 🤤