Repository navigation
Move some create/drop tests to ddl.slt - #4535
Conversation
324557d to
1ffe19b
Compare
1ffe19b to
9917a6c
Compare
| @@ -0,0 +1,2 @@ | |||
| Jorge,2018-12-13T12:12:10.011Z | |||
There was a problem hiding this comment.
These files used to be generated programatically in Rust, instead I have checked them in for the tests
| statement ok | ||
| DROP VIEW foo; | ||
|
|
||
| # Ok to drop |
There was a problem hiding this comment.
I think the SLT files are much easier to add / work with ❤️
| } | ||
|
|
||
| #[tokio::test] | ||
| #[should_panic(expected = "doesn't exist")] |
There was a problem hiding this comment.
One difference is that .slt files don't seem to offer a way to expect a certain error message (seemingly by design). I am not sure if you have any thoughts / experience on this @xudong963
There was a problem hiding this comment.
I think it can be supported in sqllogictest-rs.
Currently, databend has written its own python version of the logictest framework, which is able to add error messages, such as statement error 1006: 1006 is errorcode.
So I think it's a reasonable feature ~ ping @xxchan.
There was a problem hiding this comment.
We do support error messages:
statement error <regexp> and query error <regexp>
example can be found here https://github.com/risinglightdb/sqllogictest-rs/blob/main/examples/basic/basic.slt#L20
There was a problem hiding this comment.
Sweet -- hank you @xxchan I will update these tests to use that syntax
There was a problem hiding this comment.
I added the expected messages in 6be3662 -- very cool! It was good enough that I see a few bugs
There was a problem hiding this comment.
Here is an improvement to fix the messages: #4572
Draft as it builds on #4530Which issue does this PR close?
Part of #4495
Rationale for this change
In #4495 we are porting tests from rust to sqllogictest for speed and consistency
What changes are included in this PR?
Port some rust based tests in
create_drop.rsto sqllogictestsThere are a few tests I can't really port at the moment as they require programatic manipulation of the SessionContext (both information schema as well as table factories).
Are these changes tested?
Yes
Are there any user-facing changes?