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 validate method to CreateExpr #3772

Merged
merged 10 commits into from
Apr 24, 2024

Conversation

waynexia
Copy link
Member

@waynexia waynexia commented Apr 22, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

Closes #3759
Closes #3760

What's changed and what's your intention?

Add various validation to CreateExpr and RegionCreateRequest.

This patch enforces the constraint that both logical and physical tables can only have one field column. We are going to support multi-field later, but before it's fully implemented we'll limit this behavior for correctness.

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.

Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
@waynexia waynexia requested review from v0y4g3r and a team as code owners April 22, 2024 13:59
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 22, 2024
@waynexia waynexia requested a review from evenyag April 22, 2024 14:01
@waynexia waynexia marked this pull request as draft April 22, 2024 14:02
@waynexia
Copy link
Member Author

Going to fix #3760 in this PR

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 84.18605% with 34 lines in your changes are missing coverage. Please review.

Project coverage is 85.23%. Comparing base (f764fd5) to head (0c06875).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3772      +/-   ##
==========================================
- Coverage   85.52%   85.23%   -0.29%     
==========================================
  Files         946      946              
  Lines      159621   160107     +486     
==========================================
- Hits       136511   136469      -42     
- Misses      23110    23638     +528     

Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
@waynexia waynexia marked this pull request as ready for review April 23, 2024 08:00
@waynexia waynexia requested a review from WenyXu April 23, 2024 08:00
src/metric-engine/src/engine/create.rs Outdated Show resolved Hide resolved
src/metric-engine/src/engine/create.rs Show resolved Hide resolved
src/metric-engine/src/error.rs Show resolved Hide resolved
src/operator/src/expr_factory.rs Outdated Show resolved Hide resolved
@killme2008
Copy link
Contributor

I created an issue to track the limiations on metric engine and PromQL #3780

Signed-off-by: Ruihang Xia <[email protected]>
Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

LGTM

@waynexia waynexia enabled auto-merge April 23, 2024 14:42
@waynexia waynexia added this pull request to the merge queue Apr 24, 2024
Merged via the queue into GreptimeTeam:main with commit df01ac0 Apr 24, 2024
19 checks passed
@waynexia waynexia deleted the invalid-create-table branch April 24, 2024 07:42
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.

Validation needs to be added while creating the logical table Unexpected corrupted table info
3 participants