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(fuzz): enable create-if-not-exists option #3732

Merged

Conversation

CookiePieWw
Copy link
Collaborator

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

Enable the existing IF NOT EXISTS option in fuzz test.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@CookiePieWw CookiePieWw requested a review from a team as a code owner April 17, 2024 16:38
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 17, 2024
Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.12%. Comparing base (7e56bf2) to head (34e8254).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3732      +/-   ##
==========================================
- Coverage   85.42%   85.12%   -0.31%     
==========================================
  Files         966      966              
  Lines      162097   162097              
==========================================
- Hits       138472   137984     -488     
- Misses      23625    24113     +488     

Copy link
Collaborator

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Cool! Thank you :D

@tisonkun tisonkun requested a review from WenyXu April 18, 2024 00:38
@tisonkun tisonkun enabled auto-merge April 18, 2024 00:38
@WenyXu
Copy link
Member

WenyXu commented Apr 18, 2024

@CookiePieWw Thanks! BTW, we introduced a new engine for metric scenarios(called metric engine). Would you like to add some fuzz tests for this new engine?

The metric engine's RFC: https://github.com/GreptimeTeam/greptimedb/blob/main/docs/rfcs/2023-07-10-metric-engine.md

The following tests show how we create tables in the metric engine:

CREATE TABLE phy (ts timestamp time index, val double) engine=metric with ("physical_metric_table" = "");
SHOW TABLES;
DESC TABLE phy;
CREATE TABLE t1 (ts timestamp time index, val double, host string primary key) engine = metric with ("on_physical_table" = "phy");
CREATE TABLE t2 (ts timestamp time index, job string primary key, val double) engine = metric with ("on_physical_table" = "phy");
SELECT table_catalog, table_schema, table_name, table_type, engine FROM information_schema.tables WHERE engine = 'metric' order by table_name;
DESC TABLE phy;
DESC TABLE t1;
DESC TABLE t2;
-- should be failed
-- SQLNESS REPLACE (region\s\d+\(\d+\,\s\d+\)) region
DROP TABLE phy;
-- metadata should be restored
DESC TABLE phy;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE phy;
-- create one with other primary keys
CREATE TABLE phy2 (ts timestamp time index, val double, abc string, def string, primary key (abc, def)) engine=metric with ("physical_metric_table" = "");
DESC TABLE phy2;
DROP TABLE phy2;

cc @waynexia

@tisonkun tisonkun added this pull request to the merge queue Apr 18, 2024
Merged via the queue into GreptimeTeam:main with commit ffc8074 Apr 18, 2024
20 checks passed
@CookiePieWw
Copy link
Collaborator Author

BTW, we introduced a new engine for metric scenarios(called metric engine). Would you like to add some fuzz tests for this new engine?

Sure, I'll work on it later 😊.

@WenyXu
Copy link
Member

WenyXu commented Apr 18, 2024

BTW, we introduced a new engine for metric scenarios(called metric engine). Would you like to add some fuzz tests for this new engine?

Thanks! I will create an issue for this feature

@CookiePieWw CookiePieWw deleted the create-if-not-exists-in-fuzz-test branch April 19, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants