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

feat: add label for skipif and onlyif conditions #179

Merged
merged 5 commits into from
Jun 9, 2023
Merged

Conversation

wangrunji0408
Copy link
Member

@wangrunji0408 wangrunji0408 commented Jun 8, 2023

Users can now add --label options to skip commands. resolve #177

For example:

sqllogictest --label risingwave ... xxx.slt
skipif risingwave
query I
select some_features_not_supported_yet();

This PR also bumps version to v0.14.0.

///
/// The engine name is a label by default.
#[clap(long = "label")]
labels: Vec<String>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it's Vec<String>?

Copy link
Member Author

@wangrunji0408 wangrunji0408 Jun 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple labels are supported so that combinations are possible. e.g. risingwave + in-mem for this use case. And I'd like to use labels java/python in UDF tests.

Copy link
Member

@xxchan xxchan Jun 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not e.g., risingwave-in-mem? 🤪

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think multi labels are more flexible. 🤪

sqllogictest/src/parser.rs Outdated Show resolved Hide resolved
validator: default_validator,
column_type_validator: default_column_validator,
testdir: None,
sort_mode: None,
hash_threshold: 0,
labels: [db.engine_name().to_string()].into_iter().collect(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I get it. So the labels are the trait method + others?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether multiple labels are really needed, but OK to me.

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: xxchan <xxchan22f@gmail.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
@wangrunji0408 wangrunji0408 merged commit 4685291 into main Jun 9, 2023
@wangrunji0408 wangrunji0408 deleted the wrj/label branch June 9, 2023 12:16
@wangrunji0408
Copy link
Member Author

wangrunji0408 commented Jun 9, 2023

@skyzh Could you publish the sqllogictest-engines and sqllogictest crate? Thanks!

@skyzh
Copy link
Member

skyzh commented Jun 9, 2023

Published and added github:risinglightdb:crates-io as owner

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

Successfully merging this pull request may close these issues.

bin: enhance skipif
3 participants