Repository navigation
Conversation
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
|
@LucaCappelletti94 if you have some time, could you take another look? I tried to address the issues you identified. |
|
Sure, currently I am trying to ultimate the fuzzing CI, once that is done reviews might get more swift given it should provide a stronger claim of consistency |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2467 +/- ##
=======================================
Coverage 80.96% 80.96%
=======================================
Files 42 42
Lines 33359 33412 +53
Branches 33359 33412 +53
=======================================
+ Hits 27009 27053 +44
- Misses 2790 2798 +8
- Partials 3560 3561 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| } | ||
| Token::Word(w) if w.keyword == Keyword::CHECK => { | ||
| self.expect_token(&Token::LParen)?; | ||
| let has_paren = if self.dialect.supports_unparenthesized_check_constraint() { |
There was a problem hiding this comment.
The unparenthesized CHECK path has the same defect. CONSTRAINT c CHECK (a + 1) > 0 fails here but ClickHouse accepts it. Add an appropriate test for it, and correct this parser.
Add suggestions from review Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
|
Hey @LucaCappelletti94 , sorry for the delay in responding to your comments after requesting them. I've updated the code with your suggestions and added a fix for check constraints without parentheses. My solution adds a field to the constraint structs tracking if they were created with parentheses. This would be a breaking change for these structs. The other option I could think of was storing the parenthesis state by wrapping the expressions in Not sure the best option here but would appreciate your opinion. |
Resolves: #2466
First time contributing so please let me know if I missed anything!