fix: parsing time index column option#865
Merged
MichaelScofield merged 5 commits intoGreptimeTeam:developfrom Jan 13, 2023
Merged
fix: parsing time index column option#865MichaelScofield merged 5 commits intoGreptimeTeam:developfrom
MichaelScofield merged 5 commits intoGreptimeTeam:developfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #865 +/- ##
===========================================
- Coverage 86.32% 86.16% -0.16%
===========================================
Files 422 425 +3
Lines 55668 56261 +593
===========================================
+ Hits 48056 48479 +423
- Misses 7612 7782 +170
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
waynexia
approved these changes
Jan 11, 2023
Member
waynexia
left a comment
There was a problem hiding this comment.
That long if else chain is too cool🤩
4d349ab to
01c267d
Compare
Member
Author
MichaelScofield
approved these changes
Jan 13, 2023
paomian
pushed a commit
to paomian/greptimedb
that referenced
this pull request
Oct 19, 2023
* fix: parsing time index column option * test: adds more cases for creating table * chore: by CR comments * feat: validate time index constraint in parser * chore: improve error msg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
Try to improve #697 .
The parser is not implemented well, it can't parse the column definition as below:
Because it assumes that the
TIME INDEXoption is always present at the end, but it's not expected.In this PR, it treats
TIME INDEXas a normal column option just likeNOT NULLetc., then after parsing all column options, we move theTIME INDEXfrom options to table constraints and do some validations.Checklist
Refer to a related PR or issue link (optional)